Frequently asked questions
Add yours to this list to help others by clicking Edit!
- How do I know how a particular input value is used?
Let's take as an example maintenance costs - how are these calculated?
The way to answer this kind of question is to look at the code, which should be at least vaguely informative.
Start on ReadTheDocs and look in the main ehub_model class where all the constraints are defined.
Find the relevant constraint (here
calc_maintenance_cost()) and click
For Converters, cost is summed over
self.energy_input[t][tech] * self.CONVERSION_EFFICIENCY[tech][energy] * self.OMV_COSTS[tech]. The cost for each tech is multiplied by input*efficiency=output, so this cost is $/kW output energy.
For Storages it's just
self.ANNUAL_MAINTENANCE_STORAGE_COSTS[storage] * self.is_installed_2[storage], so it's just a single value in $/year.
If you want to simplify Converters or expand the constraint for Storages, this can be done with a custom constraint.
- Should I use the module directly or via the BESOS platform?
The BESOS platform provides a Jupyter hub environment for executing and editing notebooks, along with various underlying repositories, including this one.
For new users, this is the easiest way to get started: you can run everything from one notebook, and it has everything you need pre-installed.
Models are executed on our server using GLPK.
Cloning this repository or running
pip install python-ehub might be more convenient if you have your own CPlex license, as this is a faster solver than GLPK, or if you want to interact with other codes.
You can still use the notebook interface locally if you have Jupyter notebook installed.
If you don't want to use notebooks, the input file is stored in Excel format, and can be parsed and run using just the Python module. We are working to transition the model to a more convenient format, at which point the Excel models will be depreciated.