Variables

All the variables that the optimization model requires to calculate an optimal solution will be listed and defined in this section. A variable is a numerical value that is determined during optimization. Variables can denote a single, independent value, or an array of values. Variables define the search space for optimization. Variables of this optimization model can be seperated into sections by their area of use. These Sections are Cost, Commodity, Process, Transmission and Storage.

Table: Model Variables
Variable Unit Description
Cost Variables
\(\zeta\) €/a Total System Cost
\(\zeta_\text{inv}\) €/a Investment Costs
\(\zeta_\text{fix}\) €/a Fix Costs
\(\zeta_\text{var}\) €/a Variable Costs
\(\zeta_\text{fuel}\) €/a Fuel Costs
\(\zeta_\text{rev}\) €/a Revenue Costs
\(\zeta_\text{pur}\) €/a Purchase Costs
\(\zeta_\text{startup}\) €/a Startup Costs
Commodity Variables
\(\rho_{vct}\) MW Stock Commodity Source Term
\(\varrho_{vct}\) MW Sell Commodity Source Term
\(\psi_{vct}\) MW Buy Commodity Source Term
Process Variables
\(\kappa_{vp}\) MW Total Process Capacity
\(\hat{\kappa}_{vp}\) MW New Process Capacity
\(\tau_{vpt}\) MW Process Throughput
\(\epsilon_{vcpt}^\text{in}\) MW Process Input Commodity Flow
\(\epsilon_{vcpt}^\text{out}\) MW Process Output Commodity Flow
\(\omega_{vpt}\) MW Process Online Capacity
\(\phi_{vpt}\) MW Process Startup Capacity
Transmission Variables
\(\kappa_{af}\) MW Total transmission Capacity
\(\hat{\kappa}_{af}\) MW New Transmission Capacity
\(\pi_{aft}^\text{in}\) MW Transmission Power Flow (Input)
\(\pi_{aft}^\text{out}\) MW Transmission Power Flow (Output)
Storage Variables
\(\kappa_{vs}^\text{c}\) MWh Total Storage Size
\(\hat{\kappa}_{vs}^\text{c}\) MWh New Storage Size
\(\kappa_{vs}^\text{p}\) MW Total Storage Power
\(\hat{\kappa}_{vs}^\text{p}\) MW New Storage Power
\(\epsilon_{vst}^\text{in}\) MW Storage Power Flow (Input)
\(\epsilon_{vst}^\text{out}\) MW Storage Power Flow (Output)
\(\epsilon_{vst}^\text{con}\) MWh Storage Energy Content
Demand Side Management Variables
\(\delta_{vct}^\text{up}\) MW DSM Upshift
\(\delta_{vct,tt}^\text{down}\) MW DSM Downshift

Cost Variables

Total System Cost, \(\zeta\) : the variable \(\zeta\) represents the annual total expense incurred in reaching the satisfaction of the given energy demand. This is calculated by the sum total of all costs by type(\(\zeta_r\), \(\forall r \in R\)) and defined as costs by the following code fragment:

m.costs = pyomo.Var(
    m.cost_type,
    within=pyomo.Reals,
    doc='Costs by type (EUR/a)')

More information on calculation of this variable is available at the section Objective function.

Total System costs by type: System costs are divided into 6 cost types by their meaning and purpose. The separation of costs by type, facilitates business planning and provides calculation accuracy As mentioned before these cost types are hardcoded, which means they are not considered to be fixed or changed by the user. These cost types are as following;

Investment Costs \(\zeta_\text{inv}\): The variable \(\zeta_\text{inv}\) represents the annualised total investment costs. Costs for required new investments on storage, process and transmission technologies.

Fix Costs \(\zeta_\text{fix}\): The variable \(\zeta_\text{fix}\) represents the annualised total fix costs. Fix costs for all used storage, process, and transmission technologies. Such as maintenance costs.

Variable Costs \(\zeta_\text{var}\): The variable \(\zeta_\text{var}\) represents the annualised total variables costs. Variable costs that are reliant on the usage amount and period of the storage, process, transmission technologies.

Fuel Costs \(\zeta_\text{fuel}\): The variable \(\zeta_\text{fuel}\) represents the annualised total fuel costs. Fuel costs are dependent on the usage of stock commodities( \(\forall c \in C_\text{stock}\)).

Revenue Costs \(\zeta_\text{rev}\): The variable \(\zeta_\text{rev}\) represents the annualised total revenue costs. Revenue costs is defined for the costs that occures by selling the sell commodities( \(\forall c \in C_\text{sell}\)). Since this variable is an income for the system, it is either zero or has a negative value.

Purchase Costs \(\zeta_\text{pur}\): The variable \(\zeta_\text{pur}\) represents the annualised total purchase costs. Purchase costs is defined for the costs that occures by buying the buy commodities ( \(\forall c \in C_\text{buy}\) ).

Startup Costs \(\zeta_\text{startup}\): The variable \(\zeta_\text{startup}\) represents the annualised total startup costs. Startup costs are reliant on the yearly startup occurences of the processes.

For more information on calculation of these variables see section Objective function.

Commodity Variables

Stock Commodity Source Term, \(\rho_{vct}\), e_co_stock, MW : The variable \(\rho_{vct}\) represents the energy amount in [MW] that is being used by the system of commodity \(c\) from type stock (\(\forall c \in C_\text{stock}\)) in a site \(v\) (\(\forall v \in V\)) at timestep \(t\) (\(\forall t \in T_\text{m}\)). In script urbs.py this variable is defined by the variable e_co_stock and initialized by the following code fragment:

m.e_co_stock = pyomo.Var(
    m.tm, m.com_tuples,
    within=pyomo.NonNegativeReals,
    doc='Use of stock commodity source (MW) per timestep')

Sell Commodity Source Term, \(\varrho_{vct}\), e_co_sell, MW : The variable \(\varrho_{vct}\) represents the energy amount in [MW] that is being used by the system of commodity \(c\) from type sell (\(\forall c \in C_\text{sell}\)) in a site \(v\) (\(\forall v \in V\)) at timestep \(t\) (\(\forall t \in T_\text{m}\)). In script urbs.py this variable is defined by the variable e_co_sell and initialized by the following code fragment:

m.e_co_sell = pyomo.Var(
    m.tm, m.com_tuples,
    within=pyomo.NonNegativeReals,
    doc='Use of sell commodity source (MW) per timestep')

Buy Commodity Source Term, \(\psi_{vct}\), e_co_buy, MW : The variable \(\psi_{vct}\) represents the energy amount in [MW] that is being used by the system of commodity \(c\) from type buy (\(\forall c \in C_\text{buy}\)) in a site \(v\) (\(\forall v \in V\)) at timestep \(t\) (\(\forall t \in T_\text{m}\)). In script urbs.py this variable is defined by the variable e_co_buy and initialized by the following code fragment:

m.e_co_buy = pyomo.Var(
   m.tm, m.com_tuples,
   within=pyomo.NonNegativeReals,
   doc='Use of buy commodity source (MW) per timestep')

Process Variables

Total Process Capacity, \(\kappa_{vp}\), cap_pro: The variable \(\kappa_{vp}\) represents the total potential throughput (capacity) of a process tuple \(p_v\) (\(\forall p \in P, \forall v \in V\)), that is required in the energy system. The total process capacity includes both the already installed process capacity and the additional new process capacity that needs to be installed. Since the costs of the process technologies are mostly directly proportional to the maximum possible output (and correspondingly to the capacity) of processes, this variable acts as a scale factor of process technologies and helps us to calculate a more accurate cost plan. For further information see Process Capacity Rule. This variable is expressed in the unit MW. In script urbs.py this variable is defined by the model variable cap_pro and initialized by the following code fragment:

m.cap_pro = pyomo.Var(
    m.pro_tuples,
    within=pyomo.NonNegativeReals,
    doc='Total process capacity (MW)')

New Process Capacity, \(\hat{\kappa}_{vp}\), cap_pro_new: The variable \(\hat{\kappa}_{vp}\) represents the capacity of a process tuple \(p_v\) (\(\forall p \in P, \forall v \in V\)) that needs to be installed additionally to the energy system in order to provide the optimal solution. This variable is expressed in the unit MW. In script urbs.py this variable is defined by the model variable cap_pro_new and initialized by the following code fragment:

m.cap_pro_new = pyomo.Var(
    m.pro_tuples,
    within=pyomo.NonNegativeReals,
    doc='New process capacity (MW)')

Process Throughput, \(\tau_{vpt}\), tau_pro : The variable \(\tau_{vpt}\) represents the measure of (energetic) activity of a process tuple \(p_v\) (\(\forall p \in P, \forall v \in V\)) at a timestep \(t\) (\(\forall t \in T_{m}\)). By default, process throughput is represented by the major input commodity flow of the process (e.g. ‘Gas’ for ‘Gas plant’, ‘Wind’ for ‘Wind park’). Based on the process throughput amount in a given timestep of a process, flow amounts of the process’ input and output commodities at that timestep can be calculated by scaling the process throughput with corresponding process input and output ratios. For further information see Process Input Ratio and Process Output Ratio. This variable is expressed in the unit MW. In script urbs.py this variable is defined by the model variable tau_pro and initialized by the following code fragment:

m.tau_pro = pyomo.Var(
    m.tm, m.pro_tuples,
    within=pyomo.NonNegativeReals,
    doc='Activity (MW) through process')

Process Input Commodity Flow, \(\epsilon_{vcpt}^\text{in}\), e_pro_in: The variable \(\epsilon_{vcpt}^\text{in}\) represents the flow input into a process tuple \(p_v\) (\(\forall p \in P, \forall v \in V\)) caused by an input commodity \(c\) (\(\forall c \in C\)) at a timestep \(t\) (\(\forall t \in T_{m}\)). This variable is generally expressed in the unit MW. In script urbs.py this variable is defined by the model variable e_pro_in and initialized by the following code fragment:

m.e_pro_in = pyomo.Var(
    m.tm, m.pro_tuples, m.com,
    within=pyomo.NonNegativeReals,
    doc='Flow of commodity into process per timestep')

Process Output Commodity Flow, \(\epsilon_{vcpt}^\text{out}\), e_pro_out: The variable \(\epsilon_{vcpt}^\text{out}\) represents the flow output out of a process tuple \(p_v\) (\(\forall p \in P, \forall v \in V\)) caused by an output commodity \(c\) (\(\forall c \in C\)) at a timestep \(t\) (\(\forall t \in T_{m}\)). This variable is generally expressed in the unit MW (or tonnes e.g. for the environmental commodity ‘CO2’). In script urbs.py this variable is defined by the model variable e_pro_out and initialized by the following code fragment:

m.e_pro_out = pyomo.Var(
    m.tm, m.pro_tuples, m.com,
    within=pyomo.NonNegativeReals,
    doc='Flow of commodity out of process per timestep')

Process Online Capacity, \(\omega_{vpt}\), cap_online: This variable is the time-dependent version of the usual process capacity \(\kappa_{vp}\). It is defined for partial process tuples, i.e. those processes that have the parameter input ratio ratio-min set. of a process tuple \(p_v\) (\(\forall p \in P, \forall v \in V\)) at a timestep \(t\) (\(\forall t \in T\)). In script urbs.py this variable is defined by the model variable onlinestatus and initialized by the following code fragment:

m.cap_online = pyomo.Var(
    m.t, m.pro_partial_tuples,
    within=pyomo.NonNegativeReals,
    doc='Online capacity (MW) of process per timestep')

Process Startup Capacity, \(\phi'_{vpt}\), startup_pro: This variable indicates every rise in the process online capacity. This indicator is then used to determine startup costs for all partial process tuples. The variable is defined by the following code fragment:

m.startup_pro = pyomo.Var(
    m.tm, m.pro_partial_tuples,
    within=pyomo.NonNegativeReals,
    doc='Started capacity (MW) of process per timestep')

Transmission Variables

Total Transmission Capacity, \(\kappa_{af}\), cap_tra: The variable \(\kappa_{af}\) represents the total potential transfer power of a transmission tuple \(f_{ca}\), where \(a\) represents the arc from an origin site \(v_\text{out}\) to a destination site \({v_\text{in}}\). The total transmission capacity includes both the already installed transmission capacity and the additional new transmission capacity that needs to be installed. This variable is expressed in the unit MW. In script urbs.py this variable is defined by the model variable cap_tra and initialized by the following code fragment:

m.cap_tra = pyomo.Var(
    m.tra_tuples,
    within=pyomo.NonNegativeReals,
    doc='Total transmission capacity (MW)')

New Transmission Capacity, \(\hat{\kappa}_{af}\), cap_tra_new: The variable \(\hat{\kappa}_{af}\) represents the additional capacity, that needs to be installed, of a transmission tuple \(f_{ca}\), where \(a\) represents the arc from an origin site \(v_\text{out}\) to a destination site \(v_\text{in}\). This variable is expressed in the unit MW. In script urbs.py this variable is defined by the model variable cap_tra_new and initialized by the following code fragment:

m.cap_tra_new = pyomo.Var(
    m.tra_tuples,
    within=pyomo.NonNegativeReals,
    doc='New transmission capacity (MW)')

Transmission Power Flow (Input), \(\pi_{aft}^\text{in}\), e_tra_in: The variable \(\pi_{aft}^\text{in}\) represents the power flow input into a transmission tuple \(f_{ca}\) at a timestep \(t\), where \(a\) represents the arc from an origin site \(v_\text{out}\) to a destination site \(v_\text{in}\). This variable is expressed in the unit MW. In script urbs.py this variable is defined by the model variable e_tra_in and initialized by the following code fragment:

m.e_tra_in = pyomo.Var(
    m.tm, m.tra_tuples,
    within=pyomo.NonNegativeReals,
    doc='Power flow into transmission line (MW) per timestep')

Transmission Power Flow (Output), \(\pi_{aft}^\text{out}\), e_tra_out: The variable \(\pi_{aft}^\text{out}\) represents the power flow output out of a transmission tuple \(f_{ca}\) at a timestep \(t\), where \(a\) represents the arc from an origin site \(v_\text{out}\) to a destination site \(v_\text{in}\). This variable is expressed in the unit MW. In script urbs.py this variable is defined by the model variable e_tra_out and initialized by the following code fragment:

m.e_tra_out = pyomo.Var(
    m.tm, m.tra_tuples,
    within=pyomo.NonNegativeReals,
    doc='Power flow out of transmission line (MW) per timestep')

Storage Variables

Total Storage Size, \(\kappa_{vs}^\text{c}\), cap_sto_c: The variable \(\kappa_{vs}^\text{c}\) represents the total load capacity of a storage tuple \(s_{vc}\). The total storage load capacity includes both the already installed storage load capacity and the additional new storage load capacity that needs to be installed. This variable is expressed in unit MWh. In script urbs.py this variable is defined by the model variable cap_sto_c and initialized by the following code fragment:

m.cap_sto_c = pyomo.Var(
    m.sto_tuples,
    within=pyomo.NonNegativeReals,
    doc='Total storage size (MWh)')

New Storage Size, \(\hat{\kappa}_{vs}^\text{c}\), cap_sto_c_new: The variable \(\hat{\kappa}_{vs}^\text{c}\) represents the additional storage load capacity of a storage tuple \(s_{vc}\) that needs to be installed to the energy system in order to provide the optimal solution. This variable is expressed in the unit MWh. In script urbs.py this variable is defined by the model variable cap_sto_c_new and initialized by the following code fragment:

m.cap_sto_c_new = pyomo.Var(
    m.sto_tuples,
    within=pyomo.NonNegativeReals,
    doc='New storage size (MWh)')

Total Storage Power, \(\kappa_{vs}^\text{p}\), cap_sto_p: The variable \(\kappa_{vs}^\text{p}\) represents the total potential discharge power of a storage tuple \(s_{vc}\). The total storage power includes both the already installed storage power and the additional new storage power that needs to be installed. This variable is expressed in the unit MW. In script urbs.py this variable is defined by the model variable cap_sto_p and initialized by the following code fragment:

m.cap_sto_p = pyomo.Var(
    m.sto_tuples,
    within=pyomo.NonNegativeReals,
    doc='Total storage power (MW)')

New Storage Power, \(\hat{\kappa}_{vs}^\text{p}\), cap_sto_p_new: The variable \(\hat{\kappa}_{vs}^\text{p}\) represents the additional potential discharge power of a storage tuple \(s_{vc}\) that needs to be installed to the energy system in order to provide the optimal solution. This variable is expressed in the unit MW. In script urbs.py this variable is defined by the model variable cap_sto_p_new and initialized by the following code fragment:

m.cap_sto_p_new = pyomo.Var(
    m.sto_tuples,
    within=pyomo.NonNegativeReals,
    doc='New  storage power (MW)')

Storage Power Flow (Input), \(\epsilon_{vst}^\text{in}\), e_sto_in: The variable \(\epsilon_{vst}^\text{in}\) represents the input power flow into a storage tuple \(s_{vc}\) at a timestep \(t\). Input power flow into a storage tuple can also be defined as the charge of a storage tuple. This variable is expressed in the unit MW. In script urbs.py this variable is defined by the model variable e_sto_in and initialized by the following code fragment:

m.e_sto_in = pyomo.Var(
    m.tm, m.sto_tuples,
    within=pyomo.NonNegativeReals,
    doc='Power flow into storage (MW) per timestep')

Storage Power Flow (Output), \(\epsilon_{vst}^\text{out}\), e_sto_out: The variable \(\epsilon_{vst}^\text{out}\) represents the output power flow out of a storage tuple \(s_{vc}\) at a timestep \(t\). Output power flow out of a storage tuple can also be defined as the discharge of a storage tuple. This variable is expressed in the unit MW. In script urbs.py this variable is defined by the model variable e_sto_out and initialized by the following code fragment:

m.e_sto_out = pyomo.Var(
    m.tm, m.sto_tuples,
    within=pyomo.NonNegativeReals,
    doc='Power flow out of storage (MW) per timestep')

Storage Energy Content, \(\epsilon_{vst}^\text{con}\), e_sto_con: The variable \(\epsilon_{vst}^\text{con}\) represents the energy amount that is loaded in a storage tuple \(s_{vc}\) at a timestep \(t\). This variable is expressed in the unit MWh. In script urbs.py this variable is defined by the model variable e_sto_out and initialized by the following code fragment:

m.e_sto_con = pyomo.Var(
    m.t, m.sto_tuples,
    within=pyomo.NonNegativeReals,
    doc='Energy content of storage (MWh) in timestep')

Demand Side Management Variables

DSM Upshift, \(\delta_{vct}^\text{up}\), dsm_up, MW: The variable \(\delta_{vct}^\text{up}\) represents the DSM upshift in time step \(t\) in site \(v\) for commodity \(c\). It is only defined for all dsm_site_tuples. The following code fragment shows the definition of the variable:

m.dsm_up = pyomo.Var(
    m.tm, m.dsm_site_tuples,
    within=pyomo.NonNegativeReals,
    doc='DSM upshift')

DSM Downshift, \(\delta_{vct,tt}^\text{down}\), dsm_down, MW: The variable \(\delta_{vct,tt}^\text{down}\) represents the DSM downshift in timestepp \(tt\) caused by the upshift in time \(t\) in site \(v\) for commodity \(c\). The special combinations of timesteps \(t\) and \(tt\) for each site and commodity combination is created by the dsm_down_tuples. The definition of the variable is shown in the code fragment:

m.dsm_down = pyomo.Var(
    m.dsm_down_tuples,
    within=pyomo.NonNegativeReals,
    doc='DSM downshift')