How to use eTraGo?¶
After you installed eTraGo you would typically start optimization runs by
executing the ‘appl.py’ which is situated in
./eTrago/etrago/ (e.g by
eTraGo doesn’t have a graphical user interface,
the ‘appl.py’ is used as a simple user interface which can be edited with
the preferred python-editor.
Here parameters, calculation methods and scenario settings are set in a python
dictionary called ‘args’.
To run the desired calculation, it is crucial to understand these parameters.
In addition, some of them contradict the usage of others.
You find the documentation of all defined parameters from the ‘args’ here:
Alternatively, the ‘args’ dictionary can be edited in a json-file.
Then the path to the json-file has to be set in the initilization of the
etrago.tools.network.Etrago). Once a path is given
the ‘args’ dictionary within the ‘appl.py’ is ignored
and replaced by the ‘args’ of the json-file.
The appl.py contains the
etrago.appl.run_etrago() function which uses the
defined ‘args’ dictionary to start the desired calculation.
To improve the performance of the optimization of the selected solver, you might want to use solver options (part of ‘args’). For gurobi the most used ones are described here.
For more specific or extensive changes you are highly invited to write code and add new functionalities.
Once the calculation has finished the PyPSA network of the Etrago-object will
contain all results. Som main results (e.g. anuual system costs) are calculated
etrago.calc_results() and can be accesed via ‘etrago.results’.
You can use several plotting functions from the
etrago.tools.plot() in order
to visualize the results. For example
etrago.tools.plot.plot_grid() can be used to plot relative line loading
in % or the optimized expansion of all AC lines and DC links of the network.
To save the results you can write them to csv files. These functionalites can be specified also in the ‘args’ dictionary.