Transmission class

Transmission components transmit commodities between locations.

Transmission class description:

class transmission.Transmission(esM, name, commodity, losses=0, distances=None, hasCapacityVariable=True, capacityVariableDomain='continuous', capacityPerPlantUnit=1, hasIsBuiltBinaryVariable=False, bigM=None, operationRateMax=None, operationRateFix=None, tsaWeight=1, locationalEligibility=None, capacityMin=None, capacityMax=None, partLoadMin=None, sharedPotentialID=None, linkedQuantityID=None, capacityFix=None, isBuiltFix=None, investPerCapacity=0, investIfBuilt=0, opexPerOperation=0, opexPerCapacity=0, opexIfBuilt=0, QPcostScale=0, interestRate=0.08, economicLifetime=10, technicalLifetime=None, balanceLimitID=None)[source]

A Transmission component can transmit a commodity between locations of the energy system.

Last edited: March 02, 2021
@author: FINE Developer Team (FZJ IEK-3)

__init__(esM, name, commodity, losses=0, distances=None, hasCapacityVariable=True, capacityVariableDomain='continuous', capacityPerPlantUnit=1, hasIsBuiltBinaryVariable=False, bigM=None, operationRateMax=None, operationRateFix=None, tsaWeight=1, locationalEligibility=None, capacityMin=None, capacityMax=None, partLoadMin=None, sharedPotentialID=None, linkedQuantityID=None, capacityFix=None, isBuiltFix=None, investPerCapacity=0, investIfBuilt=0, opexPerOperation=0, opexPerCapacity=0, opexIfBuilt=0, QPcostScale=0, interestRate=0.08, economicLifetime=10, technicalLifetime=None, balanceLimitID=None)[source]

Constructor for creating an Transmission class instance. The Transmission component specific input arguments are described below. The general component input arguments are described in the Component class.

Required arguments:

Parameters:commodity (string) – to the component related commodity.

Default arguments:

Parameters:
  • losses (positive float (0 <= float <= 1) or Pandas DataFrame with positive values (0 <= float <= 1) The row and column indices of the DataFrame have to equal the in the energy system model specified locations.) –

    relative losses per lengthUnit (lengthUnit as specified in the energy system model) in percentage of the commodity flow. This loss factor can capture simple linear losses

    trans_{in, ij} = (1 - text{losses} cdot text{distances})*trans_{out, ij}

    (with trans being the commodity flow at a certain point in time and i and j being locations in the energy system). The losses can either be given as a float or a Pandas DataFrame with location specific values.
    * the default value is 0

  • distances (positive float (>= 0) or Pandas DataFrame with positive values (>= 0) The row and column indices of the DataFrame have to equal the in the energy system model specified locations.) – distances between locations given in the lengthUnit (lengthUnit as specified in the energy system model).
    * the default value is None
  • operationRateMax (None or Pandas DataFrame with positive (>= 0) entries. The row indices have to match the in the energy system model specified time steps. The column indices are combinations of locations (as defined in the energy system model), separated by a underscore (e.g. "location1_location2") The first location indicates where the commodity is coming from. The second location indicates where the commodity is going too. If a flow is specified from location i to location j, it also has to be specified from j to i.) – if specified, indicates a maximum operation rate for all possible connections (both directions) of the transmission component at each time step by a positive float. If hasCapacityVariable is set to True, the values are given relative to the installed capacities (i.e. a value of 1 indicates a utilization of 100% of the capacity). If hasCapacityVariable is set to False, the values are given as absolute values in form of the commodityUnit, referring to the transmitted commodity (before considering losses) during one time step.
    * the default value is None
  • operationRateFix (None or Pandas DataFrame with positive (>= 0) entries. The row indices have to match the in the energy system model specified time steps. The column indices are combinations of locations (as defined in the energy system model), separated by a underscore (e.g. "location1_location2") The first location indicates where the commodity is coming from. The second one location indicates where the commodity is going too. If a flow is specified from location i to location j, it also has to be specified from j to i.) – if specified, indicates a fixed operation rate for all possible connections (both directions) of the transmission component at each time step by a positive float. If hasCapacityVariable is set to True, the values are given relative to the installed capacities (i.e. a value of 1 indicates a utilization of 100% of the capacity). If hasCapacityVariable is set to False, the values are given as absolute values in form of the commodityUnit, referring to the transmitted commodity (before considering losses) during one time step.
    * the default value is None
  • tsaWeight (positive (>= 0) float) – weight with which the time series of the component should be considered when applying time series aggregation.
    * the default value is 1
  • opexPerOperation (positive (>=0) float or Pandas DataFrame with positive (>=0) values. The row and column indices of the DataFrame have to equal the in the energy system model specified locations.) – describes the cost for one unit of the operation. The cost which is directly proportional to the operation of the component is obtained by multiplying the opexPerOperation parameter with the annual sum of the operational time series of the components. The opexPerOperation can either be given as a float or a Pandas DataFrame with location specific values. The cost unit in which the parameter is given has to match the one specified in the energy system model (e.g. Euro, Dollar, 1e6 Euro). The value has to match the unit costUnit/operationUnit (e.g. Euro/kWh, Dollar/kWh).
    * the default value is 0
  • balanceLimitID (string) – ID for the respective balance limit (out of the balance limits introduced in the esM). Should be specified if the respective component of the TransmissionModel is supposed to be included in the balance analysis. If the commodity is transported out of the region, it is counted as a negative, if it is imported into the region it is considered positive.
    * the default value is None
addToEnergySystemModel(esM)[source]

Function for adding a transmission component to the given energy system model.

Parameters:esM (EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
setTimeSeriesData(hasTSA)[source]

Function for setting the maximum operation rate and fixed operation rate depending on whether a time series analysis is requested or not.

Parameters:hasTSA (boolean) – states whether a time series aggregation is requested (True) or not (False).
getDataForTimeSeriesAggregation()[source]

Function for getting the required data if a time series aggregation is requested.

setAggregatedTimeSeriesData(data)[source]

Function for determining the aggregated maximum rate and the aggregated fixed operation rate.

Parameters:data (Pandas DataFrame) – Pandas DataFrame with the clustered time series data of the conversion component

Inheritance diagram:

Inheritance diagram of Transmission

TransmissionModel class description:

class transmission.TransmissionModel[source]

A TransmissionModel class instance will be instantly created if a Transmission class instance is initialized. It is used for the declaration of the sets, variables and constraints which are valid for the Transmission class instance. These declarations are necessary for the modeling and optimization of the energy system model. The TransmissionModel class inherits from the ComponentModel class.

declareSets(esM, pyM)[source]

Declare sets: design variable sets, operation variable set and operation mode sets.

Parameters:
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
declareVariables(esM, pyM, relaxIsBuiltBinary)[source]

Declare design and operation variables

Parameters:
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
symmetricalCapacity(pyM)[source]

Ensure that the capacity between location_1 and location_2 is the same as the one between location_2 and location_1.

cap^{comp}_{(loc_1,loc_2)} = cap^{comp}_{(loc_2,loc_1)}

Parameters:pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
operationMode1_2dim(pyM, esM, constrName, constrSetName, opVarName)[source]

Declare the constraint that the operation [commodityUnit*hour] is limited by the installed capacity [commodityUnit] multiplied by the hours per time step. Since the flow should either go in one direction or the other, the limitation can be enforced on the sum of the forward and backward flow over the line. This leads to one of the flow variables being set to zero if a basic solution is obtained during optimization.

op^{comp,op}_{(loc_1,loc_2),p,t} + op^{op}_{(loc_2,loc_1),p,t} \leq \tau^{hours} \cdot \text{cap}^{comp}_{(loc_{in},loc_{out})}

Parameters:
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
declareComponentConstraints(esM, pyM)[source]

Declare time independent and dependent constraints

Parameters:
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
getSharedPotentialContribution(pyM, key, loc)[source]

Get contributions to shared location potential.

hasOpVariablesForLocationCommodity(esM, loc, commod)[source]

Check if the commodity´s transfer between a given location and the other locations of the energy system model is eligible.

Parameters:
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
  • loc (string) – Name of the regarded location (locations are defined in the EnergySystemModel instance)
  • commod – Name of the regarded commodity (commodities are defined in the EnergySystemModel instance)
  • commod – string
getCommodityBalanceContribution(pyM, commod, loc, p, t)[source]

Get contribution to a commodity balance.

\begin{eqnarray*}
\text{C}^{comp,comm}_{loc,p,t} = & & \underset{\substack{(loc_{in},loc_{out}) \in \ \mathcal{L}^{tans}: loc_{in}=loc}}{ \sum } \left(1-\eta_{(loc_{in},loc_{out})} \cdot I_{(loc_{in},loc_{out})} \right) \cdot op^{comp,op}_{(loc_{in},loc_{out}),p,t} \\
& - & \underset{\substack{(loc_{in},loc_{out}) \in \ \mathcal{L}^{tans}:loc_{out}=loc}}{ \sum } op^{comp,op}_{(loc_{in},loc_{out}),p,t}
\end{eqnarray*}

getBalanceLimitContribution(esM, pyM, ID, loc, timeSeriesAggregation)[source]

Get contribution to balanceLimitConstraint (Further read in EnergySystemModel). Sum of the operation time series of a Transmission component is used as the balanceLimit contribution: - If commodity is transferred out of region a negative sign is used. - If commodity is transferred into region a positive sign is used and losses are considered. Sum of the operation time series of a Transmission component is used as the balanceLimit contribution:

Parameters:
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
  • pym (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
  • ID – ID of the regarded balanceLimitConstraint
  • ID – string
  • timeSeriesAggregation (boolean) – states if the optimization of the energy system model should be done with (a) the full time series (False) or (b) clustered time series data (True).
  • loc (string) – Name of the regarded location (locations are defined in the EnergySystemModel instance)
getObjectiveFunctionContribution(esM, pyM)[source]

Get contribution to the objective function.

Parameters:
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
setOptimalValues(esM, pyM)[source]

Set the optimal values of the components.

Parameters:
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
getOptimalValues(name='all')[source]

Return optimal values of the components.

Parameters:name – name of the variables of which the optimal values should be returned:
  • ‘capacityVariables’,
  • ‘isBuiltVariables’,
  • ‘operationVariablesOptimum’,
  • ‘all’ or another input: all variables are returned.


* the default value is ‘all’ :type name: string

Returns:a dictionary with the optimal values of the components
Return type:dict

Inheritance diagram:

Inheritance diagram of TransmissionModel