Subclasses¶
FINE subclasses provide additional specialized component formulations.
ConversionDynamic¶
conversionDynamic
¶
Classes:
-
ConversionDynamic–Extension of the conversion class with more specific ramping behavior.
-
ConversionDynamicModel–A ConversionDynamicModel class instance will be instantly created if a ConversionDynamic class instance is initialized.
ConversionDynamic
¶
ConversionDynamic(
esM,
name,
physicalUnit,
commodityConversionFactors,
downTimeMin=None,
upTimeMin=None,
useTemporalCyclicConstraints=True,
**kwargs,
)
Bases: Conversion
Extension of the conversion class with more specific ramping behavior.
Create a ConversionDynamic class instance. The ConversionDynamic component specific input arguments are described below. The Conversion specific input arguments are described in the Conversion class and the general component input arguments are described in the Component class.
Default arguments:
:param downTimeMin: if specified, indicates minimal down time of the component [hours]. |br| * the default value is None :type downTimeMin: None or integer value in range [0,numberOfTimeSteps*hoursPerTimeStep]
:param upTimeMin: if specified, indicates minimal up time of the component [hours]. |br| * the default value is None :type upTimeMin: None or integer value in range [0,numberOfTimeSteps*hoursPerTimeStep]
:param useTemporalCyclicConstraints: If True, the temporal cyclic constraints are used. This means that the operation of the first time steps are mathematically linked to the operation of the last time steps. |br| * the default value is True :type useTemporalCyclicConstraints: boolean
:param kwargs: All other keyword arguments of the conversion class can be defined as well. :type kwargs: Check Conversion Class documentation.
Methods:
-
addToEnergySystemModel–Add the component to an EnergySystemModel instance (esM). If the respective component class is not already in
-
getDataForTimeSeriesAggregation–Get the required data if a time series aggregation is requested.
-
getTSAOutput–Return a reformatted time series data after applying time series aggregation, if the original time series
-
prepareTSAInput–Format the time series data of a component to fit the requirements of the time series aggregation package and
-
setAggregatedTimeSeriesData–Determine the aggregated maximum rate and the aggregated fixed operation rate.
-
setTimeSeriesData–Set the maximum operation rate and fixed operation rate depending on whether a time series
addToEnergySystemModel
¶
Add the component to an EnergySystemModel instance (esM). If the respective component class is not already in the esM, it is added as well.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel instance
getDataForTimeSeriesAggregation
¶
Get the required data if a time series aggregation is requested.
:param ip: investment period of transformation path analysis. :type ip: int
getTSAOutput
¶
Return a reformatted time series data after applying time series aggregation, if the original time series data is not None.
:param rate: Full (unclustered) time series data or None :type rate: Pandas DataFrame or None
:param rateName: name of the time series (to ensure uniqueness if a component has multiple relevant time series) :type rateName: string
:param data: Pandas DataFrame with the clustered time series data of all components in the energy system :type data: Pandas DataFrame
:param ip: investment period of transformation path analysis. :type ip: int
:return: reformatted data or None :rtype: Pandas DataFrame
prepareTSAInput
¶
Format the time series data of a component to fit the requirements of the time series aggregation package and return a list of formatted data.
:param rate: a fixed/maximum/minimum operation time series or None :type rate: Pandas DataFrame or None
:param rateName: name of the time series (to ensure uniqueness if a component has multiple relevant time series) :type rateName: string
:param rateWeight: weight of the time series in the clustering process :type rateWeight: positive float (>=0)
:param weightDict: dictionary to which the weight is added :type weightDict: dict
:param data: list to which the formatted data is added :type data: list of Pandas DataFrames
:param ip: investment period of transformation path analysis. :type ip: int
:return: data :rtype: Pandas DataFrame
setAggregatedTimeSeriesData
¶
Determine the aggregated maximum rate and the aggregated fixed operation rate.
:param data: Pandas DataFrame with the clustered time series data of the conversion component :type data: Pandas DataFrame
:param ip: investment period of transformation path analysis. :type ip: int
setTimeSeriesData
¶
Set the maximum operation rate and fixed operation rate depending on whether a time series analysis is requested or not.
:param hasTSA: states whether a time series aggregation is requested (True) or not (False). :type hasTSA: boolean
ConversionDynamicModel
¶
Bases: ConversionModel
A ConversionDynamicModel class instance will be instantly created if a ConversionDynamic class instance is initialized. It is used for the declaration of the sets, variables and constraints which are valid for the ConversionDynamic class instance. These declarations are necessary for the modeling and optimization of the energy system model. The ConversionDynamicModel class inherits from the ConversionModel class.
Methods:
-
additionalMinPartLoad–Set, if applicable, the minimal part load of a component.
-
bigM–Enforce the consideration of the binary design variables of a component.
-
binaryOperation–Create binary operation constraints for component operation.
-
capToNbInt–Determine the components' capacities from the number of installed units.
-
capToNbReal–Determine the components' capacities from the number of installed units.
-
capacityMinDec–Enforce the consideration of minimum capacities for components with design decision variables.
-
declareBinOpVarSet–Declare binary operation variables.
-
declareBinaryDesignDecisionVars–Declare binary variables [-] indicating if a component is considered at a location or not [-].
-
declareCapacityVars–Declare capacity variables.
-
declareCommissioningVarSet–Declare set for commissioning variables in the pyomo object for a modeling class.
-
declareCommissioningVars–Declare commissioning variable for capacity development of component.
-
declareComponentConstraints–Declare time independent and dependent constraints.
-
declareContinuousDesignVarSet–Declare set for continuous number of installed components in the pyomo object for a modeling class.
-
declareDecommissioningVars–Declare decommissioning variable for capacity development of component.
-
declareDesignDecisionVarSet–Declare set for design decision variables in the pyomo object for a modeling class.
-
declareDesignVarSet–Declare set for capacity variables in the pyomo object for a modeling class.
-
declareDiscreteDesignVarSet–Declare set for discrete number of installed components in the pyomo object for a modeling class.
-
declareFlexFlowShareConstrSet–Declare set for flow share constraints based on the processed flow shares parameter.
-
declareIntNumbersVars–Declare variables representing the (discrete/integer) number of installed components [-].
-
declareLinkedCapacityDict–Declare conversion components with linked capacities and check if the linked components have the same
-
declareLocationComponentSet–Declare set with location and component in the pyomo object for a modeling class.
-
declareOpCommisConstrSet1–Declare set of locations and components for which hasCapacityVariable is set to True and neither the
-
declareOpCommisConstrSet2–Declare set of locations and components for which hasCapacityVariable is set to True and a fixed
-
declareOpCommisConstrSet3–Declare set of locations and components for which hasCapacityVariable is set to True and a maximum
-
declareOpCommisConstrSet4–Declare set of locations and components for which hasCapacityVariable is set to True and a minimum
-
declareOpCommisConstrSetMinPartLoad–Declare set of locations and components for which partLoadMin is not None.
-
declareOpCommisVarSet–Declare the operation set for components that have commodity conversion factors that depend on the
-
declareOpConstrSet1–Declare set of locations and components for which hasCapacityVariable is set to True and neither the
-
declareOpConstrSet2–Declare set of locations and components for which hasCapacityVariable is set to True and a fixed
-
declareOpConstrSet3–Declare set of locations and components for which hasCapacityVariable is set to True and a maximum
-
declareOpConstrSet4–Declare set of locations and components for which hasCapacityVariable is set to True and a minimum
-
declareOpConstrSetMinPartLoad–Declare set of locations and components for which partLoadMin is not None.
-
declareOpFlexVarSets–Declare commodity specific operation variable set for flexible conversion components in the pyomo object
-
declareOpVarSet–Declare operation related sets (operation variables and mapping sets) in the pyomo object for a
-
declareOperationBinaryVars–Declare binary operation variables.
-
declareOperationModeSets–Declare operation mode and commissioning constraint sets.
-
declareOperationVars–Declare operation variables.
-
declarePathwaySets–Declare set for capacity development in the pyomo object for a modeling class.
-
declareRampingConstraints–Set up the ramping contraints.
-
declareRampingVarSets–Declare ramping constraint sets if ramp rates are given.
-
declareRealNumbersVars–Declare variables representing the (continuous) number of installed components [-].
-
declareSets–Declare sets and dictionaries: design variable sets, operation variable set, operation mode sets and
-
declareVariables–Declare design and operation variables.
-
declareYearlyFullLoadHoursCommisMaxSet–Declare set of locations and components for which maximum yearly full load hours are given.
-
declareYearlyFullLoadHoursCommisMinSet–Declare set of locations and components for which minimum yearly full load hours are given.
-
declareYearlyFullLoadHoursMaxSet–Declare set of locations and components for which maximum yearly full load hours are given.
-
declareYearlyFullLoadHoursMinSet–Declare set of locations and components for which minimum yearly full load hours are given.
-
decommissioningConstraint–Declase the decommissioning after the technical lifetime from investment
-
designBinFix–Set, if applicable, the installed capacities of a component.
-
designDevelopmentConstraint–Link the capacity development between investment periods.
-
flexConversionConstraint–Declare constraint that ensures that the sum of all flexible operation variables of one component are equal
-
flexConversionFlowShareConstraint–Declare constraint that applies flow shares for each flexible component.
-
getCommodityBalanceContribution–Get contribution to a commodity balance.
-
getEconomicsDesign–Set design dependent cost equations for the individual components. The equations will be set
-
getEconomicsOperation–Set time-dependent equations for the individual components. The equations will be set for all components of a modeling class
-
getLocEconomicsDesign–Set time-independent equation specified for one component in one location in one investment period.
-
getLocEconomicsOperation–Set time-dependent cost functions for the individual components. The equations will be set for all components
-
getObjectiveFunctionContribution–Get contribution to the objective function.
-
getOptimalValues–Return optimal values of the components.
-
getSharedPotentialContribution–Get the share which the components of the modeling class have on a shared maximum potential at a location.
-
getTotalOperationCommissioningDependentOperation–Ensure that the sum of all commissioning dependent operating variables equals the total operating variable
-
hasOpVariablesForLocationCommodity–Check if operation variables exist in the modeling class at a location which are connected to a commodity.
-
interPeriodRamping–Add inter-period ramping constraints for operation variables.
-
linkedCapacity–Ensure that all Conversion components with the same linkedConversionCapacityID have the same capacity.
-
minimumTimeConstraints–Define minimum up and down time constraints.
-
operationMode1–Define operation mode 1. The operation [commodityUnit*h] is limited by the installed capacity in:\n
-
operationMode2–Define operation mode 2.
-
operationMode3–Define operation mode 3.
-
operationMode4–Define operation mode 4.
-
setOptimalValues–Set the optimal values of the components.
-
stockCapacityConstraint–Set the stock capacity constraint. The stock capacity is the sum of the stock
-
stockCommissioningConstraint–Set commissioning variable for past investment periods. For past investment periods,
-
yearlyFullLoadHoursMax–Limit the annual full load hours to a maximum value.
-
yearlyFullLoadHoursMin–Limit the annual full load hours to a minimum value.
additionalMinPartLoad
¶
additionalMinPartLoad(
pyM,
esM,
constrName,
constrSetName,
opVarName,
opVarBinName,
capVarName,
isOperationCommisYearDepending=False,
)
Set, if applicable, the minimal part load of a component.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
bigM
¶
Enforce the consideration of the binary design variables of a component.
.. math::
\\text{M}^{comp} \\cdot bin^{comp}_{loc,ip} \\geq commis^{comp}_{loc,ip}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
binaryOperation
¶
binaryOperation(
pyM,
constrName,
constrSetName,
binaryParameterName,
opVarName,
opVarBinName,
isOperationCommisYearDepending=False,
)
Create binary operation constraints for component operation.
Defines two constraints linking a continuous operation variable to its corresponding binary variable using the Big-M formulation. Handles both standard and commissioning year-dependent cases.
The binaryOperation1 constraint is used to force the binary variable to one if the continuous variable is greater than zero.
The binaryOperation2 constraint ensures that the continuous variable is greater than zero whenever the binary variable is one. This is used for the upTimeMin and downTimeMin feature.
capToNbInt
¶
Determine the components' capacities from the number of installed units.
.. math::
cap^{comp}_{loc} = \\text{capPerUnit}^{comp} \\cdot nbInt^{comp}_{loc}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
capToNbReal
¶
Determine the components' capacities from the number of installed units.
.. math::
cap^{comp}_{loc} = \\text{capPerUnit}^{comp} \\cdot nbReal^{comp}_{loc}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
capacityMinDec
¶
Enforce the consideration of minimum capacities for components with design decision variables.
Minimal capacity which needs to be reached for every investment period with commissioning. As the commisBinVar is coupled with commissioning var, constraint only sets minimal Capacity if component is commissioned. Therefore decommissioning of the component is possible without any constraints.
.. math::
\\text{capMin}^{comp}_{loc} \\cdot commisBin^{comp}_{loc,ip} \\leq cap^{comp}_{loc,ip}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareBinOpVarSet
¶
declareBinOpVarSet(
esM,
pyM,
binaryOperationParameter=["partLoadMin"],
binaryOperationSetName="operationBinVarSet",
)
Declare binary operation variables.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareBinaryDesignDecisionVars
¶
Declare binary variables [-] indicating if a component is considered at a location or not [-].
If a isBuiltFix parameter is given, the bounds are set to enforce
.. math:: bin^{comp}{loc} = \text{binFix}^{comp}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareCapacityVars
¶
Declare capacity variables.
.. math::
\\text{capMin}^{comp}_{loc} \\leq cap^{comp}_{loc} \\leq \\text{capMax}^{comp}_{loc}
If a capacityFix parameter is given, the bounds are set to enforce
.. math:: \text{cap}^{comp}{loc} = \text{capFix}^{comp}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareCommissioningVarSet
¶
Declare set for commissioning variables in the pyomo object for a modeling class.
The commissioning variable must be set for past investment periods (stock commissioning) and future/optimized investment periods
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareCommissioningVars
¶
Declare commissioning variable for capacity development of component.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareComponentConstraints
¶
Declare time independent and dependent constraints.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
declareContinuousDesignVarSet
¶
Declare set for continuous number of installed components in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareDecommissioningVars
¶
Declare decommissioning variable for capacity development of component.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareDesignDecisionVarSet
¶
Declare set for design decision variables in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareDesignVarSet
¶
Declare set for capacity variables in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareDiscreteDesignVarSet
¶
Declare set for discrete number of installed components in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareFlexFlowShareConstrSet
¶
Declare set for flow share constraints based on the processed flow shares parameter.
declareIntNumbersVars
¶
Declare variables representing the (discrete/integer) number of installed components [-].
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareLinkedCapacityDict
¶
Declare conversion components with linked capacities and check if the linked components have the same locational eligibility.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareLocationComponentSet
¶
Declare set with location and component in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareOpCommisConstrSet1
¶
Declare set of locations and components for which hasCapacityVariable is set to True and neither the maximum nor the fixed operation rate is given.
declareOpCommisConstrSet2
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a fixed operation rate is given.
declareOpCommisConstrSet3
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a maximum operation rate is given.
declareOpCommisConstrSet4
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a minimum operation rate is given.
declareOpCommisConstrSetMinPartLoad
¶
Declare set of locations and components for which partLoadMin is not None.
declareOpCommisVarSet
¶
Declare the operation set for components that have commodity conversion factors that depend on the year in the pyomo object for a modeling class.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareOpConstrSet1
¶
Declare set of locations and components for which hasCapacityVariable is set to True and neither the maximum nor the fixed operation rate is given.
declareOpConstrSet2
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a fixed operation rate is given.
declareOpConstrSet3
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a maximum operation rate is given.
declareOpConstrSet4
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a minimum operation rate is given.
declareOpConstrSetMinPartLoad
¶
Declare set of locations and components for which partLoadMin is not None.
declareOpFlexVarSets
¶
Declare commodity specific operation variable set for flexible conversion components in the pyomo object for a modeling class.
declareOpVarSet
¶
Declare operation related sets (operation variables and mapping sets) in the pyomo object for a modeling class.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareOperationBinaryVars
¶
Declare binary operation variables.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareOperationModeSets
¶
Declare operation mode and commissioning constraint sets.
Extends the parent class implementation and adds multiple commissioning-related constraint sets to the Pyomo model.
declareOperationVars
¶
declareOperationVars(
pyM,
esM,
opVarName,
opRateFixName="processedOperationRateFix",
opRateMaxName="processedOperationRateMax",
isOperationCommisYearDepending=False,
flexibleConversion=False,
relevanceThreshold=None,
)
Declare operation variables.
The following operation modes are directly handled during variable creation as bounds instead of constraints.
operation mode 4: If operationRateFix is given for components without a capacity variable, the variables are fixed with operationRateFix, i.e. the operation [commodityUnit*h] is equal to a time series.
.. math:: op^{comp,opType}{loc,p,t} = \text{opRateFix}^{comp,opType}
operation mode 5: If operationRateMax is given for components without a capacity variable, the variables are bounded by operationRateMax, i.e. the operation [commodityUnit*h] is limited by a time series.
.. math:: op^{comp,opType}{loc,p,t} \leq \text{opRateMax}^{comp,opType}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param relevanceThreshold: Force operation parameters to be 0 if values are below the relevance threshold. |br| * the default value is None :type relevanceThreshold: float (>=0) or None
:param isOperationCommisYearDepending: defines whether the operation variable is depending on the year of commissioning of the component. E.g. relevant if the commodity conversion, for example the efficiency, varies over the transformation pathway :type isOperationCommisYearDepending: str
declarePathwaySets
¶
Declare set for capacity development in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareRampingConstraints
¶
Set up the ramping contraints.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param rampingType: Type of ramping constraints to set up. Can be either rampDownMax or rampUpMax |br| * the default value is None.
declareRampingVarSets
¶
Declare ramping constraint sets if ramp rates are given.
declareRealNumbersVars
¶
Declare variables representing the (continuous) number of installed components [-].
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareSets
¶
Declare sets and dictionaries: design variable sets, operation variable set, operation mode sets and linked components dictionary.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareVariables
¶
Declare design and operation variables.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param relaxIsBuiltBinary: states if the optimization problem should be solved as a relaxed LP to get the lower bound of the problem. |br| * the default value is False :type declaresOptimizationProblem: boolean
:param relevanceThreshold: Force operation parameters to be 0 if values are below the relevance threshold. |br| * the default value is None :type relevanceThreshold: float (>=0) or None
declareYearlyFullLoadHoursCommisMaxSet
¶
Declare set of locations and components for which maximum yearly full load hours are given.
declareYearlyFullLoadHoursCommisMinSet
¶
Declare set of locations and components for which minimum yearly full load hours are given.
declareYearlyFullLoadHoursMaxSet
¶
Declare set of locations and components for which maximum yearly full load hours are given.
declareYearlyFullLoadHoursMinSet
¶
Declare set of locations and components for which minimum yearly full load hours are given.
decommissioningConstraint
¶
Declase the decommissioning after the technical lifetime from investment period of commissioning.
.. math::
decommis^{comp}_{loc,ip} = commis^{comp}_{loc,ip-\\mathrm{ipTechnicalLifetime}}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
designBinFix
¶
Set, if applicable, the installed capacities of a component.
.. math::
bin^{comp}_{(loc_1,loc_2),ip} = \\text{binFix}^{comp}_{(loc_1,loc_2)}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
designDevelopmentConstraint
¶
Link the capacity development between investment periods.
For stochastic: The capacity design must be equal between the different years.
.. math::
cap^{comp}_{loc,ip+1} = cap^{comp}_{loc,ip}
For the development pathway, the capacity of an investment period is composed of the capacity of the previous investment periods and the commissioning and decommissioning in the current investment period.
.. math::
cap^{comp}_{loc,ip+1} = cap^{comp}_{loc,ip} + commis^{comp}_{loc,ip} - decommis^{comp}_{loc,ip}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
flexConversionConstraint
¶
Declare constraint that ensures that the sum of all flexible operation variables of one component are equal to the overall operation of this component.
flexConversionFlowShareConstraint
¶
Declare constraint that applies flow shares for each flexible component.
getCommodityBalanceContribution
¶
Get contribution to a commodity balance.
.. math::
\\text{C}^{comp,comm}_{loc,ip,p,t} = \\text{conversionFactor}^{comp}_{comm} \\cdot op_{loc,ip,p,t}^{comp,op}
getEconomicsDesign
¶
getEconomicsDesign(
pyM,
esM,
factorNames,
lifetimeAttr,
varName,
divisorName="",
QPfactorNames=[],
QPdivisorNames=[],
getOptValue=False,
getOptValueCostType=TAC,
)
Set design dependent cost equations for the individual components. The equations will be set for all components of a modeling class and all locations.
Required arguments
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
:param factorNames: Strings of the parameters that have to be multiplied within the equation. (e.g. ['processedInvestPerCapacity'] to multiply the capacity variable with the investment per each capacity unit). :type factorNames: list of strings
:param varName: String of the variable that has to be multiplied within the equation (e.g. 'cap' for capacity variable). :type varName: string
:param divisorName: String of the variable that is used as a divisor within the equation (e.g. 'CCF'). If the divisorName is an empty string, there is no division within the equation. |br| * the default value is "". :type divisorName: string
:param QPfactorNames: Strings of the parameters that have to be multiplied when quadratic programming is used. (e.g. ['processedQPcostScale']) :type QPfactorNames: list of strings
:param QPdivisorNames: Strings of the parameters that have to be used as divisors when quadratic programming is used. (e.g. ['QPbound']) :type QPdivisorNames: list of strings
:param getOptValue: Boolean that defines the output of the function:
- True: Return the optimal cost values.
- False: Return the cost equation.
|br| * the default value is False.
:type getoptValue: boolean
:param getOptValueCostType: the cost type can either be TAC (total anualized costs) or NPV (net present value) |br| * the default value is None. :type getOptValueCostType: string
getEconomicsOperation
¶
getEconomicsOperation(
pyM,
esM,
fncType,
factorNames,
varName,
dictName,
getOptValue=False,
getOptValueCostType=TAC,
)
Set time-dependent equations for the individual components. The equations will be set for all components of a modeling class and all locations as well as for each considered time step. In case of a two-dimensional component (e.g. a transmission component), the equations will be set for all possible connections between the defined locations.
Required arguments:
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: EnergySystemModel instance representing the energy system in which the components should be modeled. :type esM: esM - EnergySystemModel class instance
:param fncType: Function type, either "TD" or "TimeSeries" :type fncType: string
:param factorNames: Strings of the time-dependent parameters that have to be multiplied within the equation. (e.g. ['opexPerOperation'] to multiply the operation variable with the costs for each operation). :type factorNames: list of strings
:param varName: String of the variable that has to be multiplied within the equation (e.g. 'op' for operation variable). :type varName: string
:param dictName: String of the variable set (e.g. 'operationVarDict') :type dictName: string
Default arguments:
:param getOptValue: Boolean that defines the output of the function:
- True: Return the optimal value.
- False: Return the equation.
|br| * the default value is False.
:type getoptValue: boolean
:param getOptValueCostType: the cost type can either be TAC (total annualized costs) or NPV (net present value) |br| * the default value is None. :type getOptValueCostType: string
getLocEconomicsDesign
¶
getLocEconomicsDesign(
pyM,
esM,
factorNames,
varName,
loc,
compName,
ip,
divisorName="",
QPfactorNames=[],
QPdivisorNames=[],
getOptValue=False,
)
Set time-independent equation specified for one component in one location in one investment period.
Required arguments:
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
:param factorNames: Strings of the parameters that have to be multiplied within the equation. (e.g. ['processedInvestPerCapacity'] to multiply the capacity variable with the investment per each capacity unit). :type factorNames: list of strings
:param varName: String of the variable that has to be multiplied within the equation (e.g. 'cap' for capacity variable). :type varName: string
:param loc: String of the location for which the equation should be set up. :type loc: string
:param compName: String of the component name for which the equation should be set up. :type compName: string
Default arguments:
:param ip: investment period :type ip: int
:param divisorName: String of the variable that is used as a divisor within the equation (e.g. 'CCF'). If the divisorName is an empty string, there is no division within the equation. |br| * the default value is ''. :type divisorName: string
:param QPfactorNames: Strings of the parameters that have to be multiplied when quadratic programming is used. (e.g. ['processedQPcostScale']) :type QPfactorNames: list of strings
:param QPdivisorNames: Strings of the parameters that have to be used as divisors when quadratic programming is used. (e.g. ['QPbound']) :type QPdivisorNames: list of strings
:param getOptValue: Boolean that defines the output of the function:
- True: Return the optimal value.
- False: Return the equation.
|br| * the default value is False.
:type getoptValue: boolean
getLocEconomicsOperation
¶
getLocEconomicsOperation(
pyM,
esM,
fncType,
factorNames,
varName,
loc,
compName,
ip,
getOptValue=False,
)
Set time-dependent cost functions for the individual components. The equations will be set for all components of a modeling class and all locations as well as for each considered time step.
Required arguments:
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: EnergySystemModel instance representing the energy system in which the components should be modeled. :type esM: esM - EnergySystemModel class instance
:param fncType: Function type, either "TD" or "TimeSeries :type fncType: string
:param factorName: String of the time-dependent parameter that have to be multiplied within the equation. (e.g. 'commodityCostTimeSeries' to multiply the operation variable with the costs for each operation). :type factorNames: string
:param varName: String of the variable that has to be multiplied within the equation (e.g. 'op' for operation variable). :type varName: string
:param dictName: String of the variable set (e.g. 'operationVarDict') :type dictName: string
:param loc: String of the location for which the equation should be set up. :type loc: string
:param compName: String of the component name for which the equation should be set up. :type compName: string
:param ip: investment period of transformation path analysis. :type ip: int
Default arguments:
:param getOptValue: Boolean that defines the output of the function:
- True: Return the optimal value.
- False: Return the equation.
|br| * the default value is False.
:type getoptValue: boolean
getObjectiveFunctionContribution
¶
Get contribution to the objective function.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
getOptimalValues
¶
Return optimal values of the components.
:param name: name of the variables of which the optimal values should be returned:
* 'capacityVariables',
* 'isBuiltVariables',
* 'operationVariablesOptimum',
* 'all' or another input: all variables are returned.
|br| * the default value is 'all' :type name: string
:param ip: investment period |br| * the default value is 0 :type ip: int
:returns: a dictionary with the optimal values of the components :rtype: dict
getSharedPotentialContribution
¶
Get the share which the components of the modeling class have on a shared maximum potential at a location.
getTotalOperationCommissioningDependentOperation
¶
Ensure that the sum of all commissioning dependent operating variables equals the total operating variable of that conversion component for each time step.
hasOpVariablesForLocationCommodity
¶
Check if operation variables exist in the modeling class at a location which are connected to a commodity.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param loc: Name of the regarded location (locations are defined in the EnergySystemModel instance) :type loc: string
:param commod: Name of the regarded commodity (commodities are defined in the EnergySystemModel instance) :param commod: string
interPeriodRamping
¶
Add inter-period ramping constraints for operation variables. This enforces a maximum allowed change in the dispatch between the last time step of period p–1 and the first time step of period p.
linkedCapacity
¶
Ensure that all Conversion components with the same linkedConversionCapacityID have the same capacity.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
minimumTimeConstraints
¶
Define minimum up and down time constraints.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param timeType: Type of time constraint to set up. Can be either "upTimeMin" or "downTimeMin" |br| * the default value is None.
operationMode1
¶
operationMode1(
pyM,
esM,
constrName,
constrSetName,
opVarName,
factorName=None,
*,
isOperationCommisYearDepending=False,
)
Define operation mode 1. The operation [commodityUnith] is limited by the installed capacity in:\n * [commodityUnith] (for storages) or in * [commodityUnit] multiplied by the hours per time step (else).\n An additional factor can limited the operation further.
.. math::
op^{comp,opType}_{loc,ip,p,t} \\leq \\tau^{hours} \\cdot \\text{opFactor}^{opType} \\cdot cap^{comp}_{loc,ip}
operationMode2
¶
operationMode2(
pyM,
esM,
constrName,
constrSetName,
opVarName,
opRateName="processedOperationRateFix",
*,
isOperationCommisYearDepending=False,
)
Define operation mode 2.
The operation [commodityUnith] is equal to the installed capacity multiplied with a time series in:\n * [commodityUnith] (for storages) or in * [commodityUnit] multiplied by the hours per time step (else).\n
.. math::
op^{comp,opType}_{loc,ip,p,t} \\leq \\tau^{hours} \\cdot \\text{opRateMax}^{comp,opType}_{loc,ip,p,t} \\cdot cap^{comp}_{loc,ip}
operationMode3
¶
operationMode3(
pyM,
esM,
constrName,
constrSetName,
opVarName,
opRateName="processedOperationRateMax",
*,
isOperationCommisYearDepending=False,
relevanceThreshold=None,
)
Define operation mode 3.
The operation [commodityUnith] is limited by an installed capacity multiplied with a time series in:\n * [commodityUnith] (for storages) or in * [commodityUnit] multiplied by the hours per time step (else).\n
.. math:: op^{comp,opType}{loc,ip,p,t} = \tau^{hours} \cdot \text{opRateFix}^{comp,opType}} \cdot cap^{comp}_{loc,ip
:param relevanceThreshold: Force operation parameters to be 0 if values are below the relevance threshold. |br| * the default value is None :type relevanceThreshold: float (>=0) or None
operationMode4
¶
operationMode4(
pyM,
esM,
constrName,
constrSetName,
opVarName,
opRateName="processedOperationRateMin",
*,
isOperationCommisYearDepending=False,
relevanceThreshold=None,
)
Define operation mode 4.
The operation [commodityUnith] is limited by an installed capacity multiplied with a time series in:\n * [commodityUnith] (for storages) or in * [commodityUnit] multiplied by the hours per time step (else).\n
.. math:: op^{comp,opType}{loc,ip,p,t} = \tau^{hours} \cdot \text{opRateFix}^{comp,opType}} \cdot cap^{comp}_{loc,ip
:param relevanceThreshold: Force operation parameters to be 0 if values are below the relevance threshold. |br| * the default value is None :type relevanceThreshold: float (>=0) or None
setOptimalValues
¶
Set the optimal values of the components.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
stockCapacityConstraint
¶
Set the stock capacity constraint. The stock capacity is the sum of the stock commissioning, which do not exceed its technical lifetime.
For stochastic, the stock of past investment periods is not only valid for ip=0 but for all investment periods. .. math::
cap^{comp}_{loc,ip} = stockCap^{comp}_{loc} + commis^{comp}_{loc,ip} - decommis^{comp}_{loc,0}
For capacity development, the stock is only considered for the first investment periods.
.. math::
cap^{comp}_{loc,0} = stockCap^{comp}_{loc} + commis^{comp}_{loc,0} - decommis^{comp}_{loc,0}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
stockCommissioningConstraint
¶
Set commissioning variable for past investment periods. For past investment periods, where no stock commissioning is specified the commissioning variable is set to zero.
yearlyFullLoadHoursMax
¶
yearlyFullLoadHoursMax(
pyM,
esM,
constrSetName,
constrName,
opVarName,
isOperationCommisYearDepending=False,
)
Limit the annual full load hours to a maximum value.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param constrName: name for the constraint in esM.pyM :type constrName: str
:param constrSetName: name of the constraint set :type constrSetName: str
:param opVarName: name of the operation variables :type opVarName: str
:param isOperationCommisYearDepending: defines whether the operation variable is depending on the year of commissioning of the component. E.g. relevant if the commodity conversion, for example the efficiency, varies over the transformation pathway :type isOperationCommisYearDepending: str
yearlyFullLoadHoursMin
¶
yearlyFullLoadHoursMin(
pyM,
esM,
constrSetName,
constrName,
opVarName,
isOperationCommisYearDepending=False,
)
Limit the annual full load hours to a minimum value.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param constrName: name for the constraint in esM.pyM :type constrName: str
:param constrSetName: name of the constraint set :type constrSetName: str
:param opVarName: name of the operation variables :type opVarName: str
:param isOperationCommisYearDepending: defines whether the operation variable is depending on the year of commissioning of the component. E.g. relevant if the commodity conversion, for example the efficiency, varies over the transformation pathway :type isOperationCommisYearDepending: str
LOPF¶
lopf
¶
Classes:
-
LOPFModel–A LOPFModel class instance will be instantly created if a LinearOptimalPowerFlow class instance is initialized.
-
LinearOptimalPowerFlow–A LinearOptimalPowerFlow component shows the behavior of a Transmission component but additionally models a
LOPFModel
¶
Bases: TransmissionModel
A LOPFModel class instance will be instantly created if a LinearOptimalPowerFlow class instance is initialized. It is used for the declaration of the sets, variables and constraints which are valid for the LinearOptimalPowerFlow class instance. These declarations are necessary for the modeling and optimization of the energy system model. The LOPFModel class inherits from the TransmissionModel class.
Methods:
-
additionalMinPartLoad–Set, if applicable, the minimal part load of a component.
-
basePhaseAngle–Declare the constraint that the reference phase angle is set to zero for all time steps.
-
bigM–Enforce the consideration of the binary design variables of a component.
-
binaryOperation–Create binary operation constraints for component operation.
-
capToNbInt–Determine the components' capacities from the number of installed units.
-
capToNbReal–Determine the components' capacities from the number of installed units.
-
capacityMinDec–Enforce the consideration of minimum capacities for components with design decision variables.
-
declareBinOpVarSet–Declare binary operation variables.
-
declareBinaryDesignDecisionVars–Declare binary variables [-] indicating if a component is considered at a location or not [-].
-
declareCapacityVars–Declare capacity variables.
-
declareCommissioningVarSet–Declare set for commissioning variables in the pyomo object for a modeling class.
-
declareCommissioningVars–Declare commissioning variable for capacity development of component.
-
declareComponentConstraints–Declare time independent and dependent constraints.
-
declareContinuousDesignVarSet–Declare set for continuous number of installed components in the pyomo object for a modeling class.
-
declareDecommissioningVars–Declare decommissioning variable for capacity development of component.
-
declareDesignDecisionVarSet–Declare set for design decision variables in the pyomo object for a modeling class.
-
declareDesignVarSet–Declare set for capacity variables in the pyomo object for a modeling class.
-
declareDiscreteDesignVarSet–Declare set for discrete number of installed components in the pyomo object for a modeling class.
-
declareIntNumbersVars–Declare variables representing the (discrete/integer) number of installed components [-].
-
declareLocationComponentSet–Declare set with location and component in the pyomo object for a modeling class.
-
declareOpConstrSet1–Declare set of locations and components for which hasCapacityVariable is set to True and neither the
-
declareOpConstrSet2–Declare set of locations and components for which hasCapacityVariable is set to True and a fixed
-
declareOpConstrSet3–Declare set of locations and components for which hasCapacityVariable is set to True and a maximum
-
declareOpConstrSet4–Declare set of locations and components for which hasCapacityVariable is set to True and a minimum
-
declareOpConstrSetMinPartLoad–Declare set of locations and components for which partLoadMin is not None.
-
declareOpVarSet–Declare operation related sets (operation variables and mapping sets) in the pyomo object for a
-
declareOperationBinaryVars–Declare binary operation variables.
-
declareOperationModeSets–Declare operating mode sets.
-
declareOperationVars–Declare operation variables.
-
declarePathwaySets–Declare set for capacity development in the pyomo object for a modeling class.
-
declarePhaseAngleVariables–Declare phase angle variables.
-
declareRealNumbersVars–Declare variables representing the (continuous) number of installed components [-].
-
declareSets–Declare sets and dictionaries: design variable sets, operation variable sets, operation mode sets and
-
declareVariables–Declare design and operation variables.
-
declareYearlyFullLoadHoursMaxSet–Declare set of locations and components for which maximum yearly full load hours are given.
-
declareYearlyFullLoadHoursMinSet–Declare set of locations and components for which minimum yearly full load hours are given.
-
decommissioningConstraint–Declase the decommissioning after the technical lifetime from investment
-
designBinFix–Set, if applicable, the installed capacities of a component.
-
designDevelopmentConstraint–Link the capacity development between investment periods.
-
getBalanceLimitContribution–Get contribution to balanceLimitConstraint (Further read in EnergySystemModel).
-
getCommodityBalanceContribution–Get contribution to a commodity balance.
-
getEconomicsDesign–Set design dependent cost equations for the individual components. The equations will be set
-
getEconomicsOperation–Set time-dependent equations for the individual components. The equations will be set for all components of a modeling class
-
getLocEconomicsDesign–Set time-independent equation specified for one component in one location in one investment period.
-
getLocEconomicsOperation–Set time-dependent cost functions for the individual components. The equations will be set for all components
-
getObjectiveFunctionContribution–Get contribution to the objective function.
-
getOptimalValues–Return optimal values of the components.
-
getSharedPotentialContribution–Get the share which the components of the modeling class have on a shared maximum potential at a location.
-
hasOpVariablesForLocationCommodity–Check if the commodity´s transfer between a given location and the other locations of the energy system model
-
initPhaseAngleVarSet–Declare phase angle variable set in the pyomo object for for each node.
-
operationMode1–Define operation mode 1. The operation [commodityUnit*h] is limited by the installed capacity in:\n
-
operationMode1_2dim–Declare the constraint that the operation [commodityUnit*hour] is limited by the installed
-
operationMode2–Define operation mode 2.
-
operationMode3–Define operation mode 3.
-
operationMode4–Define operation mode 4.
-
powerFlowDC–Ensure that the flow between two locations is equal to the difference between the phase angle variables at
-
setOptimalValues–Set the optimal values of the components.
-
stockCapacityConstraint–Set the stock capacity constraint. The stock capacity is the sum of the stock
-
stockCommissioningConstraint–Set commissioning variable for past investment periods. For past investment periods,
-
symmetricalCapacity–Ensure that the capacity between location_1 and location_2 is the same as the one
-
yearlyFullLoadHoursMax–Limit the annual full load hours to a maximum value.
-
yearlyFullLoadHoursMin–Limit the annual full load hours to a minimum value.
additionalMinPartLoad
¶
additionalMinPartLoad(
pyM,
esM,
constrName,
constrSetName,
opVarName,
opVarBinName,
capVarName,
isOperationCommisYearDepending=False,
)
Set, if applicable, the minimal part load of a component.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
basePhaseAngle
¶
Declare the constraint that the reference phase angle is set to zero for all time steps.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
bigM
¶
Enforce the consideration of the binary design variables of a component.
.. math::
\\text{M}^{comp} \\cdot bin^{comp}_{loc,ip} \\geq commis^{comp}_{loc,ip}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
binaryOperation
¶
binaryOperation(
pyM,
constrName,
constrSetName,
binaryParameterName,
opVarName,
opVarBinName,
isOperationCommisYearDepending=False,
)
Create binary operation constraints for component operation.
Defines two constraints linking a continuous operation variable to its corresponding binary variable using the Big-M formulation. Handles both standard and commissioning year-dependent cases.
The binaryOperation1 constraint is used to force the binary variable to one if the continuous variable is greater than zero.
The binaryOperation2 constraint ensures that the continuous variable is greater than zero whenever the binary variable is one. This is used for the upTimeMin and downTimeMin feature.
capToNbInt
¶
Determine the components' capacities from the number of installed units.
.. math::
cap^{comp}_{loc} = \\text{capPerUnit}^{comp} \\cdot nbInt^{comp}_{loc}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
capToNbReal
¶
Determine the components' capacities from the number of installed units.
.. math::
cap^{comp}_{loc} = \\text{capPerUnit}^{comp} \\cdot nbReal^{comp}_{loc}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
capacityMinDec
¶
Enforce the consideration of minimum capacities for components with design decision variables.
Minimal capacity which needs to be reached for every investment period with commissioning. As the commisBinVar is coupled with commissioning var, constraint only sets minimal Capacity if component is commissioned. Therefore decommissioning of the component is possible without any constraints.
.. math::
\\text{capMin}^{comp}_{loc} \\cdot commisBin^{comp}_{loc,ip} \\leq cap^{comp}_{loc,ip}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareBinOpVarSet
¶
declareBinOpVarSet(
esM,
pyM,
binaryOperationParameter=["partLoadMin"],
binaryOperationSetName="operationBinVarSet",
)
Declare binary operation variables.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareBinaryDesignDecisionVars
¶
Declare binary variables [-] indicating if a component is considered at a location or not [-].
If a isBuiltFix parameter is given, the bounds are set to enforce
.. math:: bin^{comp}{loc} = \text{binFix}^{comp}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareCapacityVars
¶
Declare capacity variables.
.. math::
\\text{capMin}^{comp}_{loc} \\leq cap^{comp}_{loc} \\leq \\text{capMax}^{comp}_{loc}
If a capacityFix parameter is given, the bounds are set to enforce
.. math:: \text{cap}^{comp}{loc} = \text{capFix}^{comp}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareCommissioningVarSet
¶
Declare set for commissioning variables in the pyomo object for a modeling class.
The commissioning variable must be set for past investment periods (stock commissioning) and future/optimized investment periods
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareCommissioningVars
¶
Declare commissioning variable for capacity development of component.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareComponentConstraints
¶
Declare time independent and dependent constraints.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
declareContinuousDesignVarSet
¶
Declare set for continuous number of installed components in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareDecommissioningVars
¶
Declare decommissioning variable for capacity development of component.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareDesignDecisionVarSet
¶
Declare set for design decision variables in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareDesignVarSet
¶
Declare set for capacity variables in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareDiscreteDesignVarSet
¶
Declare set for discrete number of installed components in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareIntNumbersVars
¶
Declare variables representing the (discrete/integer) number of installed components [-].
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareLocationComponentSet
¶
Declare set with location and component in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareOpConstrSet1
¶
Declare set of locations and components for which hasCapacityVariable is set to True and neither the maximum nor the fixed operation rate is given.
declareOpConstrSet2
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a fixed operation rate is given.
declareOpConstrSet3
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a maximum operation rate is given.
declareOpConstrSet4
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a minimum operation rate is given.
declareOpConstrSetMinPartLoad
¶
Declare set of locations and components for which partLoadMin is not None.
declareOpVarSet
¶
Declare operation related sets (operation variables and mapping sets) in the pyomo object for a modeling class.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareOperationBinaryVars
¶
Declare binary operation variables.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareOperationModeSets
¶
Declare operating mode sets.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param constrSetName: name of the constraint set. :type constrSetName: string
:param rateMax: attribute of the considered component which stores the maximum operation rate data. :type rateMax: string
:param rateMax: attribute of the considered component which stores the minimum operation rate data. :type rateMax: string
:param rateFix: attribute of the considered component which stores the fixed operation rate data. :type rateFix: string
declareOperationVars
¶
declareOperationVars(
pyM,
esM,
opVarName,
opRateFixName="processedOperationRateFix",
opRateMaxName="processedOperationRateMax",
isOperationCommisYearDepending=False,
flexibleConversion=False,
relevanceThreshold=None,
)
Declare operation variables.
The following operation modes are directly handled during variable creation as bounds instead of constraints.
operation mode 4: If operationRateFix is given for components without a capacity variable, the variables are fixed with operationRateFix, i.e. the operation [commodityUnit*h] is equal to a time series.
.. math:: op^{comp,opType}{loc,p,t} = \text{opRateFix}^{comp,opType}
operation mode 5: If operationRateMax is given for components without a capacity variable, the variables are bounded by operationRateMax, i.e. the operation [commodityUnit*h] is limited by a time series.
.. math:: op^{comp,opType}{loc,p,t} \leq \text{opRateMax}^{comp,opType}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param relevanceThreshold: Force operation parameters to be 0 if values are below the relevance threshold. |br| * the default value is None :type relevanceThreshold: float (>=0) or None
:param isOperationCommisYearDepending: defines whether the operation variable is depending on the year of commissioning of the component. E.g. relevant if the commodity conversion, for example the efficiency, varies over the transformation pathway :type isOperationCommisYearDepending: str
declarePathwaySets
¶
Declare set for capacity development in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declarePhaseAngleVariables
¶
Declare phase angle variables.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
declareRealNumbersVars
¶
Declare variables representing the (continuous) number of installed components [-].
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareSets
¶
Declare sets and dictionaries: design variable sets, operation variable sets, operation mode sets and linked components dictionary.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
declareVariables
¶
Declare design and operation variables.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
:param relaxIsBuiltBinary: states if the optimization problem should be solved as a relaxed LP to get the lower bound of the problem. |br| * the default value is False :type declaresOptimizationProblem: boolean
:param relevanceThreshold: Force operation parameters to be 0 if values are below the relevance threshold. |br| * the default value is None :type relevanceThreshold: float (>=0) or None
declareYearlyFullLoadHoursMaxSet
¶
Declare set of locations and components for which maximum yearly full load hours are given.
declareYearlyFullLoadHoursMinSet
¶
Declare set of locations and components for which minimum yearly full load hours are given.
decommissioningConstraint
¶
Declase the decommissioning after the technical lifetime from investment period of commissioning.
.. math::
decommis^{comp}_{loc,ip} = commis^{comp}_{loc,ip-\\mathrm{ipTechnicalLifetime}}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
designBinFix
¶
Set, if applicable, the installed capacities of a component.
.. math::
bin^{comp}_{(loc_1,loc_2),ip} = \\text{binFix}^{comp}_{(loc_1,loc_2)}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
designDevelopmentConstraint
¶
Link the capacity development between investment periods.
For stochastic: The capacity design must be equal between the different years.
.. math::
cap^{comp}_{loc,ip+1} = cap^{comp}_{loc,ip}
For the development pathway, the capacity of an investment period is composed of the capacity of the previous investment periods and the commissioning and decommissioning in the current investment period.
.. math::
cap^{comp}_{loc,ip+1} = cap^{comp}_{loc,ip} + commis^{comp}_{loc,ip} - decommis^{comp}_{loc,ip}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
getBalanceLimitContribution
¶
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:
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param pym: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pym: pyomo ConcreteModel
:param ip: investment period of transformation path analysis. :type ip: int
:param ID: ID of the regarded balanceLimitConstraint :param ID: string
:param timeSeriesAggregation: 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).
:type timeSeriesAggregation: boolean
:param loc: Name of the regarded location (locations are defined in the EnergySystemModel instance) :type loc: string
:param componentNames: Names of components which contribute to the balance limit :type componentNames: list
getCommodityBalanceContribution
¶
Get contribution to a commodity balance.
.. math:: :nowrap:
\\begin{eqnarray*}
\\text{C}^{comp,comm}_{loc,ip,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}),ip,p,t} \\\\
& - & \\underset{\\substack{(loc_{in},loc_{out}) \\in \\ \\mathcal{L}^{tans}:loc_{out}=loc}}{ \\sum } op^{comp,op}_{(loc_{in},loc_{out}),ip,p,t}
\\end{eqnarray*}
getEconomicsDesign
¶
getEconomicsDesign(
pyM,
esM,
factorNames,
lifetimeAttr,
varName,
divisorName="",
QPfactorNames=[],
QPdivisorNames=[],
getOptValue=False,
getOptValueCostType=TAC,
)
Set design dependent cost equations for the individual components. The equations will be set for all components of a modeling class and all locations.
Required arguments
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
:param factorNames: Strings of the parameters that have to be multiplied within the equation. (e.g. ['processedInvestPerCapacity'] to multiply the capacity variable with the investment per each capacity unit). :type factorNames: list of strings
:param varName: String of the variable that has to be multiplied within the equation (e.g. 'cap' for capacity variable). :type varName: string
:param divisorName: String of the variable that is used as a divisor within the equation (e.g. 'CCF'). If the divisorName is an empty string, there is no division within the equation. |br| * the default value is "". :type divisorName: string
:param QPfactorNames: Strings of the parameters that have to be multiplied when quadratic programming is used. (e.g. ['processedQPcostScale']) :type QPfactorNames: list of strings
:param QPdivisorNames: Strings of the parameters that have to be used as divisors when quadratic programming is used. (e.g. ['QPbound']) :type QPdivisorNames: list of strings
:param getOptValue: Boolean that defines the output of the function:
- True: Return the optimal cost values.
- False: Return the cost equation.
|br| * the default value is False.
:type getoptValue: boolean
:param getOptValueCostType: the cost type can either be TAC (total anualized costs) or NPV (net present value) |br| * the default value is None. :type getOptValueCostType: string
getEconomicsOperation
¶
getEconomicsOperation(
pyM,
esM,
fncType,
factorNames,
varName,
dictName,
getOptValue=False,
getOptValueCostType=TAC,
)
Set time-dependent equations for the individual components. The equations will be set for all components of a modeling class and all locations as well as for each considered time step. In case of a two-dimensional component (e.g. a transmission component), the equations will be set for all possible connections between the defined locations.
Required arguments:
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: EnergySystemModel instance representing the energy system in which the components should be modeled. :type esM: esM - EnergySystemModel class instance
:param fncType: Function type, either "TD" or "TimeSeries" :type fncType: string
:param factorNames: Strings of the time-dependent parameters that have to be multiplied within the equation. (e.g. ['opexPerOperation'] to multiply the operation variable with the costs for each operation). :type factorNames: list of strings
:param varName: String of the variable that has to be multiplied within the equation (e.g. 'op' for operation variable). :type varName: string
:param dictName: String of the variable set (e.g. 'operationVarDict') :type dictName: string
Default arguments:
:param getOptValue: Boolean that defines the output of the function:
- True: Return the optimal value.
- False: Return the equation.
|br| * the default value is False.
:type getoptValue: boolean
:param getOptValueCostType: the cost type can either be TAC (total annualized costs) or NPV (net present value) |br| * the default value is None. :type getOptValueCostType: string
getLocEconomicsDesign
¶
getLocEconomicsDesign(
pyM,
esM,
factorNames,
varName,
loc,
compName,
ip,
divisorName="",
QPfactorNames=[],
QPdivisorNames=[],
getOptValue=False,
)
Set time-independent equation specified for one component in one location in one investment period.
Required arguments:
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
:param factorNames: Strings of the parameters that have to be multiplied within the equation. (e.g. ['processedInvestPerCapacity'] to multiply the capacity variable with the investment per each capacity unit). :type factorNames: list of strings
:param varName: String of the variable that has to be multiplied within the equation (e.g. 'cap' for capacity variable). :type varName: string
:param loc: String of the location for which the equation should be set up. :type loc: string
:param compName: String of the component name for which the equation should be set up. :type compName: string
Default arguments:
:param ip: investment period :type ip: int
:param divisorName: String of the variable that is used as a divisor within the equation (e.g. 'CCF'). If the divisorName is an empty string, there is no division within the equation. |br| * the default value is ''. :type divisorName: string
:param QPfactorNames: Strings of the parameters that have to be multiplied when quadratic programming is used. (e.g. ['processedQPcostScale']) :type QPfactorNames: list of strings
:param QPdivisorNames: Strings of the parameters that have to be used as divisors when quadratic programming is used. (e.g. ['QPbound']) :type QPdivisorNames: list of strings
:param getOptValue: Boolean that defines the output of the function:
- True: Return the optimal value.
- False: Return the equation.
|br| * the default value is False.
:type getoptValue: boolean
getLocEconomicsOperation
¶
getLocEconomicsOperation(
pyM,
esM,
fncType,
factorNames,
varName,
loc,
compName,
ip,
getOptValue=False,
)
Set time-dependent cost functions for the individual components. The equations will be set for all components of a modeling class and all locations as well as for each considered time step.
Required arguments:
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: EnergySystemModel instance representing the energy system in which the components should be modeled. :type esM: esM - EnergySystemModel class instance
:param fncType: Function type, either "TD" or "TimeSeries :type fncType: string
:param factorName: String of the time-dependent parameter that have to be multiplied within the equation. (e.g. 'commodityCostTimeSeries' to multiply the operation variable with the costs for each operation). :type factorNames: string
:param varName: String of the variable that has to be multiplied within the equation (e.g. 'op' for operation variable). :type varName: string
:param dictName: String of the variable set (e.g. 'operationVarDict') :type dictName: string
:param loc: String of the location for which the equation should be set up. :type loc: string
:param compName: String of the component name for which the equation should be set up. :type compName: string
:param ip: investment period of transformation path analysis. :type ip: int
Default arguments:
:param getOptValue: Boolean that defines the output of the function:
- True: Return the optimal value.
- False: Return the equation.
|br| * the default value is False.
:type getoptValue: boolean
getObjectiveFunctionContribution
¶
Get contribution to the objective function.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
getOptimalValues
¶
Return optimal values of the components.
:param name: name of the variables of which the optimal values should be returned:
* 'capacityVariables',
* 'isBuiltVariables',
* '_operationVariablesOptimum',
* 'phaseAngleVariablesOptimum',
* 'all' or another input: all variables are returned.
:type name: string
getSharedPotentialContribution
¶
Get the share which the components of the modeling class have on a shared maximum potential at a location.
hasOpVariablesForLocationCommodity
¶
Check if the commodity´s transfer between a given location and the other locations of the energy system model is eligible.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param loc: Name of the regarded location (locations are defined in the EnergySystemModel instance) :type loc: string
:param commod: Name of the regarded commodity (commodities are defined in the EnergySystemModel instance) :param commod: string
initPhaseAngleVarSet
¶
Declare phase angle variable set in the pyomo object for for each node.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
operationMode1
¶
operationMode1(
pyM,
esM,
constrName,
constrSetName,
opVarName,
factorName=None,
*,
isOperationCommisYearDepending=False,
)
Define operation mode 1. The operation [commodityUnith] is limited by the installed capacity in:\n * [commodityUnith] (for storages) or in * [commodityUnit] multiplied by the hours per time step (else).\n An additional factor can limited the operation further.
.. math::
op^{comp,opType}_{loc,ip,p,t} \\leq \\tau^{hours} \\cdot \\text{opFactor}^{opType} \\cdot cap^{comp}_{loc,ip}
operationMode1_2dim
¶
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.
.. math::
op^{comp,op}_{(loc_1,loc_2),ip,p,t} + op^{op}_{(loc_2,loc_1),ip,p,t} \\leq \\tau^{hours} \\cdot \\text{cap}^{comp}_{(loc_{in},loc_{out})}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
operationMode2
¶
operationMode2(
pyM,
esM,
constrName,
constrSetName,
opVarName,
opRateName="processedOperationRateFix",
*,
isOperationCommisYearDepending=False,
)
Define operation mode 2.
The operation [commodityUnith] is equal to the installed capacity multiplied with a time series in:\n * [commodityUnith] (for storages) or in * [commodityUnit] multiplied by the hours per time step (else).\n
.. math::
op^{comp,opType}_{loc,ip,p,t} \\leq \\tau^{hours} \\cdot \\text{opRateMax}^{comp,opType}_{loc,ip,p,t} \\cdot cap^{comp}_{loc,ip}
operationMode3
¶
operationMode3(
pyM,
esM,
constrName,
constrSetName,
opVarName,
opRateName="processedOperationRateMax",
*,
isOperationCommisYearDepending=False,
relevanceThreshold=None,
)
Define operation mode 3.
The operation [commodityUnith] is limited by an installed capacity multiplied with a time series in:\n * [commodityUnith] (for storages) or in * [commodityUnit] multiplied by the hours per time step (else).\n
.. math:: op^{comp,opType}{loc,ip,p,t} = \tau^{hours} \cdot \text{opRateFix}^{comp,opType}} \cdot cap^{comp}_{loc,ip
:param relevanceThreshold: Force operation parameters to be 0 if values are below the relevance threshold. |br| * the default value is None :type relevanceThreshold: float (>=0) or None
operationMode4
¶
operationMode4(
pyM,
esM,
constrName,
constrSetName,
opVarName,
opRateName="processedOperationRateMin",
*,
isOperationCommisYearDepending=False,
relevanceThreshold=None,
)
Define operation mode 4.
The operation [commodityUnith] is limited by an installed capacity multiplied with a time series in:\n * [commodityUnith] (for storages) or in * [commodityUnit] multiplied by the hours per time step (else).\n
.. math:: op^{comp,opType}{loc,ip,p,t} = \tau^{hours} \cdot \text{opRateFix}^{comp,opType}} \cdot cap^{comp}_{loc,ip
:param relevanceThreshold: Force operation parameters to be 0 if values are below the relevance threshold. |br| * the default value is None :type relevanceThreshold: float (>=0) or None
powerFlowDC
¶
Ensure that the flow between two locations is equal to the difference between the phase angle variables at these locations divided by the reactance of the line between these locations.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
setOptimalValues
¶
Set the optimal values of the components.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
stockCapacityConstraint
¶
Set the stock capacity constraint. The stock capacity is the sum of the stock commissioning, which do not exceed its technical lifetime.
For stochastic, the stock of past investment periods is not only valid for ip=0 but for all investment periods. .. math::
cap^{comp}_{loc,ip} = stockCap^{comp}_{loc} + commis^{comp}_{loc,ip} - decommis^{comp}_{loc,0}
For capacity development, the stock is only considered for the first investment periods.
.. math::
cap^{comp}_{loc,0} = stockCap^{comp}_{loc} + commis^{comp}_{loc,0} - decommis^{comp}_{loc,0}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
stockCommissioningConstraint
¶
Set commissioning variable for past investment periods. For past investment periods, where no stock commissioning is specified the commissioning variable is set to zero.
symmetricalCapacity
¶
Ensure that the capacity between location_1 and location_2 is the same as the one between location_2 and location_1.
.. math::
cap^{comp}_{(loc_1,loc_2)} = cap^{comp}_{(loc_2,loc_1)}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
yearlyFullLoadHoursMax
¶
yearlyFullLoadHoursMax(
pyM,
esM,
constrSetName,
constrName,
opVarName,
isOperationCommisYearDepending=False,
)
Limit the annual full load hours to a maximum value.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param constrName: name for the constraint in esM.pyM :type constrName: str
:param constrSetName: name of the constraint set :type constrSetName: str
:param opVarName: name of the operation variables :type opVarName: str
:param isOperationCommisYearDepending: defines whether the operation variable is depending on the year of commissioning of the component. E.g. relevant if the commodity conversion, for example the efficiency, varies over the transformation pathway :type isOperationCommisYearDepending: str
yearlyFullLoadHoursMin
¶
yearlyFullLoadHoursMin(
pyM,
esM,
constrSetName,
constrName,
opVarName,
isOperationCommisYearDepending=False,
)
Limit the annual full load hours to a minimum value.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param constrName: name for the constraint in esM.pyM :type constrName: str
:param constrSetName: name of the constraint set :type constrSetName: str
:param opVarName: name of the operation variables :type opVarName: str
:param isOperationCommisYearDepending: defines whether the operation variable is depending on the year of commissioning of the component. E.g. relevant if the commodity conversion, for example the efficiency, varies over the transformation pathway :type isOperationCommisYearDepending: str
LinearOptimalPowerFlow
¶
LinearOptimalPowerFlow(
esM,
name,
commodity,
reactances,
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,
capacityFix=None,
commissioningMin=None,
commissioningMax=None,
commissioningFix=None,
isBuiltFix=None,
investPerCapacity=0,
investIfBuilt=0,
opexPerOperation=0,
opexPerCapacity=0,
opexIfBuilt=0,
QPcostScale=0,
interestRate=0.08,
economicLifetime=10,
technicalLifetime=None,
stockCommissioning=None,
floorTechnicalLifetime=True,
)
Bases: Transmission
A LinearOptimalPowerFlow component shows the behavior of a Transmission component but additionally models a linearized power flow (i.e. for AC lines). The LinearOptimalPowerFlow class inherits from the Transmission class.
Create a LinearOptimalPowerFlow class instance. The LinearOptimalPowerFlow component specific input arguments are described below. The Transmission component specific input arguments are described in the Transmission class and the general component input arguments are described in the Component class.
Required arguments:
:param reactances: reactances for DC power flow modeling (of AC lines) given as a Pandas DataFrame. The row and column indices of the DataFrame have to equal the in the energy system model specified locations. :type reactances: Pandas DataFrame.
Methods:
-
addToEnergySystemModel–Add the component to an EnergySystemModel instance (esM). If the respective component class is not already in
-
getDataForTimeSeriesAggregation–Get the required data if a time series aggregation is requested.
-
getTSAOutput–Return a reformatted time series data after applying time series aggregation, if the original time series
-
prepareTSAInput–Format the time series data of a component to fit the requirements of the time series aggregation package and
-
setAggregatedTimeSeriesData–Determine the aggregated maximum rate and the aggregated fixed operation rate.
-
setTimeSeriesData–Set the maximum operation rate and fixed operation rate depending on whether a time series analysis is requested or not.
addToEnergySystemModel
¶
Add the component to an EnergySystemModel instance (esM). If the respective component class is not already in the esM, it is added as well.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel instance
getDataForTimeSeriesAggregation
¶
Get the required data if a time series aggregation is requested.
:param ip: investment period of transformation path analysis. :type ip: int
getTSAOutput
¶
Return a reformatted time series data after applying time series aggregation, if the original time series data is not None.
:param rate: Full (unclustered) time series data or None :type rate: Pandas DataFrame or None
:param rateName: name of the time series (to ensure uniqueness if a component has multiple relevant time series) :type rateName: string
:param data: Pandas DataFrame with the clustered time series data of all components in the energy system :type data: Pandas DataFrame
:param ip: investment period of transformation path analysis. :type ip: int
:return: reformatted data or None :rtype: Pandas DataFrame
prepareTSAInput
¶
Format the time series data of a component to fit the requirements of the time series aggregation package and return a list of formatted data.
:param rate: a fixed/maximum/minimum operation time series or None :type rate: Pandas DataFrame or None
:param rateName: name of the time series (to ensure uniqueness if a component has multiple relevant time series) :type rateName: string
:param rateWeight: weight of the time series in the clustering process :type rateWeight: positive float (>=0)
:param weightDict: dictionary to which the weight is added :type weightDict: dict
:param data: list to which the formatted data is added :type data: list of Pandas DataFrames
:param ip: investment period of transformation path analysis. :type ip: int
:return: data :rtype: Pandas DataFrame
setAggregatedTimeSeriesData
¶
Determine the aggregated maximum rate and the aggregated fixed operation rate.
:param data: Pandas DataFrame with the clustered time series data of the conversion component :type data: Pandas DataFrame
:param ip: investment period of transformation path analysis. :type ip: int
setTimeSeriesData
¶
Set the maximum operation rate and fixed operation rate depending on whether a time series analysis is requested or not.
:param hasTSA: states whether a time series aggregation is requested (True) or not (False). :type hasTSA: boolean
ConversionPartLoad¶
conversionPartLoad
¶
Classes:
-
ConversionPartLoad–A ConversionPartLoad component maps the (nonlinear) part-load behavior of a Conversion component.
-
ConversionPartLoadModel–A ConversionPartLoad class instance will be instantly created if a ConversionPartLoad class instance is initialized.
Functions:
-
checkAndCorrectDiscretizedPartloads–Check if the discretized points are >=0 and <=100% .
-
checkCommodityConversionFactorsPartLoad–Check if one of the commodity conversion factors equals 1 and another is either a lambda function or a set of data points.
-
getDiscretizedPartLoad–Preprocess the conversion factors passed by the user.
-
pieceWiseLinearization–Determine xSegments, ySegments.
ConversionPartLoad
¶
ConversionPartLoad(
esM,
name,
physicalUnit,
commodityConversionFactors,
commodityConversionFactorsPartLoad,
nSegments=None,
**kwargs,
)
Bases: Conversion
A ConversionPartLoad component maps the (nonlinear) part-load behavior of a Conversion component. It uses the open source module PWLF to generate piecewise linear functions upon a continuous function or discrete data points. The formulation of the optimization is done by using special ordered sets (SOS) constraints. When using ConversionPartLoad it is recommended to check the piecewise linearization visually to verify that the accuracy meets the desired requirements. The ConversionPartLoad class inherits from the Conversion class.
Create an ConversionPartLoad class instance. Capacities are given in the physical unit of the plants. The ConversionPartLoad component specific input arguments are described below. Other specific input arguments are described in the Conversion class and the general component input arguments are described in the Component class.
Required arguments:
:param commodityConversionFactorsPartLoad: A dictionary containing key-value pairs, where each key represents a commodity (e.g., "electricity", "hydrogen") and each value provides the conversion factors that vary with the operation load. These conversion factors dictate the efficiency or rate at which one commodity is transformed into another under different operational conditions. The (nonlinear) part load behavior, which is the relationship between the conversion factors (or efficiency) and the operational load, can be described either using a lambda function for a direct mathematical relationship or a Pandas DataFrame. If a Pandas DataFrame is used, it should contain two columns: one for the x-axis, which represents the operation level (nominal load), and one for the y-axis, which represents the corresponding conversion factor (efficiency) at the corresponding operation level. A negative value indicates that the commodity is consumed. A positive value indicates that the commodity is produced.
Example: * An electrolyzer converts, simply put, electricity into hydrogen with an electrical efficiency depending on the operation level. The physicalUnit is given as GW_electric, the unit for the 'electricity' commodity isgiven in GW_electric and the 'hydrogen' commodity is given in GW_hydrogen_lowerHeatingValue. Here, electricity consumption is represented by a negative value (-1), and hydrogen production efficiency is detailed in a DataFrame with operation levels and corresponding efficiencies.
# Efficiency Curve of Electrolyzer
Operation_level = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95]
Efficiency = [0.1, 0.15, 0.5, 0.7, 0.7, 0.65, 0.63, 0.62, 0.61, 0.60]
d = {"x": Operation_level, "y": Efficiency}
partLoadData = pd.DataFrame(d)
# Definition of commodityConversionFactorsPartLoad
-> the commodityConversionFactorsPartLoad are defined as {'electricity':-1,'hydrogen':partLoadData}.
Default arguments:
:param nSegments: Number of line segments used for piecewise linearization and generation of point variable (nSegment+1) and segment (nSegment) variable sets. By default, the nSegments is None. For this case, the number of line segments is set to 5. The user can set nSegments by choosing an integer (>=0). It is recommended to choose values between 3 and 7 since the computational cost rises dramatically with increasing nSegments. When specifying nSegements='optimizeSegmentNumbers', an optimal number of line segments is automatically chosen by a bayesian optimization algorithm. |br| * the default value is None :type nSegments: None or integer or string
:param kwargs: All other keyword arguments of the conversion class can be defined as well. :type kwargs: * Check Conversion Class documentation.
Methods:
-
addToEnergySystemModel–Add the component to an EnergySystemModel instance (esM). If the respective component class is not already in
-
getDataForTimeSeriesAggregation–Get the required data if a time series aggregation is requested.
-
getTSAOutput–Return a reformatted time series data after applying time series aggregation, if the original time series
-
prepareTSAInput–Format the time series data of a component to fit the requirements of the time series aggregation package and
-
setAggregatedTimeSeriesData–Determine the aggregated maximum rate and the aggregated fixed operation rate.
-
setTimeSeriesData–Set the maximum operation rate and fixed operation rate depending on whether a time series analysis is requested or not.
addToEnergySystemModel
¶
Add the component to an EnergySystemModel instance (esM). If the respective component class is not already in the esM, it is added as well.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel instance
getDataForTimeSeriesAggregation
¶
Get the required data if a time series aggregation is requested.
:param ip: investment period of transformation path analysis. :type ip: int
getTSAOutput
¶
Return a reformatted time series data after applying time series aggregation, if the original time series data is not None.
:param rate: Full (unclustered) time series data or None :type rate: Pandas DataFrame or None
:param rateName: name of the time series (to ensure uniqueness if a component has multiple relevant time series) :type rateName: string
:param data: Pandas DataFrame with the clustered time series data of all components in the energy system :type data: Pandas DataFrame
:param ip: investment period of transformation path analysis. :type ip: int
:return: reformatted data or None :rtype: Pandas DataFrame
prepareTSAInput
¶
Format the time series data of a component to fit the requirements of the time series aggregation package and return a list of formatted data.
:param rate: a fixed/maximum/minimum operation time series or None :type rate: Pandas DataFrame or None
:param rateName: name of the time series (to ensure uniqueness if a component has multiple relevant time series) :type rateName: string
:param rateWeight: weight of the time series in the clustering process :type rateWeight: positive float (>=0)
:param weightDict: dictionary to which the weight is added :type weightDict: dict
:param data: list to which the formatted data is added :type data: list of Pandas DataFrames
:param ip: investment period of transformation path analysis. :type ip: int
:return: data :rtype: Pandas DataFrame
setAggregatedTimeSeriesData
¶
Determine the aggregated maximum rate and the aggregated fixed operation rate.
:param data: Pandas DataFrame with the clustered time series data of the conversion component :type data: Pandas DataFrame
:param ip: investment period of transformation path analysis. :type ip: int
setTimeSeriesData
¶
Set the maximum operation rate and fixed operation rate depending on whether a time series analysis is requested or not.
:param hasTSA: states whether a time series aggregation is requested (True) or not (False). :type hasTSA: boolean
ConversionPartLoadModel
¶
Bases: ConversionModel
A ConversionPartLoad class instance will be instantly created if a ConversionPartLoad class instance is initialized. It is used for the declaration of the sets, variables and constraints which are valid for the Conversion class instance. These declarations are necessary for the modeling and optimization of the energy system model. The ConversionPartLoad class inherits from the ConversionModel class.
Methods:
-
additionalMinPartLoad–Set, if applicable, the minimal part load of a component.
-
bigM–Enforce the consideration of the binary design variables of a component.
-
binaryOperation–Create binary operation constraints for component operation.
-
capToNbInt–Determine the components' capacities from the number of installed units.
-
capToNbReal–Determine the components' capacities from the number of installed units.
-
capacityMinDec–Enforce the consideration of minimum capacities for components with design decision variables.
-
declareBinOpVarSet–Declare binary operation variables.
-
declareBinaryDesignDecisionVars–Declare binary variables [-] indicating if a component is considered at a location or not [-].
-
declareCapacityVars–Declare capacity variables.
-
declareCommissioningVarSet–Declare set for commissioning variables in the pyomo object for a modeling class.
-
declareCommissioningVars–Declare commissioning variable for capacity development of component.
-
declareComponentConstraints–Declare time independent and dependent constraints.
-
declareContinuousDesignVarSet–Declare set for continuous number of installed components in the pyomo object for a modeling class.
-
declareDecommissioningVars–Declare decommissioning variable for capacity development of component.
-
declareDesignDecisionVarSet–Declare set for design decision variables in the pyomo object for a modeling class.
-
declareDesignVarSet–Declare set for capacity variables in the pyomo object for a modeling class.
-
declareDiscreteDesignVarSet–Declare set for discrete number of installed components in the pyomo object for a modeling class.
-
declareDiscretizationPointVariables–Declare discretization point variables.
-
declareDiscretizationSegmentBinVariables–Declare discretization segment variables.
-
declareDiscretizationSegmentConVariables–Declare discretization segment variables.
-
declareFlexFlowShareConstrSet–Declare set for flow share constraints based on the processed flow shares parameter.
-
declareIntNumbersVars–Declare variables representing the (discrete/integer) number of installed components [-].
-
declareLinkedCapacityDict–Declare conversion components with linked capacities and check if the linked components have the same
-
declareLocationComponentSet–Declare set with location and component in the pyomo object for a modeling class.
-
declareOpCommisConstrSet1–Declare set of locations and components for which hasCapacityVariable is set to True and neither the
-
declareOpCommisConstrSet2–Declare set of locations and components for which hasCapacityVariable is set to True and a fixed
-
declareOpCommisConstrSet3–Declare set of locations and components for which hasCapacityVariable is set to True and a maximum
-
declareOpCommisConstrSet4–Declare set of locations and components for which hasCapacityVariable is set to True and a minimum
-
declareOpCommisConstrSetMinPartLoad–Declare set of locations and components for which partLoadMin is not None.
-
declareOpCommisVarSet–Declare the operation set for components that have commodity conversion factors that depend on the
-
declareOpConstrSet1–Declare set of locations and components for which hasCapacityVariable is set to True and neither the
-
declareOpConstrSet2–Declare set of locations and components for which hasCapacityVariable is set to True and a fixed
-
declareOpConstrSet3–Declare set of locations and components for which hasCapacityVariable is set to True and a maximum
-
declareOpConstrSet4–Declare set of locations and components for which hasCapacityVariable is set to True and a minimum
-
declareOpConstrSetMinPartLoad–Declare set of locations and components for which partLoadMin is not None.
-
declareOpFlexVarSets–Declare commodity specific operation variable set for flexible conversion components in the pyomo object
-
declareOpVarSet–Declare operation related sets (operation variables and mapping sets) in the pyomo object for a
-
declareOperationBinaryVars–Declare binary operation variables.
-
declareOperationModeSets–Declare operation mode and commissioning constraint sets.
-
declareOperationVars–Declare operation variables.
-
declarePathwaySets–Declare set for capacity development in the pyomo object for a modeling class.
-
declareRampingConstraints–Set up the ramping contraints.
-
declareRampingVarSets–Declare ramping constraint sets if ramp rates are given.
-
declareRealNumbersVars–Declare variables representing the (continuous) number of installed components [-].
-
declareSets–Declare sets and dictionaries: design variable sets, operation variable sets, operation mode sets and
-
declareVariables–Declare design and operation variables.
-
declareYearlyFullLoadHoursCommisMaxSet–Declare set of locations and components for which maximum yearly full load hours are given.
-
declareYearlyFullLoadHoursCommisMinSet–Declare set of locations and components for which minimum yearly full load hours are given.
-
declareYearlyFullLoadHoursMaxSet–Declare set of locations and components for which maximum yearly full load hours are given.
-
declareYearlyFullLoadHoursMinSet–Declare set of locations and components for which minimum yearly full load hours are given.
-
decommissioningConstraint–Declase the decommissioning after the technical lifetime from investment
-
designBinFix–Set, if applicable, the installed capacities of a component.
-
designDevelopmentConstraint–Link the capacity development between investment periods.
-
flexConversionConstraint–Declare constraint that ensures that the sum of all flexible operation variables of one component are equal
-
flexConversionFlowShareConstraint–Declare constraint that applies flow shares for each flexible component.
-
getCommodityBalanceContribution–Get contribution to a commodity balance.
-
getEconomicsDesign–Set design dependent cost equations for the individual components. The equations will be set
-
getEconomicsOperation–Set time-dependent equations for the individual components. The equations will be set for all components of a modeling class
-
getLocEconomicsDesign–Set time-independent equation specified for one component in one location in one investment period.
-
getLocEconomicsOperation–Set time-dependent cost functions for the individual components. The equations will be set for all components
-
getObjectiveFunctionContribution–Get contribution to the objective function.
-
getOptimalValues–Return optimal values of the components.
-
getSharedPotentialContribution–Get the share which the components of the modeling class have on a shared maximum potential at a location.
-
getTotalOperationCommissioningDependentOperation–Ensure that the sum of all commissioning dependent operating variables equals the total operating variable
-
hasOpVariablesForLocationCommodity–Check if the commodity´s transfer between a given location and the other locations of the energy system model
-
initDiscretizationPointVarSet–Declare discretization variable set of type 1 in the pyomo object for for each node.
-
initDiscretizationSegmentVarSet–Declare discretization variable set of type 2 in the pyomo object for for each node.
-
interPeriodRamping–Add inter-period ramping constraints for operation variables.
-
linkedCapacity–Ensure that all Conversion components with the same linkedConversionCapacityID have the same capacity.
-
operationMode1–Define operation mode 1. The operation [commodityUnit*h] is limited by the installed capacity in:\n
-
operationMode2–Define operation mode 2.
-
operationMode3–Define operation mode 3.
-
operationMode4–Define operation mode 4.
-
partLoadOperationOutput–Set the required input of a conversion process dependent on the part load efficency.
-
pointCapacityConstraint–Ensure that the continuous point variables are in sum equal to the installed capacity of the component.
-
pointSOS2–Ensure that only two consecutive point variables are non-zero while all other point variables are fixed to zero.
-
segmentBigM–Ensure that the continuous segment variables are zero if the respective binary variable is zero and unlimited otherwise.
-
segmentCapacityConstraint–Ensure that the continuous segment variables are in sum equal to the installed capacity of the component.
-
segmentSOS1–Ensure that the binary segment variables are in sum equal to 1.
-
setOptimalValues–Set the optimal values of the components.
-
stockCapacityConstraint–Set the stock capacity constraint. The stock capacity is the sum of the stock
-
stockCommissioningConstraint–Set commissioning variable for past investment periods. For past investment periods,
-
yearlyFullLoadHoursMax–Limit the annual full load hours to a maximum value.
-
yearlyFullLoadHoursMin–Limit the annual full load hours to a minimum value.
additionalMinPartLoad
¶
additionalMinPartLoad(
pyM,
esM,
constrName,
constrSetName,
opVarName,
opVarBinName,
capVarName,
isOperationCommisYearDepending=False,
)
Set, if applicable, the minimal part load of a component.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
bigM
¶
Enforce the consideration of the binary design variables of a component.
.. math::
\\text{M}^{comp} \\cdot bin^{comp}_{loc,ip} \\geq commis^{comp}_{loc,ip}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
binaryOperation
¶
binaryOperation(
pyM,
constrName,
constrSetName,
binaryParameterName,
opVarName,
opVarBinName,
isOperationCommisYearDepending=False,
)
Create binary operation constraints for component operation.
Defines two constraints linking a continuous operation variable to its corresponding binary variable using the Big-M formulation. Handles both standard and commissioning year-dependent cases.
The binaryOperation1 constraint is used to force the binary variable to one if the continuous variable is greater than zero.
The binaryOperation2 constraint ensures that the continuous variable is greater than zero whenever the binary variable is one. This is used for the upTimeMin and downTimeMin feature.
capToNbInt
¶
Determine the components' capacities from the number of installed units.
.. math::
cap^{comp}_{loc} = \\text{capPerUnit}^{comp} \\cdot nbInt^{comp}_{loc}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
capToNbReal
¶
Determine the components' capacities from the number of installed units.
.. math::
cap^{comp}_{loc} = \\text{capPerUnit}^{comp} \\cdot nbReal^{comp}_{loc}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
capacityMinDec
¶
Enforce the consideration of minimum capacities for components with design decision variables.
Minimal capacity which needs to be reached for every investment period with commissioning. As the commisBinVar is coupled with commissioning var, constraint only sets minimal Capacity if component is commissioned. Therefore decommissioning of the component is possible without any constraints.
.. math::
\\text{capMin}^{comp}_{loc} \\cdot commisBin^{comp}_{loc,ip} \\leq cap^{comp}_{loc,ip}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareBinOpVarSet
¶
declareBinOpVarSet(
esM,
pyM,
binaryOperationParameter=["partLoadMin"],
binaryOperationSetName="operationBinVarSet",
)
Declare binary operation variables.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareBinaryDesignDecisionVars
¶
Declare binary variables [-] indicating if a component is considered at a location or not [-].
If a isBuiltFix parameter is given, the bounds are set to enforce
.. math:: bin^{comp}{loc} = \text{binFix}^{comp}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareCapacityVars
¶
Declare capacity variables.
.. math::
\\text{capMin}^{comp}_{loc} \\leq cap^{comp}_{loc} \\leq \\text{capMax}^{comp}_{loc}
If a capacityFix parameter is given, the bounds are set to enforce
.. math:: \text{cap}^{comp}{loc} = \text{capFix}^{comp}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareCommissioningVarSet
¶
Declare set for commissioning variables in the pyomo object for a modeling class.
The commissioning variable must be set for past investment periods (stock commissioning) and future/optimized investment periods
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareCommissioningVars
¶
Declare commissioning variable for capacity development of component.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareComponentConstraints
¶
Declare time independent and dependent constraints.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
declareContinuousDesignVarSet
¶
Declare set for continuous number of installed components in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareDecommissioningVars
¶
Declare decommissioning variable for capacity development of component.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareDesignDecisionVarSet
¶
Declare set for design decision variables in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareDesignVarSet
¶
Declare set for capacity variables in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareDiscreteDesignVarSet
¶
Declare set for discrete number of installed components in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareDiscretizationPointVariables
¶
Declare discretization point variables.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
declareDiscretizationSegmentBinVariables
¶
Declare discretization segment variables.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
declareDiscretizationSegmentConVariables
¶
Declare discretization segment variables.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
declareFlexFlowShareConstrSet
¶
Declare set for flow share constraints based on the processed flow shares parameter.
declareIntNumbersVars
¶
Declare variables representing the (discrete/integer) number of installed components [-].
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareLinkedCapacityDict
¶
Declare conversion components with linked capacities and check if the linked components have the same locational eligibility.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareLocationComponentSet
¶
Declare set with location and component in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareOpCommisConstrSet1
¶
Declare set of locations and components for which hasCapacityVariable is set to True and neither the maximum nor the fixed operation rate is given.
declareOpCommisConstrSet2
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a fixed operation rate is given.
declareOpCommisConstrSet3
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a maximum operation rate is given.
declareOpCommisConstrSet4
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a minimum operation rate is given.
declareOpCommisConstrSetMinPartLoad
¶
Declare set of locations and components for which partLoadMin is not None.
declareOpCommisVarSet
¶
Declare the operation set for components that have commodity conversion factors that depend on the year in the pyomo object for a modeling class.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareOpConstrSet1
¶
Declare set of locations and components for which hasCapacityVariable is set to True and neither the maximum nor the fixed operation rate is given.
declareOpConstrSet2
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a fixed operation rate is given.
declareOpConstrSet3
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a maximum operation rate is given.
declareOpConstrSet4
¶
Declare set of locations and components for which hasCapacityVariable is set to True and a minimum operation rate is given.
declareOpConstrSetMinPartLoad
¶
Declare set of locations and components for which partLoadMin is not None.
declareOpFlexVarSets
¶
Declare commodity specific operation variable set for flexible conversion components in the pyomo object for a modeling class.
declareOpVarSet
¶
Declare operation related sets (operation variables and mapping sets) in the pyomo object for a modeling class.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareOperationBinaryVars
¶
Declare binary operation variables.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareOperationModeSets
¶
Declare operation mode and commissioning constraint sets.
Extends the parent class implementation and adds multiple commissioning-related constraint sets to the Pyomo model.
declareOperationVars
¶
declareOperationVars(
pyM,
esM,
opVarName,
opRateFixName="processedOperationRateFix",
opRateMaxName="processedOperationRateMax",
isOperationCommisYearDepending=False,
flexibleConversion=False,
relevanceThreshold=None,
)
Declare operation variables.
The following operation modes are directly handled during variable creation as bounds instead of constraints.
operation mode 4: If operationRateFix is given for components without a capacity variable, the variables are fixed with operationRateFix, i.e. the operation [commodityUnit*h] is equal to a time series.
.. math:: op^{comp,opType}{loc,p,t} = \text{opRateFix}^{comp,opType}
operation mode 5: If operationRateMax is given for components without a capacity variable, the variables are bounded by operationRateMax, i.e. the operation [commodityUnit*h] is limited by a time series.
.. math:: op^{comp,opType}{loc,p,t} \leq \text{opRateMax}^{comp,opType}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param relevanceThreshold: Force operation parameters to be 0 if values are below the relevance threshold. |br| * the default value is None :type relevanceThreshold: float (>=0) or None
:param isOperationCommisYearDepending: defines whether the operation variable is depending on the year of commissioning of the component. E.g. relevant if the commodity conversion, for example the efficiency, varies over the transformation pathway :type isOperationCommisYearDepending: str
declarePathwaySets
¶
Declare set for capacity development in the pyomo object for a modeling class.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
declareRampingConstraints
¶
Set up the ramping contraints.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param rampingType: Type of ramping constraints to set up. Can be either rampDownMax or rampUpMax |br| * the default value is None.
declareRampingVarSets
¶
Declare ramping constraint sets if ramp rates are given.
declareRealNumbersVars
¶
Declare variables representing the (continuous) number of installed components [-].
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
declareSets
¶
Declare sets and dictionaries: design variable sets, operation variable sets, operation mode sets and linked components dictionary.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
declareVariables
¶
Declare design and operation variables.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
:param relaxIsBuiltBinary: states if the optimization problem should be solved as a relaxed LP to get the lower bound of the problem. |br| * the default value is False :type declaresOptimizationProblem: boolean
:param relevanceThreshold: Force operation parameters to be 0 if values are below the relevance threshold. |br| * the default value is None :type relevanceThreshold: float (>=0) or None
declareYearlyFullLoadHoursCommisMaxSet
¶
Declare set of locations and components for which maximum yearly full load hours are given.
declareYearlyFullLoadHoursCommisMinSet
¶
Declare set of locations and components for which minimum yearly full load hours are given.
declareYearlyFullLoadHoursMaxSet
¶
Declare set of locations and components for which maximum yearly full load hours are given.
declareYearlyFullLoadHoursMinSet
¶
Declare set of locations and components for which minimum yearly full load hours are given.
decommissioningConstraint
¶
Declase the decommissioning after the technical lifetime from investment period of commissioning.
.. math::
decommis^{comp}_{loc,ip} = commis^{comp}_{loc,ip-\\mathrm{ipTechnicalLifetime}}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
designBinFix
¶
Set, if applicable, the installed capacities of a component.
.. math::
bin^{comp}_{(loc_1,loc_2),ip} = \\text{binFix}^{comp}_{(loc_1,loc_2)}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
designDevelopmentConstraint
¶
Link the capacity development between investment periods.
For stochastic: The capacity design must be equal between the different years.
.. math::
cap^{comp}_{loc,ip+1} = cap^{comp}_{loc,ip}
For the development pathway, the capacity of an investment period is composed of the capacity of the previous investment periods and the commissioning and decommissioning in the current investment period.
.. math::
cap^{comp}_{loc,ip+1} = cap^{comp}_{loc,ip} + commis^{comp}_{loc,ip} - decommis^{comp}_{loc,ip}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
flexConversionConstraint
¶
Declare constraint that ensures that the sum of all flexible operation variables of one component are equal to the overall operation of this component.
flexConversionFlowShareConstraint
¶
Declare constraint that applies flow shares for each flexible component.
getCommodityBalanceContribution
¶
Get contribution to a commodity balance.
getEconomicsDesign
¶
getEconomicsDesign(
pyM,
esM,
factorNames,
lifetimeAttr,
varName,
divisorName="",
QPfactorNames=[],
QPdivisorNames=[],
getOptValue=False,
getOptValueCostType=TAC,
)
Set design dependent cost equations for the individual components. The equations will be set for all components of a modeling class and all locations.
Required arguments
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
:param factorNames: Strings of the parameters that have to be multiplied within the equation. (e.g. ['processedInvestPerCapacity'] to multiply the capacity variable with the investment per each capacity unit). :type factorNames: list of strings
:param varName: String of the variable that has to be multiplied within the equation (e.g. 'cap' for capacity variable). :type varName: string
:param divisorName: String of the variable that is used as a divisor within the equation (e.g. 'CCF'). If the divisorName is an empty string, there is no division within the equation. |br| * the default value is "". :type divisorName: string
:param QPfactorNames: Strings of the parameters that have to be multiplied when quadratic programming is used. (e.g. ['processedQPcostScale']) :type QPfactorNames: list of strings
:param QPdivisorNames: Strings of the parameters that have to be used as divisors when quadratic programming is used. (e.g. ['QPbound']) :type QPdivisorNames: list of strings
:param getOptValue: Boolean that defines the output of the function:
- True: Return the optimal cost values.
- False: Return the cost equation.
|br| * the default value is False.
:type getoptValue: boolean
:param getOptValueCostType: the cost type can either be TAC (total anualized costs) or NPV (net present value) |br| * the default value is None. :type getOptValueCostType: string
getEconomicsOperation
¶
getEconomicsOperation(
pyM,
esM,
fncType,
factorNames,
varName,
dictName,
getOptValue=False,
getOptValueCostType=TAC,
)
Set time-dependent equations for the individual components. The equations will be set for all components of a modeling class and all locations as well as for each considered time step. In case of a two-dimensional component (e.g. a transmission component), the equations will be set for all possible connections between the defined locations.
Required arguments:
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: EnergySystemModel instance representing the energy system in which the components should be modeled. :type esM: esM - EnergySystemModel class instance
:param fncType: Function type, either "TD" or "TimeSeries" :type fncType: string
:param factorNames: Strings of the time-dependent parameters that have to be multiplied within the equation. (e.g. ['opexPerOperation'] to multiply the operation variable with the costs for each operation). :type factorNames: list of strings
:param varName: String of the variable that has to be multiplied within the equation (e.g. 'op' for operation variable). :type varName: string
:param dictName: String of the variable set (e.g. 'operationVarDict') :type dictName: string
Default arguments:
:param getOptValue: Boolean that defines the output of the function:
- True: Return the optimal value.
- False: Return the equation.
|br| * the default value is False.
:type getoptValue: boolean
:param getOptValueCostType: the cost type can either be TAC (total annualized costs) or NPV (net present value) |br| * the default value is None. :type getOptValueCostType: string
getLocEconomicsDesign
¶
getLocEconomicsDesign(
pyM,
esM,
factorNames,
varName,
loc,
compName,
ip,
divisorName="",
QPfactorNames=[],
QPdivisorNames=[],
getOptValue=False,
)
Set time-independent equation specified for one component in one location in one investment period.
Required arguments:
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
:param factorNames: Strings of the parameters that have to be multiplied within the equation. (e.g. ['processedInvestPerCapacity'] to multiply the capacity variable with the investment per each capacity unit). :type factorNames: list of strings
:param varName: String of the variable that has to be multiplied within the equation (e.g. 'cap' for capacity variable). :type varName: string
:param loc: String of the location for which the equation should be set up. :type loc: string
:param compName: String of the component name for which the equation should be set up. :type compName: string
Default arguments:
:param ip: investment period :type ip: int
:param divisorName: String of the variable that is used as a divisor within the equation (e.g. 'CCF'). If the divisorName is an empty string, there is no division within the equation. |br| * the default value is ''. :type divisorName: string
:param QPfactorNames: Strings of the parameters that have to be multiplied when quadratic programming is used. (e.g. ['processedQPcostScale']) :type QPfactorNames: list of strings
:param QPdivisorNames: Strings of the parameters that have to be used as divisors when quadratic programming is used. (e.g. ['QPbound']) :type QPdivisorNames: list of strings
:param getOptValue: Boolean that defines the output of the function:
- True: Return the optimal value.
- False: Return the equation.
|br| * the default value is False.
:type getoptValue: boolean
getLocEconomicsOperation
¶
getLocEconomicsOperation(
pyM,
esM,
fncType,
factorNames,
varName,
loc,
compName,
ip,
getOptValue=False,
)
Set time-dependent cost functions for the individual components. The equations will be set for all components of a modeling class and all locations as well as for each considered time step.
Required arguments:
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: EnergySystemModel instance representing the energy system in which the components should be modeled. :type esM: esM - EnergySystemModel class instance
:param fncType: Function type, either "TD" or "TimeSeries :type fncType: string
:param factorName: String of the time-dependent parameter that have to be multiplied within the equation. (e.g. 'commodityCostTimeSeries' to multiply the operation variable with the costs for each operation). :type factorNames: string
:param varName: String of the variable that has to be multiplied within the equation (e.g. 'op' for operation variable). :type varName: string
:param dictName: String of the variable set (e.g. 'operationVarDict') :type dictName: string
:param loc: String of the location for which the equation should be set up. :type loc: string
:param compName: String of the component name for which the equation should be set up. :type compName: string
:param ip: investment period of transformation path analysis. :type ip: int
Default arguments:
:param getOptValue: Boolean that defines the output of the function:
- True: Return the optimal value.
- False: Return the equation.
|br| * the default value is False.
:type getoptValue: boolean
getObjectiveFunctionContribution
¶
Get contribution to the objective function.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
getOptimalValues
¶
Return optimal values of the components.
:param name: name of the variables of which the optimal values should be returned:
* 'capacityVariables',
* 'isBuiltVariables',
* '_operationVariablesOptimum',
* 'all' or another input: all variables are returned.
|br| * the default value is 'all' :type name: string
:param ip: investment period |br| * the default value is 0 :type ip: int
:returns: a dictionary with the optimal values of the components :rtype: dict
getSharedPotentialContribution
¶
Get the share which the components of the modeling class have on a shared maximum potential at a location.
getTotalOperationCommissioningDependentOperation
¶
Ensure that the sum of all commissioning dependent operating variables equals the total operating variable of that conversion component for each time step.
hasOpVariablesForLocationCommodity
¶
Check if the commodity´s transfer between a given location and the other locations of the energy system model is eligible.
:param esM: EnergySystemModel in which the LinearOptimalPowerFlow components have been added to. :type esM: esM - EnergySystemModel class instance
:param loc: Name of the regarded location (locations are defined in the EnergySystemModel instance) :type loc: string
:param commod: Name of the regarded commodity (commodities are defined in the EnergySystemModel instance) :param commod: string
initDiscretizationPointVarSet
¶
Declare discretization variable set of type 1 in the pyomo object for for each node. Type 1 represents every start, end, and intermediate point in the piecewise linear function.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
initDiscretizationSegmentVarSet
¶
Declare discretization variable set of type 2 in the pyomo object for for each node. Type 2 represents every segment in the piecewise linear function.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
interPeriodRamping
¶
Add inter-period ramping constraints for operation variables. This enforces a maximum allowed change in the dispatch between the last time step of period p–1 and the first time step of period p.
linkedCapacity
¶
Ensure that all Conversion components with the same linkedConversionCapacityID have the same capacity.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
operationMode1
¶
operationMode1(
pyM,
esM,
constrName,
constrSetName,
opVarName,
factorName=None,
*,
isOperationCommisYearDepending=False,
)
Define operation mode 1. The operation [commodityUnith] is limited by the installed capacity in:\n * [commodityUnith] (for storages) or in * [commodityUnit] multiplied by the hours per time step (else).\n An additional factor can limited the operation further.
.. math::
op^{comp,opType}_{loc,ip,p,t} \\leq \\tau^{hours} \\cdot \\text{opFactor}^{opType} \\cdot cap^{comp}_{loc,ip}
operationMode2
¶
operationMode2(
pyM,
esM,
constrName,
constrSetName,
opVarName,
opRateName="processedOperationRateFix",
*,
isOperationCommisYearDepending=False,
)
Define operation mode 2.
The operation [commodityUnith] is equal to the installed capacity multiplied with a time series in:\n * [commodityUnith] (for storages) or in * [commodityUnit] multiplied by the hours per time step (else).\n
.. math::
op^{comp,opType}_{loc,ip,p,t} \\leq \\tau^{hours} \\cdot \\text{opRateMax}^{comp,opType}_{loc,ip,p,t} \\cdot cap^{comp}_{loc,ip}
operationMode3
¶
operationMode3(
pyM,
esM,
constrName,
constrSetName,
opVarName,
opRateName="processedOperationRateMax",
*,
isOperationCommisYearDepending=False,
relevanceThreshold=None,
)
Define operation mode 3.
The operation [commodityUnith] is limited by an installed capacity multiplied with a time series in:\n * [commodityUnith] (for storages) or in * [commodityUnit] multiplied by the hours per time step (else).\n
.. math:: op^{comp,opType}{loc,ip,p,t} = \tau^{hours} \cdot \text{opRateFix}^{comp,opType}} \cdot cap^{comp}_{loc,ip
:param relevanceThreshold: Force operation parameters to be 0 if values are below the relevance threshold. |br| * the default value is None :type relevanceThreshold: float (>=0) or None
operationMode4
¶
operationMode4(
pyM,
esM,
constrName,
constrSetName,
opVarName,
opRateName="processedOperationRateMin",
*,
isOperationCommisYearDepending=False,
relevanceThreshold=None,
)
Define operation mode 4.
The operation [commodityUnith] is limited by an installed capacity multiplied with a time series in:\n * [commodityUnith] (for storages) or in * [commodityUnit] multiplied by the hours per time step (else).\n
.. math:: op^{comp,opType}{loc,ip,p,t} = \tau^{hours} \cdot \text{opRateFix}^{comp,opType}} \cdot cap^{comp}_{loc,ip
:param relevanceThreshold: Force operation parameters to be 0 if values are below the relevance threshold. |br| * the default value is None :type relevanceThreshold: float (>=0) or None
partLoadOperationOutput
¶
Set the required input of a conversion process dependent on the part load efficency.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
pointCapacityConstraint
¶
Ensure that the continuous point variables are in sum equal to the installed capacity of the component.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
pointSOS2
¶
Ensure that only two consecutive point variables are non-zero while all other point variables are fixed to zero.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
segmentBigM
¶
Ensure that the continuous segment variables are zero if the respective binary variable is zero and unlimited otherwise.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
segmentCapacityConstraint
¶
Ensure that the continuous segment variables are in sum equal to the installed capacity of the component.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
segmentSOS1
¶
Ensure that the binary segment variables are in sum equal to 1. Enforce that only one binary is set to 1, while all other are fixed 0.
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
setOptimalValues
¶
Set the optimal values of the components.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo Concrete Model
stockCapacityConstraint
¶
Set the stock capacity constraint. The stock capacity is the sum of the stock commissioning, which do not exceed its technical lifetime.
For stochastic, the stock of past investment periods is not only valid for ip=0 but for all investment periods. .. math::
cap^{comp}_{loc,ip} = stockCap^{comp}_{loc} + commis^{comp}_{loc,ip} - decommis^{comp}_{loc,0}
For capacity development, the stock is only considered for the first investment periods.
.. math::
cap^{comp}_{loc,0} = stockCap^{comp}_{loc} + commis^{comp}_{loc,0} - decommis^{comp}_{loc,0}
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param esM: energy system model containing general information. :type esM: EnergySystemModel instance from the FINE package
stockCommissioningConstraint
¶
Set commissioning variable for past investment periods. For past investment periods, where no stock commissioning is specified the commissioning variable is set to zero.
yearlyFullLoadHoursMax
¶
yearlyFullLoadHoursMax(
pyM,
esM,
constrSetName,
constrName,
opVarName,
isOperationCommisYearDepending=False,
)
Limit the annual full load hours to a maximum value.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param constrName: name for the constraint in esM.pyM :type constrName: str
:param constrSetName: name of the constraint set :type constrSetName: str
:param opVarName: name of the operation variables :type opVarName: str
:param isOperationCommisYearDepending: defines whether the operation variable is depending on the year of commissioning of the component. E.g. relevant if the commodity conversion, for example the efficiency, varies over the transformation pathway :type isOperationCommisYearDepending: str
yearlyFullLoadHoursMin
¶
yearlyFullLoadHoursMin(
pyM,
esM,
constrSetName,
constrName,
opVarName,
isOperationCommisYearDepending=False,
)
Limit the annual full load hours to a minimum value.
:param esM: EnergySystemModel instance representing the energy system in which the component should be modeled. :type esM: esM - EnergySystemModel class instance
:param pyM: pyomo ConcreteModel which stores the mathematical formulation of the model. :type pyM: pyomo ConcreteModel
:param constrName: name for the constraint in esM.pyM :type constrName: str
:param constrSetName: name of the constraint set :type constrSetName: str
:param opVarName: name of the operation variables :type opVarName: str
:param isOperationCommisYearDepending: defines whether the operation variable is depending on the year of commissioning of the component. E.g. relevant if the commodity conversion, for example the efficiency, varies over the transformation pathway :type isOperationCommisYearDepending: str
checkAndCorrectDiscretizedPartloads
¶
Check if the discretized points are >=0 and <=100% .
checkCommodityConversionFactorsPartLoad
¶
Check if one of the commodity conversion factors equals 1 and another is either a lambda function or a set of data points. Additionally check if the conversion factor that depicts part load behavior (1) covers part loads from 0 to 1 and (2) includes only conversion factors greater than 0 in the relevant part load range.
getDiscretizedPartLoad
¶
Preprocess the conversion factors passed by the user.
pieceWiseLinearization
¶
Determine xSegments, ySegments. If nSegments is not specified by the user it is either set (e.g. nSegments=5) or nSegements is determined by a bayesian optimization algorithm.