Cost-aware design and simulation of electrical energy systems