oemof-examples icon indicating copy to clipboard operation
oemof-examples copied to clipboard

Fixed bad example for flexible schedule for flows

Open c-koehl opened this issue 4 years ago • 2 comments

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.

c-koehl avatar Mar 13 '20 13:03 c-koehl

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!

simnh avatar Apr 08 '20 13:04 simnh

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.

uvchik avatar Apr 09 '20 07:04 uvchik