oemof | Open Energy Modelling Framework - Python toolbox | Performance Testing library
kandi X-RAY | oemof Summary
kandi X-RAY | oemof Summary
Open Energy Modelling Framework - Python toolbox for energy system modelling and optimisation
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Creates a bootstrap environment
- Run subprocess
- Read file contents
oemof Key Features
oemof Examples and Code Snippets
Community Discussions
Trending Discussions on oemof
QUESTION
I have a Python package containing a data module with some data in .json format (https://github.com/oemof/tespy/tree/dev/tespy/data). I want to document these data as plots in my online documentation like this (https://tespy.readthedocs.io/en/dev/api/tespy.data.html).
Is it possible implement a python script into the readthedocs build and document the data automatically this way? I think, this would be useful, since changes in the data will automatically be documented. Or, would this be bad practice?
At the moment, I have python script creating the .rst file (tespy.data.rst
) as well as the plots (.svg
format) locally and upload them to the github repository. My code requires matplotlib
, pkg_resources
as well as json
and looks like this (is the pseudo-code okay, or should I add the full code?).
ANSWER
Answered 2020-Jan-17 at 15:11I was able to solve this: I integrated the plotting code into the conf.py. Additionally I added the readthedocs requirement for matplotlib. See: https://github.com/oemof/tespy/blob/dev/doc/conf.py and https://github.com/oemof/tespy/blob/dev/rtd_requirements.
QUESTION
I have the following matplotlib
I would like to divide x-ticks into 2 lines instead of 1 because sometimes they are so long that is why they come over another and then it is impossible to read x-ticks.
KEEP IN MIND X-ticks are not hard coded and they are changing. So not always same x-ticks.
So for following example it would be good if I have instead of to Schleswig-Holstein
I could have:
ANSWER
Answered 2019-Mar-27 at 10:53You can use re
as suggested on this answer and create a list of new labels with a new line character after every 10th character.
QUESTION
I am optimizing 2 pyomo energy models with a solver called GLPK.
When you let solver write its output via: result = optim.solve(model, tee=True)
Solver gives an output in cmd as:
...ANSWER
Answered 2019-Jan-16 at 22:47I don't know if there is a more direct way, but this is how I retrieve infos from solver logs.:
Solve the problem while saving the solver log file at a place that you will be able to get later.
QUESTION
I have a python dict and following is an output of the keys of the dict:
...ANSWER
Answered 2019-Jan-15 at 13:21Some of the keys of es_dict
are class objects, which are not iterable. You can add a condition to ensure that the key is a string before using the in
operator to check if 'line'
is a substring of it:
QUESTION
I have the following dataframe:
...ANSWER
Answered 2019-Jan-10 at 16:46I think I understand what you are looking for:
for step 1: just get the index values:
QUESTION
I am getting a syntax error while trying to index a python dict:
...ANSWER
Answered 2018-Nov-21 at 11:42Your key is a tuple of two objects (Bus, Transformer), so in order to index it, I suppose you have to store that tuple somewhere when that dictionary is created in order to access it later or to extract the key. You can use this:
QUESTION
I built an electricity energysystem with 6 busses with oemof. Every bus has an easy input. And bus 1 is connected to bus 2 in both direction (2 transformsers). Bus 2 is connected to bus 3 on the same way. …. bus 6 is connected to bus 1. So it is a ring structure. Every bus has a sink. The bus 1 is also connected with a gas bus by an gas power plant. The gas bus has 1 input with energy. Now I started to connect one demand on bus 1 with 8760 time steps (one year). I let the program solve the flow of every object in this energysystem. I got the solution after 40 seconds. But my goal is to solve the problem with more demands in the system. So I integrated a second demand on bus 2. Now the calculation time was about 3 minutes. With an third demand on bus 3 the calculation time was 15 minutes. And with a demand at every bus, it takes more than 40min.
My processor is an i5 4670K 3.4 GHz.
My problem is: Why the CBC solver needs so much time to solve the problem with more demands in the energysystem? Is there any reason?
Do you now how the solver exactly works? I couldn’t find any answer
With one demand in the system:
...ANSWER
Answered 2017-Apr-03 at 12:35I do agree that 40min seems to be too long for such a small system.
Normally the solver time increases significantly if the problem is infeasible. Therefore you should make sure that the problem is still solvable after you added additional demand objects. By the way, different units (or prefixes) are a typical source of error.
An easy way to make your problem solvable is to add unlimited excess and shortage objects to every bus (balance). Make sure that the shortage source is more expensive for the solver than all other objects, otherwise it might be used instead of your power plants.
For oemof.solph it looks like this (e.g. bus_1):
QUESTION
How can I model a heat pump in the oemof. I think it is necessary to create three buses (low temperature reservoir, electricity, high temperature). But the LinearTransformer class does not allow more than one input. Is there another way to do it?
I would like to set an oemof tag but I am not allowed to do so.
...ANSWER
Answered 2017-Mar-31 at 11:32It depends on which oemof version you use. If you use oemof < v0.1.2 you have to model it with just two buses. You can calculate the COP in advance using the temperature of the reservoir and the average temperature of the heat bus. You can pass it as a list, numpy.array, pandas.Series etc..
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install oemof
You can use oemof like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page