Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linopy Integration #351

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,8 @@ rule copy_config:


rule solve_network:
params:
solving=config["solving"],
input:
overrides="data/override_component_attrs",
# network=RDIR
Expand Down
66 changes: 57 additions & 9 deletions config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -371,17 +371,65 @@ solving:

solver:
name: gurobi
threads: 25
method: 2 # barrier
crossover: 0
BarConvTol: 1.e-6
Seed: 123
AggFill: 0
PreDual: 0
GURO_PAR_BARDENSETHRESH: 200
#FeasibilityTol: 1.e-6
options: gurobi-default

solver_options:
highs-default:
# refer to https://ergo-code.github.io/HiGHS/dev/options/definitions/
threads: 4
solver: "ipm"
run_crossover: "off"
small_matrix_value: 1e-6
large_matrix_value: 1e9
primal_feasibility_tolerance: 1e-5
dual_feasibility_tolerance: 1e-5
ipm_optimality_tolerance: 1e-4
parallel: "on"
random_seed: 123
gurobi-default:
threads: 4
method: 2 # barrier
crossover: 0
BarConvTol: 1.e-6
Seed: 123
AggFill: 0
PreDual: 0
GURO_PAR_BARDENSETHRESH: 200
gurobi-numeric-focus:
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
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
copt-default:
Threads: 8
LpMethod: 2
Crossover: 0
cbc-default: {} # Used in CI
glpk-default: {} # Used in CI

mem: 30000 #memory in MB; 20 GB enough for 50+B+I+H2; 100 GB for 181+B+I+H2
walltime: "12:00:00"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In pypsa-eur, the standard parameter is "runtime", may be good to revise?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @davide-f, I will check it out.


plotting:
map:
Expand Down
70 changes: 60 additions & 10 deletions config.pypsa-earth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -390,16 +390,66 @@ solving:
track_iterations: false
#nhours: 10
solver:
name: gurobi
threads: 4
method: 2 # barrier (=ipm)
crossover: 0
BarConvTol: 1.e-5
FeasibilityTol: 1.e-6
AggFill: 0
PreDual: 0
GURO_PAR_BARDENSETHRESH: 200

name: highs
options: highs-default

solver_options:
highs-default:
# refer to https://ergo-code.github.io/HiGHS/dev/options/definitions/
threads: 4
solver: "ipm"
run_crossover: "off"
small_matrix_value: 1e-6
large_matrix_value: 1e9
primal_feasibility_tolerance: 1e-5
dual_feasibility_tolerance: 1e-5
ipm_optimality_tolerance: 1e-4
parallel: "on"
random_seed: 123
gurobi-default:
threads: 4
method: 2 # barrier
crossover: 0
BarConvTol: 1.e-6
Seed: 123
AggFill: 0
PreDual: 0
GURO_PAR_BARDENSETHRESH: 200
gurobi-numeric-focus:
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
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
copt-default:
Threads: 8
LpMethod: 2
Crossover: 0
cbc-default: {} # Used in CI
glpk-default: {} # Used in CI

mem: 30000 #memory in MB; 20 GB enough for 50+B+I+H2; 100 GB for 181+B+I+H2
walltime: "12:00:00"

plotting:
map:
Expand Down
Loading
Loading