Skip to content

Commit

Permalink
Add working example 21 and push to test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-okeefe committed Mar 26, 2024
1 parent 2be0ee9 commit f381f13
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/erin_next_examples/ex21-out.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scenario id,scenario start time (P[YYYY]-[MM]-[DD]T[hh]:[mm]:[ss]),elapsed (hours),boiler:OUT(0) => steam_split:IN(0) (kW),boiler:OUT(2) => WASTE:IN(0) (kW),coal_pile:OUT(0) => boiler:IN(0) (kW),coal_utility:OUT(0) => coal_pile:IN(0) (kW),electric_utility:OUT(0) => transmission:IN(0) (kW),steam_loop:OUT(0) => steam_load:IN(0) (kW),steam_split:OUT(0) => turbine:IN(0) (kW),steam_split:OUT(1) => steam_loop:IN(1) (kW),substation:OUT(0) => elec_load:IN(0) (kW),transmission:OUT(0) => substation:IN(1) (kW),turbine:OUT(0) => substation:IN(0) (kW),turbine:OUT(1) => waste_to_steam:IN(0) (kW),turbine:OUT(2) => WASTE:IN(0) (kW),waste_to_steam:OUT(0) => steam_loop:IN(0) (kW),waste_to_steam:OUT(2) => WASTE:IN(0) (kW),REQUEST:boiler:OUT(0) => steam_split:IN(0) (kW),REQUEST:boiler:OUT(2) => WASTE:IN(0) (kW),REQUEST:coal_pile:OUT(0) => boiler:IN(0) (kW),REQUEST:coal_utility:OUT(0) => coal_pile:IN(0) (kW),REQUEST:electric_utility:OUT(0) => transmission:IN(0) (kW),REQUEST:steam_loop:OUT(0) => steam_load:IN(0) (kW),REQUEST:steam_split:OUT(0) => turbine:IN(0) (kW),REQUEST:steam_split:OUT(1) => steam_loop:IN(1) (kW),REQUEST:substation:OUT(0) => elec_load:IN(0) (kW),REQUEST:transmission:OUT(0) => substation:IN(1) (kW),REQUEST:turbine:OUT(0) => substation:IN(0) (kW),REQUEST:turbine:OUT(1) => waste_to_steam:IN(0) (kW),REQUEST:turbine:OUT(2) => WASTE:IN(0) (kW),REQUEST:waste_to_steam:OUT(0) => steam_loop:IN(0) (kW),REQUEST:waste_to_steam:OUT(2) => WASTE:IN(0) (kW),AVAILABLE:boiler:OUT(0) => steam_split:IN(0) (kW),AVAILABLE:boiler:OUT(2) => WASTE:IN(0) (kW),AVAILABLE:coal_pile:OUT(0) => boiler:IN(0) (kW),AVAILABLE:coal_utility:OUT(0) => coal_pile:IN(0) (kW),AVAILABLE:electric_utility:OUT(0) => transmission:IN(0) (kW),AVAILABLE:steam_loop:OUT(0) => steam_load:IN(0) (kW),AVAILABLE:steam_split:OUT(0) => turbine:IN(0) (kW),AVAILABLE:steam_split:OUT(1) => steam_loop:IN(1) (kW),AVAILABLE:substation:OUT(0) => elec_load:IN(0) (kW),AVAILABLE:transmission:OUT(0) => substation:IN(1) (kW),AVAILABLE:turbine:OUT(0) => substation:IN(0) (kW),AVAILABLE:turbine:OUT(1) => waste_to_steam:IN(0) (kW),AVAILABLE:turbine:OUT(2) => WASTE:IN(0) (kW),AVAILABLE:waste_to_steam:OUT(0) => steam_loop:IN(0) (kW),AVAILABLE:waste_to_steam:OUT(2) => WASTE:IN(0) (kW),op-state: boiler,op-state: coal_pile,op-state: coal_utility,op-state: elec_load,op-state: electric_utility,op-state: steam_load,op-state: steam_loop,op-state: steam_split,op-state: substation,op-state: transmission,op-state: turbine,op-state: waste_to_steam
blue_sky,P0000-00-00T00:00:00,0,7.5,7.5,15,15,20,3.8,7.5,0,23.8,20,3.8,3.8,0,3.8,0,296.3,7.5,592.5,20,96.3,100,200,96.3,100,96.3,100,100,0,100,0,7.5,7.5,15,15,20,3.8,7.5,0,23.8,20,3.8,3.8,0,3.8,0,available,available,available,available,available,available,available,available,available,available,available,available
blue_sky,P0000-00-00T00:00:00,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7.5,0,15,15,20,0,7.5,0,23.8,20,3.8,0,0,0,0,available,available,available,available,available,available,available,available,available,available,available,available
2 changes: 2 additions & 0 deletions docs/erin_next_examples/ex21-stats.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
scenario id,occurrence number,duration (h),total source (kJ),total load (kJ),total storage (kJ),total waste (kJ),energy balance (source-(load+storage+waste)) (kJ),site efficiency,uptime (h),downtime (h),load not served (kJ),energy robustness [ER],energy availability [EA],max single event downtime [MaxSEDT] (h),global availability,availability: boiler,availability: coal_pile,availability: coal_utility,availability: elec_load,availability: electric_utility,availability: steam_load,availability: steam_loop,availability: steam_split,availability: substation,availability: transmission,availability: turbine,availability: waste_to_steam,global count: grid_outage,global time fraction: grid_outage
blue_sky,1,2,252000,198000,0,54000,0,0.785714,0,2,1.242e+06,0.1375,0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0
144 changes: 144 additions & 0 deletions docs/erin_next_examples/ex21.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
[meta]
description = "Another Weibull distribution test"

[simulation_info]
rate_unit = "kW"
quantity_unit = "kJ"
time_unit = "hours"
max_time = 2

############## Loads ######################
[loads.electric]
time_unit = "hours"
rate_unit = "kW"
time_rate_pairs = [[0.0,100.0],[2.0,0.0]]

[loads.steam]
time_unit = "hours"
rate_unit = "kW"
time_rate_pairs = [[0.0,100.0],[2.0,0.0]]

############## Components #################
#### Loads ####
[components.elec_load]
type = "load"
inflow = "electricity"
loads_by_scenario.blue_sky = "electric"

[components.steam_load]
type = "load"
inflow = "steam"
loads_by_scenario.blue_sky = "steam"

#### Sources ####
[components.electric_utility]
type = "source"
outflow = "electricity"
max_outflow = 20.0

[components.coal_utility]
type = "source"
outflow = "coal"
max_outflow = 15.0

#### Electrical Components ###
[components.transmission]
type = "pass_through"
stream = "electricity"
failure_modes = ["grid_outage"]

[components.substation]
type = "muxer"
flow = "electricity"
num_inflows = 2
num_outflows = 1

[components.coal_pile]
type = "pass_through"
flow = "coal"
max_outflow = 20.0

[components.boiler]
type = "converter"
inflow = "coal"
outflow = "steam"
constant_efficiency = 0.5

[components.steam_split]
type = "muxer"
flow = "steam"
num_inflows = 1
num_outflows = 2

[components.steam_loop]
type = "muxer"
flow = "steam"
num_inflows = 2
num_outflows = 1

[components.turbine]
type = "converter"
inflow = "steam"
outflow = "electricity"
lossflow = "waste_heat"
constant_efficiency = 0.5

[components.waste_to_steam]
type = "converter"
inflow = "waste_heat"
outflow = "steam"
constant_efficiency = 1

############## dist ###########################
[dist.immediately]
type = "fixed"
value = 0
time_unit = "hours"

[dist.grid_failure]
type = "weibull"
shape = 5
scale = 1473
location = 0
time_unit = "hours"

[dist.grid_repair]
type = "weibull"
shape = 5
scale = 12
location = 0
time_unit = "hours"

############# Failure Modes ############
[failure_mode.grid_outage]
failure_dist = "grid_failure"
repair_dist = "grid_repair"

############## Networks #################
[network]
connections = [
# Electric Network
["electric_utility:OUT(0)", "transmission:IN(0)","electricity"],
["transmission:OUT(0)","substation:IN(1)", "electricity"],
["substation:OUT(0)", "elec_load:IN(0)", "electricity"],

#Thermal Network
["coal_utility:OUT(0)", "coal_pile:IN(0)","coal"],
["coal_pile:OUT(0)","boiler:IN(0)","coal"],
["boiler:OUT(0)","steam_split:IN(0)","steam"],
["steam_split:OUT(1)","steam_loop:IN(1)","steam"],
["turbine:OUT(1)","waste_to_steam:IN(0)","waste_heat"],
["waste_to_steam:OUT(0)","steam_loop:IN(0)","steam"],
["steam_loop:OUT(0)","steam_load:IN(0)","steam"],

#Thermal to Electric
["steam_split:OUT(0)","turbine:IN(0)","steam"],
["turbine:OUT(0)","substation:IN(0)","electricity"],
]

############## Scenarios #################
[scenarios.blue_sky]
time_unit = "hours"
occurrence_distribution = "immediately"
duration = 2
max_occurrences = 1
1 change: 1 addition & 0 deletions docs/erin_next_examples/regress.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def run_cli(example_name):
run_cli("18")
run_cli("19")
run_cli("20")
run_cli("21")
run_cli("26")
run_cli("27")
smoke_test("28")
Expand Down

0 comments on commit f381f13

Please sign in to comment.