Skip to content

Commit c7893be

Browse files
SermishaNarayanapre-commit-ci[bot]brynpickering
authored
Bug fix (#224)
* Add missing `fes_scenario` wildcard to bid_offer_multiplier rule output * Use script path provider --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bryn Pickering <17178478+brynpickering@users.noreply.github.com>
1 parent b748dd2 commit c7893be

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

rules/gb-model/redispatch.smk

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ rule fetch_bid_offer_data_elexon:
3939
log:
4040
logs("fetch_bid_offer_data_elexon_{bod_year}.log"),
4141
script:
42-
"../../scripts/gb_model/redispatch/fetch_bid_offer_data_elexon.py"
42+
scripts("gb_model/redispatch/fetch_bid_offer_data_elexon.py")
4343

4444

4545
rule calculate_bid_offer_multipliers:
@@ -58,18 +58,18 @@ rule calculate_bid_offer_multipliers:
5858
bod_year=config["redispatch"]["elexon"]["years"],
5959
),
6060
output:
61-
csv=resources("gb-model/bid_offer_multipliers.csv"),
61+
csv=resources("gb-model/{fes_scenario}/bid_offer_multipliers.csv"),
6262
log:
63-
logs("calculate_bid_offer_multipliers.log"),
63+
logs("calculate_bid_offer_multipliers_{fes_scenario}.log"),
6464
script:
65-
"../../scripts/gb_model/redispatch/calculate_bid_offer_multipliers.py"
65+
scripts("gb_model/redispatch/calculate_bid_offer_multipliers.py")
6666

6767

6868
rule calc_interconnector_bid_offer_profile:
6969
message:
7070
"Calculate interconnector bid/offer profiles"
7171
input:
72-
bids_and_offers=resources("gb-model/bid_offer_multipliers.csv"),
72+
bids_and_offers=resources("gb-model/{fes_scenario}/bid_offer_multipliers.csv"),
7373
unconstrained_result=RESULTS
7474
+ "networks/{fes_scenario}/unconstrained_clustered/{year}.nc",
7575
output:
@@ -93,7 +93,7 @@ rule prepare_constrained_network:
9393
interconnector_bid_offer=resources(
9494
"gb-model/{fes_scenario}/interconnector_bid_offer_profile/{year}.csv"
9595
),
96-
bids_and_offers=resources("gb-model/bid_offer_multipliers.csv"),
96+
bids_and_offers=resources("gb-model/{fes_scenario}/bid_offer_multipliers.csv"),
9797
output:
9898
network=resources("networks/{fes_scenario}/constrained_clustered/{year}.nc"),
9999
log:

scripts/gb_model/redispatch/calculate_bid_offer_multipliers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
import numpy as np
1313
import pandas as pd
1414

15-
from scripts._helpers import configure_logging, get_scenario_name, set_scenario_config
15+
from scripts._helpers import configure_logging, set_scenario_config
16+
from scripts.gb_model._helpers import get_scenario_name
1617
from scripts.gb_model.generators.assign_costs import (
1718
_load_costs,
1819
_load_fes_carbon_costs,

0 commit comments

Comments
 (0)