In this paper generation investment process in a liberalised electricity market is simulated as a dynamic control problem with prices, both current and predicted, acting as a feedback variable. Market price is modelled as a function of the capacity margin only. We model an energy-only market, with no capacity payments. The model includes different power plant types with different investment lags, lumpy investment, possibility of mothballing and different investment behaviour. It is shown that the modelled market itself cannot guarantee a sufficient capacity margin and exhibits an oscillatory behaviour