OPTIMAL ENERGY MANAGEMENT OF RAILROAD ELECTRICAL SYSTEMS WITH