- Notifications
You must be signed in to change notification settings - Fork6
Transmission System Network Inference
License
OpenGridMap/transnet
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The Transnet project consists of a set of Python and Matlab scripts for the automatic inference of high voltage power (transmission) grids based on crowdsourced OpenStreetMap (OSM) data. Transnet yields two different models, a Common Information Model (CIM) model and a Matlab Simulink model. The latter can be used to perform load flow analysis. This manual guides you to the Transnet setup and gives several usage examples.
Information about Transnet can be found in the Masterthesis of Johannes Leimhofer.
Checkout the Transnet project:
git clone --depth=1 https://github.com/OpenGridMap/transnet transnetDownload and install miniconda for Python-2.7 (https://www.anaconda.com/download/#linux)
# dismiss yes/no installation dialogsconda config --set always_yes true# create transnet environment and install shapely packageconda create --name transnet python=2.7# change to transnet environmentsource activate transnet# install required python packagesconda install shapelyconda install --channel https://conda.anaconda.org/IOOS cartopyconda install psycopg2conda install -c auto PyCIMconda install scipyconda install -c anaconda mysql-connector-python=2.0.3conda install matplotlibconda install gdal#conda install libgdalTransnet relies on a local PostgreSQL + PostGIS installation, which is the host of power-relevant OSM data.To install PostgreSQL + PostGIS open a terminal and install the toolosm2pgsql, which should also install the required PostgreSQL + PostGIS database:
sudo apt-get install osm2pgsqlChange password of user postgres:
sudo -u postgres psql -c '\password'Create a PostGIS-enabled database template:
sudo -u postgres createdb -U postgres -h localhost transnet_templatesudo -u postgres psql -d transnet_template -U postgres -q -h localhost -c "CREATE EXTENSION postgis;"sudo -u postgres psql -d transnet_template -U postgres -q -h localhost -c "CREATE EXTENSION hstore;"sudo -u postgres psql -d transnet_template -U postgres -h localhost -f transnet/sql/transnet_functions.sqlThe data is filtered for power-relevant data by theosmosis tool and the import to the PostgreSQL database is done with theosm2pgsql tool.Install the toolosmosis:
sudo apt-get install osmosisNow you are ready to go to use theprepare_db.sh shell script that sets up the database for a specific region for you.The script requires the path to a config file as input parameter. For several countries such config files already exist in theconfigs subdirectory.For example, let's have a look at the config file for Austria (configs/countries/austria.conf):
### Databasedname='austria'duser='postgres'dpassword='OpenGridMap'### Data Source and Destination## Data Source# specify either the location of dump and poly file or specify the download link#ddump=/Users/lej/Downloads/austria-latest.osm.pbf#pfile='/Users/lej/Downloads/austria.poly'ddump_url='http://download.geofabrik.de/europe/austria-latest.osm.pbf'pfile_url='http://download.geofabrik.de/europe/austria.poly'## Destination Directorydestdir='austria'### Transnetvlevels='220000|380000'## Transnet arguments# -t plot topology# -v verbose logging# -l load estimation (does only work for Germany, Austria and Switzerland)# -e evaluation of point-to-point connections (only makes sense for Germany, since coverage of OSM data is sufficient high)trans_args='-t'As you can see, the config file requires you to specify the database name, user, and password for the database.Furthermore, you can decide whether to specify the download links to the OSM data dump file and the corresponding poly (region boundary) file or to specify the path to the already downloaded files.Finally, for the execution of Transnet (later on) you can choose from various arguments, as described in the config file.
Once the config file is ready, prepare the database with the following command:Note: You should specify a .passfile in your home directory according tohttps://www.postgresql.org/docs/9.1/static/libpq-pgpass.html.
cd transnet/bash./prepare_db.sh ../configs/countries/austria.confThe administrative data for the load estimation is derived from OpenGeoDB. To provide OpenGeoDB locally, we set up a local MySQL database and import an OpenGeoDB dump.Here is a guide that lists the required steps to set up a OpenGeoDB locally:http://opengeodb.giswiki.org/wiki/Datenbank_erstellen
Once you have set up the database, you are ready to go to run Transnet with therun.sh script. Before that, make sure that you have configured the right path to your MATLAB installation inrun.sh.To run Transnet for a specific region (in this case Austria), enter the following command:
cd transnet/bash./run.sh ../configs/austria.confAfter a successful inference the resulting models are placed into themodels/$destdir subdirectory.
About
Transmission System Network Inference
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Contributors4
Uh oh!
There was an error while loading.Please reload this page.