Skip to content
Closed
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
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ dependencies = [
"xlrd",
"mypy-extensions",
"pypubsub",
"tomlkit"
"tomlkit",
"duckdb",
"fsspec"
]
dynamic = ["version"]

Expand Down
4 changes: 4 additions & 0 deletions src/muse/data/example/default_new_input/agent_objectives.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
agent_id,objective_type,decision_weight,objective_sort
A1_RES,LCOE,1,TRUE
A1_PWR,LCOE,1,TRUE
A1_GAS,LCOE,1,TRUE
4 changes: 4 additions & 0 deletions src/muse/data/example/default_new_input/agents.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
id,description,region_id,sector_id,search_rule,decision_rule,quantity
A1_RES,Residential sector agent,R1,residential,all,single,1
A1_PWR,Power sector agent,R1,power,all,single,1
A1_GAS,Gas sector agent,R1,gas,all,single,1
6 changes: 6 additions & 0 deletions src/muse/data/example/default_new_input/assets.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
agent_id,process_id,region_id,commission_year,capacity
A1_GAS,gassupply1,R1,1995,7.5
A1_GAS,gassupply1,R1,2000,7.5
A1_PWR,gasCCGT,R1,1995,1
A1_RES,gasboiler,R1,2015,5
A1_RES,gasboiler,R1,2020,5
6 changes: 6 additions & 0 deletions src/muse/data/example/default_new_input/commodities.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
id,description,type,unit
electricity,Electricity,energy,PJ
gas,Gas,energy,PJ
heat,Heat,energy,PJ
wind,Wind,energy,PJ
CO2f,Carbon dioxide,energy,kt
22 changes: 22 additions & 0 deletions src/muse/data/example/default_new_input/commodity_costs.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
commodity_id,region_id,year,value
electricity,R1,2020,19.5
electricity,R1,2025,21.93518528
electricity,R1,2030,26.50925917
electricity,R1,2035,26.51851861
electricity,R1,2040,23.85185194
electricity,R1,2045,23.97222222
electricity,R1,2050,24.06481472
gas,R1,2020,7.15275
gas,R1,2025,8.10645
gas,R1,2030,9.06015
gas,R1,2035,9.2191
gas,R1,2040,9.37805
gas,R1,2045,9.193829337
gas,R1,2050,9.009608674
CO2f,R1,2020,0.08314119
CO2f,R1,2025,0.120069795
CO2f,R1,2030,0.156998399
CO2f,R1,2035,0.214877567
CO2f,R1,2040,0.272756734
CO2f,R1,2045,0.35394801
CO2f,R1,2050,0.435139285
3 changes: 3 additions & 0 deletions src/muse/data/example/default_new_input/demand.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
commodity_id,region_id,year,demand
heat,R1,2020,10
heat,R1,2050,30
7 changes: 7 additions & 0 deletions src/muse/data/example/default_new_input/demand_slicing.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
commodity_id,region_id,time_slice,fraction
heat,R1,all-year.all-week.night,0.1
heat,R1,all-year.all-week.morning,0.15
heat,R1,all-year.all-week.afternoon,0.1
heat,R1,all-year.all-week.early-peak,0.15
heat,R1,all-year.all-week.late-peak,0.3
heat,R1,all-year.all-week.evening,0.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
process_id,region_id,year,timeslice,limit_type,value
gassupply1,R1,2020,annual,up,0.9
gasCCGT,R1,2020,annual,up,0.9
windturbine,R1,2020,annual,up,0.4
12 changes: 12 additions & 0 deletions src/muse/data/example/default_new_input/process_flows.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
process_id,commodity_id,region_id,year,coeff
gassupply1,gas,R1,2020,1
gasCCGT,gas,R1,2020,-1.67
gasCCGT,electricity,R1,2020,1
gasCCGT,CO2f,R1,2020,91.67
windturbine,wind,R1,2020,-1
windturbine,electricity,R1,2020,1
gasboiler,gas,R1,2020,-1.16
gasboiler,heat,R1,2020,1
gasboiler,CO2f,R1,2020,64.71
heatpump,electricity,R1,2020,-0.4
heatpump,heat,R1,2020,1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
process_id,region_id,year,cap_par,fix_par,var_par,max_capacity_addition,max_capacity_growth,total_capacity_limit,lifetime,discount_rate
gassupply1,R1,2020,0,0,2.55,5,1,60,35,0.1
gasCCGT,R1,2020,23.78234399,0,0,2,1,60,35,0.1
windturbine,R1,2020,36.30771182,0,0,2,1,60,25,0.1
gasboiler,R1,2020,3.8,0,0,10,0.02,60,10,0.1
heatpump,R1,2020,8.866667,0,0,10,0.02,60,10,0.1
6 changes: 6 additions & 0 deletions src/muse/data/example/default_new_input/processes.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
id,description,sector_id
gassupply1,Gas supply,energy
gasCCGT,Gas CCGT,power
windturbine,Wind turbine,power
gasboiler,Gas boiler,residential
heatpump,Heat pump,residential
2 changes: 2 additions & 0 deletions src/muse/data/example/default_new_input/regions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id,description
R1,Region 1
4 changes: 4 additions & 0 deletions src/muse/data/example/default_new_input/sectors.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
id,description
gas,Gas sector
power,Power sector
residential,Residential sector
7 changes: 7 additions & 0 deletions src/muse/data/example/default_new_input/time_slices.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
season,day,time_of_day,fraction
all-year,all-week,night,0.166667
all-year,all-week,morning,0.166667
all-year,all-week,afternoon,0.1666667
all-year,all-week,early-peak,0.166667
all-year,all-week,late-peak,0.166667
all-year,all-week,evening,0.166667
9 changes: 9 additions & 0 deletions src/muse/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"multiple_agents",
"minimum_service",
"trade",
"default_new_input",
]


Expand Down Expand Up @@ -137,6 +138,8 @@ def copy_model(
_copy_minimum_service(path)
elif name.lower() == "trade":
_copy_trade(path)
elif name.lower() == "default_new_input":
_copy_default_new_input(path)
return path


Expand Down Expand Up @@ -316,6 +319,12 @@ def update_lpsolver(data):
modify_toml(path / "settings.toml", update_lpsolver)


def _copy_default_new_input(path: Path):
from shutil import copytree

copytree(example_data_dir() / "default_new_input", path)


def _copy_default_timeslice(path: Path):
copytree(example_data_dir() / "default_timeslice", path)

Expand Down
3 changes: 3 additions & 0 deletions tests/test_fullsim_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

from muse.examples import AVAILABLE_EXAMPLES

# temporary skip for default_new_input as this is not yet working
AVAILABLE_EXAMPLES.remove("default_new_input")


@mark.regression
@mark.example
Expand Down
Loading