Development of an environmental and economic optimization model for distributed generation energy systems