cost

This module contains objective functions for the model. The objective function of the model is to minimize the net present value of the system's cost. This includes capital cost, fixed O&M cost, variable cost and fuel cost by cost type, technology cost, transmission line cost by the source of cost, and operation cost and planning cost by the source of cost.

The cost equations are defined as follows:

Calculation of system-wide total cost
\[ \begin{align}\begin{aligned}\rm{cost}_{\rm{tech}}^{\rm{var}} &= \frac{\sum_{h,m,y,z,\rm{e}} C_{y,z,\rm{e}}^{\rm{tech-var}}\times \rm{gen}_{h,m,y,z,\rm{e}}} {\omega} \times \rm{factor}_{y}^{\rm{var}}\\\rm{cost}_{\rm{line}}^{\rm{var}} &= \frac{\sum_{h,m,y,z_s,z_o} C_{y,z}^{\rm{line-var}}\times \rm{export}_{h,m,y,z_s,z_o}}{\omega} \times \rm{factor}_{y}^{\rm{var}}\\\rm{cost}^{\rm{fuel}} & = \frac{\sum_{h,m,y,z,\rm{e}} C_{y,z,\rm{e}}^{\rm{fuel}}\times \rm{gen}_{h,m,y,z,\rm{e}}}{\omega} \times \rm{factor}_{y}^{\rm{var}}\\\rm{cost}_{\rm{tech}}^{\rm{fix}} &= \sum_{y,z,\rm{e}} C_{y,z,\rm{e}}^{\rm{tech-fix}}\times \rm{cap}_{y,z,\rm{e}}^{\rm{existing-tech}}\times \rm{factor}_{y}^{\rm{fix}}\\\rm{cost}_{\rm{line}}^{\rm{fix}} &= \sum_{y,z_s,z_o} C_{y,z_s,z_o}^{\rm{line-fix}}\times \rm{cap}_{y,z_s,z_o}^{\rm{existing-line}}\times \rm{factor}_{y}^{\rm{fix}}\\\rm{cost}_{\rm{tech}}^{\rm{inv}} &= \sum_{y,z,\rm{e}} C_{y,z,\rm{e}}^{\rm{tech-inv}}\times \rm{cap}_{y,z,\rm{e}}^{\rm{tech-inv}}\times \rm{factor}_{y}^{\rm{inv}}\\\rm{cost}_{\rm{line}}^{\rm{inv}} &= \sum_{y,z_s,z_o} C_{y,z_s,z_o}^{\rm{line-inv}}\times \rm{cap}_{y,z_s,z_o}^{\rm{line-inv}}\times \rm{factor}_{y}^{\rm{inv}} \times 0.5\end{aligned}\end{align} \]
class prepshot._model.cost.AddCostObjective(model)[源代码]

基类:object

Objective function class to determine the total cost of the model.

参数

model (object) --

__init__(model)[源代码]

The constructor for objective functions class.

参数

model (object) -- Model to be solved.

返回类型

None

carbon_cost_breakdown(y, z)[源代码]

Carbon-tax cost breakdown by year and zone.

Tax is applied to net zonal emissions (raw emissions minus purchased offsets), in line with the carbon-market accounting convention.

参数
  • y (int) -- Year.

  • z (str) -- Zone.

返回

Carbon-tax cost at a given year and zone.

返回类型

poi.ExprBuilder

carbon_cost_rule()[源代码]

Total carbon-tax cost over all years and zones.

返回

Total carbon-tax cost.

返回类型

poi.ExprBuilder

carbon_offset_cost_breakdown(y, z)[源代码]

Cost of purchased carbon offsets by year and zone.

参数
  • y (int) -- Year.

  • z (str) -- Zone.

返回

Carbon-offset cost at a given year and zone.

返回类型

poi.ExprBuilder

carbon_offset_cost_rule()[源代码]

Total cost of purchased carbon offsets over all years and zones.

返回

Total carbon-offset cost.

返回类型

poi.ExprBuilder

cost_fix_line_breakdown(y, z, z1)[源代码]

Fixed operation and maintenance cost breakdown of transmission lines.

参数
  • y (int) -- Year.

  • z (str) -- Zone.

  • z1 (str) -- Zone.

返回

Fixed operation and maintenance cost of transmission lines at a given year, source and destination zone.

返回类型

poi.ExprBuilder

cost_fix_tech_breakdown(y, z, te)[源代码]

Fixed operation and maintenance cost breakdown.

参数
  • y (int) -- Year.

  • z (str) -- Zone.

  • te (str) -- Technology.

返回

Fixed operation and maintenance cost of technologies at a given year, zone and technology.

返回类型

poi.ExprBuilder

cost_newline_breakdown(y, z, z1)[源代码]

New transmission line investment cost breakdown.

参数
  • y (int) -- Year.

  • z (str) -- Zone.

  • z1 (str) -- Zone.

返回

Investment cost of new transmission lines at a given year, source and destination zone.

返回类型

poi.ExprBuilder

cost_newtech_breakdown(y, z, te)[源代码]

New technology investment cost breakdown.

参数
  • y (int) -- Year.

  • z (str) -- Zone.

  • te (str) -- Technology.

返回

Investment cost of new technologies at a given year, zone and technology.

返回类型

poi.ExprBuilder

cost_var_line_breakdown(y, z, z1)[源代码]

Variable operation and maintenance cost breakdown of transmission lines.

参数
  • y (int) -- Year.

  • z (str) -- Zone.

  • z1 (str) -- Zone.

返回

Variable operation and maintenance cost of transmission lines at a given year, source and destination zone.

返回类型

poi.ExprBuilder

cost_var_tech_breakdown(y, z, te)[源代码]

Variable operation and maintenance cost breakdown.

参数
  • y (int) -- Year.

  • z (str) -- Zone.

  • te (str) -- Technology.

返回

Variable operation and maintenance cost of technologies at a given year, zone and technology.

返回类型

poi.ExprBuilder

define_objective()[源代码]

Objective function of the model, to minimize total cost.

返回类型

None

fix_cost_rule()[源代码]

Fixed O&M cost of technologies and transmission lines.

返回

Total fixed O&M cost of technologies and transmission lines over all years, zones and technologies.

返回类型

poi.ExprBuilder

fuel_cost_breakdown(y, z, te)[源代码]

Fuel cost breakdown of technologies.

参数
  • y (int) -- Year.

  • z (str) -- Zone.

  • te (str) -- Technology.

返回

Fuel cost at a given year, zone and technology.

返回类型

poi.ExprBuilder

income_rule()[源代码]

Income from water withdrawal. Reference: https://www.nature.com/articles/s44221-023-00126-0

返回

Income from water withdrawal.

返回类型

poi.ExprBuilder

lns_cost_rule()[源代码]

VOLL penalty on the load-not-served slack, discounted to NPV.

Returns a zero ExprBuilder when allow_load_shedding is false, so callers can add it unconditionally.

返回类型

ExprBuilder

newline_cost_rule()[源代码]

Total investment cost of new transmission lines.

返回

Total investment cost of new transmission lines over all years, zones.

返回类型

poi.ExprBuilder

newtech_cost_rule()[源代码]

Total investment cost of new technologies.

返回

Total investment cost of new technologies over all years, zones and technologies.

返回类型

poi.ExprBuilder

var_cost_rule()[源代码]

Calculate total variable cost, which is sum of the fuel cost of technologies and variable Operation and maintenance (O&M) cost of technologies and transmission lines.

返回

Total variable cost across all years, zones and technologies.

返回类型

poi.ExprBuilder