Simulation der Region Anhalt-Bitterfeld-Wittenberg im Projekt WindNODE
Further details are provided in the documentation.
Clone and install via pip install -e
(a virtualenv is recommended).
Notice: The recent package psycopg2-binary in setup.py conflicts with the psycopg2 required by egoio. If the install breaks, use the following temporary workaround:
Install requirements manually in your venv, egoio should be the last.
Install it without dependencies by using pip install --no-dependencies egoio
.
To run the model, you also need a solver to be installed such as CBC or Gurobi.
On Linux, you can install CBC with apt install coinor-cbc
. Make sure the
solver is set in the run configuration dict in run_scenario.py
.
During the installtion of windnode_abw
, the package psutils
might fail. Install the system package python3-dev
with
sudo apt install python3-dev
During the installtion of windnode_abw
, the package pygraphviz
might fail. Install additional system packages with
sudo apt install python3-dev graphviz libgraphviz-dev pkg-config
Note You don't have to necessarily use docker to create a Postgres database. Using a native installtion works as well
Inside the repo's root directory (where docker-compose.yml lives) execute
docker-compose up -d --build
Afterwards you can access the database via
Field | Value |
---|---|
host | localhost |
port | 54321 |
Maintance DB | windnode_abw |
User | windnode |
Password | windnode |
Scenario data is contained in the database dump which can be downloaded from Zenodo. Do the following steps to import the scenario data to your database
- Download the above scenario data file
- Import tables, data, and constraints by
To overwrite existing tables, you may use the
pg_restore -U windnode -d windnode_abw -h localhost -p 54321 -W --no-owner --no-privileges --no-tablespace -1 </path/to/windnode_db_200817.backup>
--clean
argument.
When you try to run windnode_abw/run_scenario.py
, it will search for the file $HOME/.egoio/config.ini
.
More specifically, in the file config.ini
it searches for a section [windnode_abw]
.
It won't be found whe you run it for the first time. Subsequently, a command-line dialog opens that asks you for
database connection details.
When you use a local database, the section in the config looks like
[windnode_abw]
dialect = psycopg2
username = windnode
host = localhost
port = 54321
database = windnode_abw
Execute python windnode_abw/run_scenario.py
.