Parts

The parts field of the anyModel object structures the elements of a model's underlying optimization problem. Each of these parts has again three fields:

Technology

The part for technologies is accessed via modelObject.parts.tech[:techName]. These objects include all expansion and dispatch related elements for the respective technology. Technology parts have additional fields to store information specific to technologies.

Exchange

The part object for exchange is accessed via modelObject.parts.exc. It includes all model elements relating to the exchange of energy carriers between regions. Exchange between two regions is enabled, if a value for the residual exchange capacity parameter can be obtained between these two regions.

Trade

For trade the part object is accessed via modelObject.parts.trd. It includes all model elements relating to buying and selling energy carriers from "outside" the model. Most importantly these are trade prices and variables for traded quantities.

Balance

The part object for energy balances is accessed via modelObject.parts.bal. It is used to store all model elements relevant for the energy balance. For example, this includes the demand parameter, curtailment variables or the energy balance constraint itself.

Limit

Model elements used to impose certain limits on model variables are stored in modelObject.parts.lim. These include limiting parameters and the corresponding constraints enforcing these limits.

Objective

The field modelObject.parts.obj gathers elements relating to the objective function of a model's underlying optimization problem. So far, the only available objective in AnyMOD is cost minimization and set by the setObjective! function.

setObjective!(:costs, model_object)

An objective function has to be set after the optimization problem itself was created.