Modeling Competition and Investment in Liberalized Electricity Markets