oemof.solph.options¶
Optional classes to be added to a network class.
- class oemof.solph._options.Investment(maximum=inf, minimum=0, ep_costs=0, existing=0, nonconvex=False, offset=0, overall_maximum=None, overall_minimum=None, lifetime=None, age=0, interest_rate=0, fixed_costs=None, custom_attributes=None)[source]¶
Bases:
object
Defines an Investment object holding all the specifications needed for investment modeling.
- Parameters:
maximum (float, \(P_{invest,max}(p)\) or \(E_{invest,max}(p)\)) – Maximum of the additional invested capacity; defined per period p for a multi-period model.
minimum (float, \(P_{invest,min}(p)\) or \(E_{invest,min}(p)\)) – Minimum of the additional invested capacity. If nonconvex is True, minimum defines the threshold for the invested capacity; defined per period p for a multi-period model.
ep_costs (float, \(c_{invest,var}\)) – Equivalent periodical costs or investment expenses for the investment
For a standard model: equivalent periodical costs for the investment per flow capacity, i.e. annuities for investments already calculated.
For a multi-period model: Investment expenses for the respective period (in nominal terms). Annuities are calculated within the objective term, also considering age and lifetime.
existing (float, \(P_{exist}\) or \(E_{exist}\)) – Existing / installed capacity. The invested capacity is added on top of this value. Hence, existing capacities come at no additional costs. Not applicable if nonconvex is set to True.
nonconvex (bool) – If True, a binary variable for the status of the investment is created. This enables additional fix investment costs (offset) independent of the invested flow capacity. Therefore, use the offset parameter.
offset (float, \(c_{invest,fix}\)) – Additional fixed investment costs. Only applicable if nonconvex is set to True.
overall_maximum (float, \(P_{overall,max}\) or \(E_{overall,max}\)) – Overall maximum capacity investment, i.e. the amount of capacity that can be totally installed at maximum in any period (taking into account decommissionings); only applicable for multi-period models
overall_minimum (float \(P_{overall,min}\) or \(E_{overall,min}\)) – Overall minimum capacity investment that needs to be installed in the last period of the optimization (taking into account decommissionings); only applicable for multi-period models
lifetime (int, \(l\)) – Units lifetime, given in years; only applicable for multi-period models
age (int, \(a\)) – Units start age, given in years at the beginning of the simulation; only applicable for multi-period models
interest_rate (float, \(ir\)) – Interest rate for calculating annuities when investing in a particular unit; only applicable for multi-period models. If nothing else is specified, the interest rate is the same as the model discount rate of the multi-period model.
fixed_costs (float or list of float, \(c_{fixed}(p)\)) – Fixed costs in each period (given in nominal terms); only applicable for multi-period models
For the variables, constraints and parts of the objective function, which are created, see
InvestmentFlow
,GenericInvestmentStorageBlock
SinkDSMOemofInvestmentBlock
,SinkDSMDLRInvestmentBlock
andSinkDSMDIWInvestmentBlock
.
- class oemof.solph._options.NonConvex(initial_status=0, minimum_uptime=0, minimum_downtime=0, maximum_startups=None, maximum_shutdowns=None, startup_costs=None, shutdown_costs=None, activity_costs=None, inactivity_costs=None, negative_gradient_limit=None, positive_gradient_limit=None, custom_attributes=None)[source]¶
Bases:
object
Defines a NonConvex object holding all the specifications for NonConvex Flows, i.e. Flows with binary variables associated to them.
- Parameters:
startup_costs (numeric (iterable or scalar)) – Costs associated with a start of the flow (representing a unit).
shutdown_costs (numeric (iterable or scalar)) – Costs associated with the shutdown of the flow (representing a unit).
activity_costs (numeric (iterable or scalar)) – Costs associated with the active operation of the flow, independently from the actual output.
inactivity_costs (numeric (iterable or scalar)) – Costs associated with not operating the flow.
minimum_uptime (numeric (1 or positive integer)) – Minimum time that a flow must be greater then its minimum flow after startup. Be aware that minimum up and downtimes can contradict each other and may lead to infeasible problems.
minimum_downtime (numeric (1 or positive integer)) – Minimum time a flow is forced to zero after shutting down. Be aware that minimum up and downtimes can contradict each other and may to infeasible problems.
maximum_startups (numeric (0 or positive integer)) – Maximum number of start-ups in the optimization timeframe.
maximum_shutdowns (numeric (0 or positive integer)) – Maximum number of shutdowns in the optimization timeframe.
initial_status (numeric (0 or 1)) – Integer value indicating the status of the flow in the first time step (0 = off, 1 = on). For minimum up and downtimes, the initial status is set for the respective values in the edge regions e.g. if a minimum uptime of four timesteps is defined, the initial status is fixed for the four first and last timesteps of the optimization period. If both, up and downtimes are defined, the initial status is set for the maximum of both e.g. for six timesteps if a minimum downtime of six timesteps is defined besides a four timestep minimum uptime.
negative_gradient_limit (numeric (iterable, scalar or None)) – the normed upper bound on the positive difference (flow[t-1] < flow[t]) of two consecutive flow values.
positive_gradient_limit (numeric (iterable, scalar or None)) – the normed upper bound on the negative difference (flow[t-1] > flow[t]) of two consecutive flow values.
- property max_up_down¶
Return maximum of minimum_uptime and minimum_downtime.
The maximum of both is used to set the initial status for this number of time steps within the edge regions.