Skip to content

Commit

Permalink
Add storage_costs example to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
p-snft committed Aug 11, 2023
1 parent 6265847 commit cf84e31
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Examples
flow_gradient.rst
variable_chp.rst
unbalanced_storage.rst
storage_costs.rst
emission_constraint.rst
flow_count_limit.rst
storage_level_constraint.rst
Expand Down
4 changes: 4 additions & 0 deletions docs/examples/storage_costs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Storage costs
--------------

.. automodule:: storage_costs.storage_costs
13 changes: 11 additions & 2 deletions examples/storage_costs/storage_costs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,21 @@
the end of the time horizon of the optimisation. For a battery that
assumes the average revenue, energy is kept at the end.
Code
----
Download source code: :download:`storage_costs.py </../examples/storage_costs/storage_costs.py>`
.. dropdown:: Click to display code
.. literalinclude:: /../examples/storage_costs/storage_costs.py
:language: python
:lines: 34-
Installation requirements
-------------------------
This example requires oemof.solph (v0.5.x), install by:
This example requires oemof.solph (v0.5.x) and matplotlib, install by:
pip install oemof.solph[examples]
pip install oemof.solph[examples] matplotlib
License
Expand Down

0 comments on commit cf84e31

Please sign in to comment.