diff --git a/config.default.yaml b/config.default.yaml index 05a55c99..c6f8734b 100644 --- a/config.default.yaml +++ b/config.default.yaml @@ -386,7 +386,10 @@ solving: solver: name: gurobi - options: + options: gurobi-default + + solver_options: + gurobi-default: threads: 4 method: 2 # barrier crossover: 0 @@ -395,14 +398,38 @@ solving: AggFill: 0 PreDual: 0 GURO_PAR_BARDENSETHRESH: 200 - #FeasibilityTol: 1.e-6 + seed: 10 # Consistent seed for all plattforms + gurobi-numeric-focus: + name: gurobi + NumericFocus: 3 # Favour numeric stability over speed + method: 2 # barrier + crossover: 0 # do not use crossover + BarHomogeneous: 1 # Use homogeneous barrier if standard does not converge + BarConvTol: 1.e-5 + FeasibilityTol: 1.e-4 + OptimalityTol: 1.e-4 + ObjScale: -0.5 + threads: 8 + Seed: 123 + gurobi-fallback: # Use gurobi defaults + name: gurobi + crossover: 0 + method: 2 # barrier + BarHomogeneous: 1 # Use homogeneous barrier if standard does not converge + BarConvTol: 1.e-5 + FeasibilityTol: 1.e-5 + OptimalityTol: 1.e-5 + Seed: 123 + threads: 8 + cplex-default: + threads: 4 + lpmethod: 4 # barrier + solutiontype: 2 # non basic solution, ie no crossover + barrier_convergetol: 1.e-5 + feasopt_tolerance: 1.e-6 + + cbc-default: {} # Used in CI - #name: cplex - #threads: 4 - #lpmethod: 4 # barrier - #solutiontype: 2 # non basic solution, ie no crossover - #barrier_convergetol: 1.e-5 - #feasopt_tolerance: 1.e-6 mem: 30000 #memory in MB; 20 GB enough for 50+B+I+H2; 100 GB for 181+B+I+H2 diff --git a/scripts/plot_network.py b/scripts/plot_network.py index 53c52187..fdc131c9 100644 --- a/scripts/plot_network.py +++ b/scripts/plot_network.py @@ -62,6 +62,10 @@ def plot_map(network, components=["links", "stores", "storage_units", "generator for comp in components: df_c = getattr(n, comp) + + if df_c.empty: + continue + df_c["nice_group"] = df_c.carrier.map(rename_techs_tyndp) attr = "e_nom_opt" if comp == "stores" else "p_nom_opt" diff --git a/scripts/solve_network.py b/scripts/solve_network.py index b2201478..cad726d2 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -247,7 +247,8 @@ def extra_functionality(n, snapshots): def solve_network(n, config, opts='', **kwargs): - solver_options = config['solving']['solver']['options'] + options = config['solving']['solver']['options'] + solver_options = config['solving']["solver_options"][options] if options else None solver_name = config['solving']['solver']['name'] cf_solving = config['solving']['options'] track_iterations = cf_solving.get('track_iterations', False) diff --git a/test/config.myopic.yaml b/test/config.myopic.yaml index 9de3fa8a..f643154d 100644 --- a/test/config.myopic.yaml +++ b/test/config.myopic.yaml @@ -30,6 +30,6 @@ sector: solving: solver: name: cbc - options: null + options: cbc-default mem: 4000 #memory in MB; 20 GB enough for 50+B+I+H2; 100 GB for 181+B+I+H2 diff --git a/test/config.overnight.yaml b/test/config.overnight.yaml index f0770345..ee79bb24 100644 --- a/test/config.overnight.yaml +++ b/test/config.overnight.yaml @@ -29,6 +29,6 @@ sector: solving: solver: name: cbc - options: null + options: cbc-default mem: 4000 #memory in MB; 20 GB enough for 50+B+I+H2; 100 GB for 181+B+I+H2