oemof / oemof-examples

A collection of oemof examples and notebooks.
https://oemof.org/
MIT License
44 stars 69 forks source link

Fixed bad example for flexible schedule for flows #53

Open c-koehl opened 4 years ago

c-koehl commented 4 years ago

This Pull Request is an adaptation of the merged example from this PR. The example for flexible schedules for flows did not show the functionality. The csv file containing the demand needed to be adapted.

Before pull request: Before

Now: Now

Now you can see that the scheduled boiler flow is not 0 during flexible schedule from 02:00-03:00.

simnh commented 4 years ago

Hey,

great example. Though I think to just get the idea of schedule flow, it is a little comprehensive. But I am fine with it.

The import statement has to be adapted to the new oemof-solph repo, like this:

from oemof.solph import processing, views

I recommend to check for some pep8 styling (identation etc.). I would suggest python package black for this, though its for jupyter this one:

pip install nb_black

Then add to the frist cell of your notebook:

%load_ext nb_black

Remove this line and save the notebook. Also I would suggest to use nbstripout a clean notebook that has been run only once (or not all). But I do not think that we require this for the examples currently. I just like this for git versioned jupyter notebooks, otherwise you always have the cell stuff in you file changes, which are no actual changes of the source code.

Thx a lot for the example!

uvchik commented 4 years ago

Black can be used in normal python as well and it is also possible to integrate it in many IDEs:

https://github.com/psf/black

Thanks for the example.