This lecture covers the modeling and optimization of energy systems, focusing on the matching of energy supply and demand, linear programming, and the development of energy infrastructure. It discusses the use of optimization and simulation tools to assess different technologies and the long-term planning of energy investments. The lecture also introduces MARKAL models for energy system optimization over several decades, considering costs and constraints. Various aspects of energy subsystems, such as electrical subsystems and transportation services, are analyzed within the context of energy strategy optimization. Constraints, technology characteristics, and environmental policies are explored in the context of energy system modeling.