solve_network.py: Remove hacked installation of conda libraries
This commit is contained in:
parent
ab401907b2
commit
5dc572c35e
@ -40,11 +40,8 @@ projects % git clone git@github.com:nworbmot/pypsa-eur-sec.git
|
|||||||
|
|
||||||
The requirements are the same as
|
The requirements are the same as
|
||||||
[PyPSA-Eur](https://github.com/PyPSA/pypsa-eur), but for
|
[PyPSA-Eur](https://github.com/PyPSA/pypsa-eur), but for
|
||||||
`solve_network.py` in addition you need `gurobipy` and version 0.16.0
|
`solve_network.py` in addition you need `gurobipy` and version 0.16.1
|
||||||
or greater of PyPSA in order to use the `nomopyomo` framework. These
|
or greater of PyPSA in order to use the `nomopyomo` framework.
|
||||||
libraries are currently imported "by hand" at the start of the
|
|
||||||
`solve_network.py` script.
|
|
||||||
|
|
||||||
|
|
||||||
## Data requirements
|
## Data requirements
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ rule build_industrial_demand:
|
|||||||
|
|
||||||
rule prepare_sector_network:
|
rule prepare_sector_network:
|
||||||
input:
|
input:
|
||||||
network=pypsaeur('networks/{network}_s{simpl}_{clusters}_ec_lv{lv}_{opts}.nc'),
|
network=pypsaeur('networks/{network}_s{simpl}_{clusters}_lv{lv}_{opts}.nc'),
|
||||||
energy_totals_name='data/energy_totals.csv',
|
energy_totals_name='data/energy_totals.csv',
|
||||||
co2_totals_name='data/co2_totals.csv',
|
co2_totals_name='data/co2_totals.csv',
|
||||||
transport_name='data/transport_data.csv',
|
transport_name='data/transport_data.csv',
|
||||||
@ -219,7 +219,7 @@ rule solve_network:
|
|||||||
memory="logs/" + config['run'] + "/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_memory.log"
|
memory="logs/" + config['run'] + "/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_memory.log"
|
||||||
benchmark: "benchmarks/solve_network/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}"
|
benchmark: "benchmarks/solve_network/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}"
|
||||||
threads: 4
|
threads: 4
|
||||||
resources: mem=20000 #memory in MB; 40 GB enough for 45+B+I; 100 GB based on RESI usage for 128
|
resources: mem=100000 #memory in MB; 40 GB enough for 45+B+I; 100 GB based on RESI usage for 128
|
||||||
# group: "solve" # with group, threads is ignored https://bitbucket.org/snakemake/snakemake/issues/971/group-job-description-does-not-contain
|
# group: "solve" # with group, threads is ignored https://bitbucket.org/snakemake/snakemake/issues/971/group-job-description-does-not-contain
|
||||||
script: "scripts/solve_network.py"
|
script: "scripts/solve_network.py"
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ logging_level: INFO
|
|||||||
|
|
||||||
results_dir: 'results/'
|
results_dir: 'results/'
|
||||||
summary_dir: results
|
summary_dir: results
|
||||||
run: '191222-181-lv'
|
run: '200126-181-lv-solar3'
|
||||||
|
|
||||||
scenario:
|
scenario:
|
||||||
sectors: [E] # ,E+EV,E+BEV,E+BEV+V2G] # [ E+EV, E+BEV, E+BEV+V2G ]
|
sectors: [E] # ,E+EV,E+BEV,E+BEV+V2G] # [ E+EV, E+BEV, E+BEV+V2G ]
|
||||||
@ -10,7 +10,7 @@ scenario:
|
|||||||
lv: [1.0, 1.125, 1.25, 1.5, 2.0]# or opt
|
lv: [1.0, 1.125, 1.25, 1.5, 2.0]# or opt
|
||||||
clusters: [181] #[90, 128, 181] #[45, 64, 90, 128, 181, 256] #, 362] # (2**np.r_[5.5:9:.5]).astype(int) minimum is 37
|
clusters: [181] #[90, 128, 181] #[45, 64, 90, 128, 181, 256] #, 362] # (2**np.r_[5.5:9:.5]).astype(int) minimum is 37
|
||||||
opts: [''] #for pypsa-eur
|
opts: [''] #for pypsa-eur
|
||||||
sector_opts: [Co2L0-3H-T-H-B-I]#Co2L0-3H-T-H-B-I-onwind0-solar3,Co2L0-3H-T-H-B-I-onwind0p125-solar3,Co2L0-3H-T-H-B-I-onwind0p25-solar3,Co2L0-3H-T-H-B-I-onwind0p50-solar3,Co2L0-3H-T-H-B-I-solar3]#[Co2L0-3H-T-H-B-I]#,Co2L0p2-3H-T-H-B-I,Co2L0p5-3H-T-H-B-I]#,Co2L0p1-3H-T-H-B-I,Co2L0p25-3H-T-H-B-I,Co2L0p5-3H-T-H-B-I]#[Co2L0-3H-T-H-B-I-onwind0-solar3,Co2L0-3H-T-H-B-I-onwind0p125-solar3,Co2L0-3H-T-H-B-I-onwind0p25-solar3,Co2L0-3H-T-H-B-I-onwind0p50-solar3,Co2L0-3H-T-H-B-I-solar3]#,Co2L0-3H-T-H-B-I-onwind0p25-solar3]#,Co2L0p05-3H-T-H-B-I,Co2L0p10-3H-T-H-B-I,Co2L0p20-3H-T-H-B-I,Co2L0p30-3H-T-H-B-I,Co2L0p50-3H-T-H-B-I]#[Co2L-3H-T-H,Co2L0p10-3H-T-H,Co2L0-3H-T-H,Co2L0p20-3H-T-H] #Co2L-3H-T-H,Co2L0p10-3H-T-H,Co2L0p20-3H-T-HCo2L-3H-T-H,Co2L0p10-3H-T-H,Co2L0p30-3H-T-H,Co2L0p50-3H-T-H] #Co2L-3H,Co2L-3H-T,, LC-FL, LC-T, Ep-T, Co2L-T]
|
sector_opts: [Co2L0-3H-T-H-B-I-solar3]#Co2L0-3H-T-H-B-I-onwind0-solar3,Co2L0-3H-T-H-B-I-onwind0p125-solar3,Co2L0-3H-T-H-B-I-onwind0p25-solar3,Co2L0-3H-T-H-B-I-onwind0p50-solar3,Co2L0-3H-T-H-B-I-solar3]#[Co2L0-3H-T-H-B-I]#,Co2L0p2-3H-T-H-B-I,Co2L0p5-3H-T-H-B-I]#,Co2L0p1-3H-T-H-B-I,Co2L0p25-3H-T-H-B-I,Co2L0p5-3H-T-H-B-I]#[Co2L0-3H-T-H-B-I-onwind0-solar3,Co2L0-3H-T-H-B-I-onwind0p125-solar3,Co2L0-3H-T-H-B-I-onwind0p25-solar3,Co2L0-3H-T-H-B-I-onwind0p50-solar3,Co2L0-3H-T-H-B-I-solar3]#,Co2L0-3H-T-H-B-I-onwind0p25-solar3]#,Co2L0p05-3H-T-H-B-I,Co2L0p10-3H-T-H-B-I,Co2L0p20-3H-T-H-B-I,Co2L0p30-3H-T-H-B-I,Co2L0p50-3H-T-H-B-I]#[Co2L-3H-T-H,Co2L0p10-3H-T-H,Co2L0-3H-T-H,Co2L0p20-3H-T-H] #Co2L-3H-T-H,Co2L0p10-3H-T-H,Co2L0p20-3H-T-HCo2L-3H-T-H,Co2L0p10-3H-T-H,Co2L0p30-3H-T-H,Co2L0p50-3H-T-H] #Co2L-3H,Co2L-3H-T,, LC-FL, LC-T, Ep-T, Co2L-T]
|
||||||
# Co2L will give default (5%); Co2L0p25 will give 25% CO2 emissions; Co2Lm0p05 will give 5% negative emissions
|
# Co2L will give default (5%); Co2L0p25 will give 25% CO2 emissions; Co2Lm0p05 will give 5% negative emissions
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,14 +1,3 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
os.system("conda install -y -c gurobi gurobi=8.1.0")
|
|
||||||
|
|
||||||
os.system("conda install -y -c conda-forge pypsa=0.16.1")
|
|
||||||
|
|
||||||
#import sys
|
|
||||||
|
|
||||||
#sys.path = ["pypsa"] + sys.path
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
Loading…
Reference in New Issue
Block a user