Similar Items: Optimization and Control in Energy Management: Mathematical Modeling and Simulation