Skip to content

Commit

Permalink
Upate docstring with math of dispatchable facade
Browse files Browse the repository at this point in the history
  • Loading branch information
simnh committed Jun 13, 2019
1 parent 36eb028 commit 842f5ad
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions src/oemof/tabular/facades.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ class Dispatchable(Source, Facade):
The installed power of the generator (e.g. in MW). If not set the
capacity will be optimized (s. also `capacity_cost` argument)
profile: array-like (optional)
Profile of the output such that profile[t] * installed yields output
for timestep t
Profile of the output such that profile[t] * installed capacity
yields the upper bound for timestep t
marginal_cost: numeric
Marginal cost for one unit of produced output, i.e. for a powerplant:
mc = fuel_cost + co2_cost + ... (in Euro / MWh) if timestep length is
Expand All @@ -251,6 +251,34 @@ class Dispatchable(Source, Facade):
Max install capacity if capacity is to be expanded
The mathematical representations for this components are dependent on the
user defined attributes. If the capacity is fixed before (**dispatch mode**)
the following equation holds:
.. math::
x_{dispatchable}^{flow}(t) \leq c_{dispatchable}^{capacity} \cdot \
c_{dispatchable}^{profile} \\qquad \\forall t \in T
Where :math:`x_{dispatchable}^{flow}` denotes the production (endogenous variable)
of the dispatchable object to the bus.
If `expandable` is set to `True` (**investment mode**), the equation
changes slightly:
.. math::
x_{dispatchable}^{flow}(t) \leq (x_{dispatchable}^{capacity} + \
c_{dispatchable}^{capacity}) \cdot c_{dispatchable}^{profile}(t)\
\\qquad \\forall t \in T
Where the bounded endogenous variable of the volatile component is added:
.. math::
x_{volatile}^{dispatchable} \leq c_{dispatchable}^{capacity\_potential}
For constraints set through `output_parameters` see oemof.solph.Flow class.
Expand All @@ -276,7 +304,7 @@ def __init__(self, *args, **kwargs):
kwargs.update({"_facade_requires_": ["bus", "carrier", "tech"]})
super().__init__(*args, **kwargs)

self.profile = kwargs.get("profile", sequence(0))
self.profile = kwargs.get("profile", sequence(1))

self.capacity = kwargs.get("capacity")

Expand All @@ -299,7 +327,7 @@ def build_solph_components(self):
f = Flow(
nominal_value=self._nominal_value(),
variable_costs=self.marginal_cost,
actual_value=self.profile,
max=self.profile,
investment=self._investment(),
**self.output_parameters
)
Expand Down

0 comments on commit 842f5ad

Please sign in to comment.