diff --git a/data/custom_powerplants.csv b/data/custom_powerplants.csv index 91fc5eec..4e039b7a 100644 --- a/data/custom_powerplants.csv +++ b/data/custom_powerplants.csv @@ -1 +1 @@ -id,Name,Fueltype,Technology,Set,Country,Capacity,Efficiency,Duration,Volume_Mm3,DamHeight_m,YearCommissioned,Retrofit,lat,lon,projectID \ No newline at end of file +Name,Fueltype,Technology,Set,Country,Capacity,Efficiency,Duration,Volume_Mm3,DamHeight_m,YearCommissioned,Retrofit,lat,lon,projectID,YearDecommissioning diff --git a/doc/release_notes.rst b/doc/release_notes.rst index ee16c96a..9484b2d5 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -7,6 +7,8 @@ PyPSA-Eur 0.2.0 (TBD) * The optimization is now performed using the ``pyomo=False`` setting in the :func:`pypsa.lopf.network_lopf`. This speeds up the solving process significantly and consumes much less memory. The inclusion of additional constraints were adjusted to the new implementation. They are all passed to the :func:`network_lopf` function via the ``extra_functionality`` argument. The rule ``trace_solve_network`` was integrated into the rule :mod:`solve_network` and can be activated via configuration with ``solving: options: track_iterations: true``. The charging and discharging capacities of batteries modelled as store-link combination are now coupled (`#116 `_). +* Removed the `id` column for custom power plants in `data/custom_powerplants.csv` to avoid custom power plants with conflicting ids getting attached to the wrong bus (`#131 `_). + * ``snakemake`` rules for retrieving cutouts and the natura raster can now be disabled independently from their respective rules to build them; via ``config.*yaml`` (`#136 `_). diff --git a/scripts/build_powerplants.py b/scripts/build_powerplants.py index 237c42b9..a5b0fd45 100755 --- a/scripts/build_powerplants.py +++ b/scripts/build_powerplants.py @@ -86,7 +86,7 @@ def add_custom_powerplants(ppl): dtype={'bus': 'str'}) if isinstance(custom_ppl_query, str): add_ppls.query(custom_ppl_query, inplace=True) - return ppl.append(add_ppls, sort=False) + return ppl.append(add_ppls, sort=False, ignore_index=True, verify_integrity=True) if __name__ == "__main__":