This textbook provides a detailed analysis of operation and planning problems faced by virtual power plants participating in different electricity markets. The chapters address in-depth, topics such as: optimization, market power, expansion, and modelling uncertainty in operation and planning problems of virtual power plants.