use .replace to fix type error
This commit is contained in:
parent
3f112534a5
commit
4ac664b871
@ -306,11 +306,11 @@ if __name__ == "__main__":
|
||||
|
||||
# segments with package tsam
|
||||
time_seg_config = snakemake.params.snapshots.get("segmentation", False)
|
||||
time_seg_wildcard = get_opt(opts, r"^\d+seg$")[:-3]
|
||||
time_seg_wildcard = get_opt(opts, r"^\d+seg$")
|
||||
time_seg = time_seg_wildcard or time_seg_config
|
||||
if time_seg:
|
||||
solver_name = snakemake.config["solving"]["solver"]["name"]
|
||||
n = apply_time_segmentation(n, time_seg, solver_name)
|
||||
n = apply_time_segmentation(n, time_seg.replace("seg",""), solver_name)
|
||||
|
||||
Co2L_config = snakemake.params.co2limit_enable
|
||||
Co2L_wildcard, co2limit_wildcard = find_opt(opts, "Co2L")
|
||||
|
@ -599,10 +599,10 @@ def extra_functionality(n, snapshots):
|
||||
add_operational_reserve_margin(n, snapshots, config)
|
||||
|
||||
EQ_config = constraints.get("EQ", False)
|
||||
EQ_wildcard = get_opt(opts, r"^EQ+[0-9]*\.?[0-9]+(c|)")[2:]
|
||||
EQ_wildcard = get_opt(opts, r"^EQ+[0-9]*\.?[0-9]+(c|)")
|
||||
EQ_o = EQ_wildcard or EQ_config
|
||||
if EQ_o:
|
||||
add_EQ_constraints(n, EQ_o)
|
||||
add_EQ_constraints(n, EQ_o.replace("EQ",""))
|
||||
|
||||
add_battery_constraints(n)
|
||||
add_pipe_retrofit_constraint(n)
|
||||
|
Loading…
Reference in New Issue
Block a user