Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/examples in docs #975

Merged
merged 3 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -252,19 +252,14 @@ The core ideas of oemof as a whole are described in
(preprint at `arXiv:1808.0807 <https://arxiv.org/abs/1808.08070v1>`_).
To allow citing specific versions, we use the zenodo project to get a DOI for each version.


.. _solph_examples_label:

Examples
========
Example Applications
====================

The combination of specific modules (often including other packages) is called an
application (app). For example, it can depict a concrete energy system model.
You can find a large variety of helpful examples in the documentation.
The examples show the optimisation of different energy systems and are supposed
to help new users to understand the framework's structure.
There is some elaboration on the examples in the respective repository.
The repository has sections for each major release.

You are welcome to contribute your own examples via a `pull request <https://github.com/oemof/oemof-solph/pulls>`_
or by e-mailing us (see `here <https://oemof.org/contact/>`_ for contact information).
Expand Down
6 changes: 3 additions & 3 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ The model time is defined by the number of intervals and the length of intervals
The index will also be used for the results. For a numeric index the resulting time series will indexed with a numeric index starting with 0.

One can use the function
:py:func:`~oemof.solph._energy_system/create_year_index` to create an equidistant datetime index. By default the function creates an hourly index for one year, so online the year has to be passed to the function. But it is also possible to change the length of the interval to quarter hours etc.. The default number of intervals is the number needed to cover the given year but the value can be overwritten by the user.
:py:func:`create_time_index` to create an equidistant datetime index. By default the function creates an hourly index for one year, so online the year has to be passed to the function. But it is also possible to change the length of the interval to quarter hours etc. The default number of intervals is the number needed to cover the given year but the value can be overwritten by the user.

It is also possible to define the datetime index using pandas. See `pandas date_range guide <https://pandas.pydata.org/pandas-docs/stable/generated/pandas.date_range.html>`_ for more information.

Both code blocks will create an hourly datetime index for 2011:

.. code-block:: python

from oemof.solph import create_year_index
my_index = create_year_index(2011)
from oemof.solph import create_time_index
my_index = create_time_index(2011)

.. code-block:: python

Expand Down
Loading