Skip to content

Commit

Permalink
Dev branch merge (#24)
Browse files Browse the repository at this point in the history
* 110 kV connection of substation

is now marked with connection_110kv = TRUE

* power lines deletion modification

power lines which are outside of Germany and are part of a relation
crossing the border are not deleted anymore.

* Bugfix

Conn_subgraphs was active but was not defined. Is now disabled.

* New result tables which indicate

 if a Substation is connected to the 110kV distribution grid. (In case
minimal voltage is above 110kV)

* Bugfix for deletion of open end lines

They haven’t been removed from power_circ_members even if the circuit
has been removed. Solved this issue now.

* Implemented connection of dead end relations with substations

also for Substations outside of Germany.
  • Loading branch information
arjunane authored Sep 26, 2016
1 parent 19adb9a commit d7471fd
Show file tree
Hide file tree
Showing 5 changed files with 444 additions and 132 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

*.pyc

*.pbf

*.qgs

*.csv
21 changes: 21 additions & 0 deletions code/build_up_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,17 @@ CREATE TABLE IF NOT EXISTS results.nuts3_subst(
ALTER TABLE results.nuts3_subst DROP CONSTRAINT IF EXISTS result_fk;
ALTER TABLE results.nuts3_subst
ADD CONSTRAINT result_fk foreign key (result_id) references results.results_metadata (id) ON DELETE CASCADE;

CREATE TABLE IF NOT EXISTS results.nuts3_subst_110kv(
result_id INT,
nuts_id Character Varying (14),
substation_id BIGINT,
percentage NUMERIC,
distance NUMERIC);

ALTER TABLE results.nuts3_subst_110kv DROP CONSTRAINT IF EXISTS result_fk;
ALTER TABLE results.nuts3_subst_110kv
ADD CONSTRAINT result_fk foreign key (result_id) references results.results_metadata (id) ON DELETE CASCADE;

CREATE TABLE IF NOT EXISTS results.plz_subst(
result_id INT,
Expand All @@ -179,6 +190,16 @@ ALTER TABLE results.plz_subst DROP CONSTRAINT IF EXISTS result_fk;
ALTER TABLE results.plz_subst
ADD CONSTRAINT result_fk foreign key (result_id) references results.results_metadata (id) ON DELETE CASCADE;

CREATE TABLE IF NOT EXISTS results.plz_subst_110kv(
result_id INT,
plz INTEGER,
substation_id BIGINT,
percentage NUMERIC,
distance NUMERIC);

ALTER TABLE results.plz_subst_110kv DROP CONSTRAINT IF EXISTS result_fk;
ALTER TABLE results.plz_subst_110kv
ADD CONSTRAINT result_fk foreign key (result_id) references results.results_metadata (id) ON DELETE CASCADE;

CREATE TABLE IF NOT EXISTS results.substations(
result_id INT,
Expand Down
Loading

0 comments on commit d7471fd

Please sign in to comment.