Merge pull request #64 from PyPSA/fneum-patch-1

base_network: scale snapshot weightings to sum up to 1 year
This commit is contained in:
Jonas Hörsch 2019-08-11 11:06:00 +02:00 committed by GitHub
commit 4a6355265b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -461,6 +461,7 @@ def base_network():
n.name = 'PyPSA-Eur'
n.set_snapshots(pd.date_range(freq='h', **snakemake.config['snapshots']))
n.snapshot_weightings[:] *= 8760./n.snapshot_weightings.sum()
n.import_components_from_dataframe(buses, "Bus")
n.import_components_from_dataframe(lines, "Line")