Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
19 changes: 19 additions & 0 deletions src/example/patches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type PatchMap = BTreeMap<&'static str, PatchInfo>;
static PATCHES: LazyLock<PatchMap> = LazyLock::new(get_all_patches);

/// Get all patches
#[allow(clippy::too_many_lines)]
fn get_all_patches() -> PatchMap {
[
// The simple example with gas boiler process made divisible
Expand Down Expand Up @@ -75,6 +76,24 @@ fn get_all_patches() -> PatchMap {
None,
),
),
(
// The circularity example with objective type set to NPV for all agents
"circularity_npv",
PatchInfo::new(
"circularity",
vec![FilePatch::new("agent_objectives.csv").with_replacement(&[
"agent_id,years,objective_type,decision_weight,decision_lexico_order",
"A0_OAG,all,npv,,",
"A0_ELC,all,npv,,",
"A0_RES,all,npv,,",
"A0_TRA,all,npv,,",
"A0_BPD,all,npv,,",
"A0_BPL,all,npv,,",
"A0_REF,all,npv,,",
])],
None,
),
),
(
// The simple example with electricity priced using marginal costs
"simple_marginal",
Expand Down
38 changes: 38 additions & 0 deletions tests/data/circularity_npv/asset_capacities.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
milestone_year,asset_id,group_id,capacity,num_units
2020,0,,4010.2,
2020,1,,1738.05,
2020,2,,3789.64,
2020,3,,716.5,
2020,4,,573.9,
2020,5,,3.964844,
2020,6,,2.999,
2020,7,,1.0,
2020,8,,31.54,
2020,9,,451.91,
2020,10,,176.58,
2020,11,,20.99,
2020,12,,15.0,
2020,13,,2900.0,
2020,14,,399.98,
2030,0,,4010.2,
2030,1,,1738.05,
2030,2,,3789.64,
2030,5,,3.964844,
2030,13,,2900.0,
2030,14,,399.98,
2030,15,,777.3007440837422,
2030,16,,355.83840587648046,
2030,17,,99.92739043230192,
2030,18,,917.2148800000001,
2030,19,,683.2097420156815,
2030,20,,717.3702291164655,
2040,5,,3.964844,
2040,16,,355.83840587648046,
2040,17,,99.92739043230192,
2040,19,,683.2097420156815,
2040,20,,717.3702291164655,
2040,21,,912.8939641298439,
2040,22,,3655.8189696,
2040,23,,146.65255650173742,
2040,24,,2075.9705583798527,
2040,25,,2179.7690862988466,
27 changes: 27 additions & 0 deletions tests/data/circularity_npv/assets.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
asset_id,group_id,process_id,region_id,agent_id,commission_year
0,,GASDRV,GBR,A0_OAG,2020
1,,OAGRSV,GBR,A0_OAG,2020
2,,GASPRC,GBR,A0_OAG,2020
3,,OILREF,GBR,A0_OAG,2020
4,,OILRF2,GBR,A0_OAG,2020
5,,WNDFRM,GBR,A0_ELC,2020
6,,GASCGT,GBR,A0_ELC,2020
7,,H2YGEN,GBR,A0_ELC,2020
8,,H2YPRO,GBR,A0_ELC,2020
9,,TPETCR,GBR,A0_TRA,2020
10,,TDIECR,GBR,A0_TRA,2020
11,,TELCCR,GBR,A0_TRA,2020
12,,THYBCR,GBR,A0_TRA,2020
13,,RGASBR,GBR,A0_RES,2020
14,,RELCHP,GBR,A0_RES,2020
15,,THYBCR,GBR,A0_TRA,2030
16,,RBIOBL,GBR,A0_RES,2030
17,,WNDFRM,GBR,A0_ELC,2030
18,,OILRF2,GBR,A0_REF,2030
19,,BIOPLL,GBR,A0_BPL,2030
20,,BIOPRO,GBR,A0_BPD,2030
21,,TELCCR,GBR,A0_TRA,2040
22,,RBIOBL,GBR,A0_RES,2040
23,,WNDFRM,GBR,A0_ELC,2040
24,,BIOPLL,GBR,A0_BPL,2040
25,,BIOPRO,GBR,A0_BPD,2040
Loading
Loading