[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
3bbd321b82
commit
5ab10eae37
@ -292,14 +292,14 @@ solving:
|
|||||||
min_iterations: 4
|
min_iterations: 4
|
||||||
max_iterations: 6
|
max_iterations: 6
|
||||||
keep_shadowprices:
|
keep_shadowprices:
|
||||||
- Bus
|
- Bus
|
||||||
- Line
|
- Line
|
||||||
- Link
|
- Link
|
||||||
- Transformer
|
- Transformer
|
||||||
- GlobalConstraint
|
- GlobalConstraint
|
||||||
- Generator
|
- Generator
|
||||||
- Store
|
- Store
|
||||||
- StorageUnit
|
- StorageUnit
|
||||||
|
|
||||||
solver:
|
solver:
|
||||||
name: gurobi
|
name: gurobi
|
||||||
|
@ -373,9 +373,11 @@ def extra_functionality(n, snapshots):
|
|||||||
|
|
||||||
|
|
||||||
def solve_network(n, config, opts="", **kwargs):
|
def solve_network(n, config, opts="", **kwargs):
|
||||||
set_of_options = config['solving']['solver']['options']
|
set_of_options = config["solving"]["solver"]["options"]
|
||||||
solver_options = config['solving']["solver_options"][set_of_options] if set_of_options else {}
|
solver_options = (
|
||||||
solver_name = config['solving']['solver']['name']
|
config["solving"]["solver_options"][set_of_options] if set_of_options else {}
|
||||||
|
)
|
||||||
|
solver_name = config["solving"]["solver"]["name"]
|
||||||
cf_solving = config["solving"]["options"]
|
cf_solving = config["solving"]["options"]
|
||||||
track_iterations = cf_solving.get("track_iterations", False)
|
track_iterations = cf_solving.get("track_iterations", False)
|
||||||
min_iterations = cf_solving.get("min_iterations", 4)
|
min_iterations = cf_solving.get("min_iterations", 4)
|
||||||
@ -420,7 +422,7 @@ if __name__ == "__main__":
|
|||||||
if tmpdir is not None:
|
if tmpdir is not None:
|
||||||
Path(tmpdir).mkdir(parents=True, exist_ok=True)
|
Path(tmpdir).mkdir(parents=True, exist_ok=True)
|
||||||
opts = snakemake.wildcards.opts.split("-")
|
opts = snakemake.wildcards.opts.split("-")
|
||||||
solve_opts = snakemake.config['solving']['options']
|
solve_opts = snakemake.config["solving"]["options"]
|
||||||
|
|
||||||
fn = getattr(snakemake.log, "memory", None)
|
fn = getattr(snakemake.log, "memory", None)
|
||||||
with memory_logger(filename=fn, interval=30.0) as mem:
|
with memory_logger(filename=fn, interval=30.0) as mem:
|
||||||
|
Loading…
Reference in New Issue
Block a user