The task 'osmtgmod_to_pypsa' currently fails when the task 'insert-gas-grid' run before due to duplicate key values.
This happens because 'osmtgmod_to_pypsa' doesn't check if thebus_id already exist.
I remember that we wanted to keep the bus_id from the substations/osmtgmod. I see three options to solve this problem:
all tasks which insert data to the grid.egon_pf_hv_bus table have to run after 'osmtgmod_to_pypsa' and check if the bus_idalready exist
rethink to keep the substation ids and maybe create a bus_id-sequence
use string instead of integer values for the bus_id (e.g. '1 AC' and '1 gas').
The first option is very easy to implement, but also leads to less parallel tasks and longer computation times.
The task 'osmtgmod_to_pypsa' currently fails when the task 'insert-gas-grid' run before due to duplicate key values. This happens because 'osmtgmod_to_pypsa' doesn't check if the
bus_id
already exist.I remember that we wanted to keep the bus_id from the substations/osmtgmod. I see three options to solve this problem:
bus_id
already existbus_id
-sequencebus_id
(e.g. '1 AC' and '1 gas').The first option is very easy to implement, but also leads to less parallel tasks and longer computation times.