Results Overview
After optimizing the model, the following things happen:
parse_results!
is called, gathering all values and shadow prices from the JuMP Model intodata[:raw]
. The model is then emptied to free up memory. After running this, raw results can be accessed with:get_raw_result
andget_raw_results
- results can now be computed using
compute_result
process_results!
is called, which in turn calls [modify_results!(mod, config, data)
] for eachModification
in the config. Here are a couple ofModification
s that write some handy results:
E4ST.parse_results!
— Functionparse_results!(config, data, model) -> nothing
- Gathers the values and shadow prices of each variable, expression, and constraint stored in the model and dumps them into
data[:results][:raw]
(seeget_raw_results
andget_results
). - Adds relevant info to
gen
,bus
, andbranch
tables. Seeparse_lmp_results!
andparse_power_results!
for more information. - Saves updated
gen
table viasave_updated_gen_table
- Saves
data
toget_out_path(config,"data_parsed.jls")
unlessconfig[:save_data_parsed]
isfalse
(true by default).
E4ST.process_results!
— Functionprocess_results!(config::OrderedDict, data::OrderedDict) -> data
Calls modify_results!(mod, config, data)
for each Modification
in config
. Stores the results into get_out_path(config, "data_processed.jls")
if config[:save_data_processed]
is true
(default).
process_results!(config; processed=true) -> data
This reads data
in, then calls process_results!(config, data)
.
processed=false
- reads indata
viaread_parsed_results
processed=true
- reads indata
viaread_processed_results
process_results!(mod_file::String, out_path::String; processed=true) -> data
Processes the results the Modification
s found in mod_file
, a .yml file similar to a config
file (see read_config
), only requiring the mods
field.
processed=false
- reads indata
viaread_parsed_results
processed=true
- reads indata
viaread_processed_results
E4ST.parse_lmp_results!
— Functionparse_lmp_results!(config, data, res_raw)
Adds the locational marginal prices of electricity and power flow.
table_name | col_name | unit | description |
---|---|---|---|
:bus | :lmp_elserv | DollarsPerMWhServed | Locational Marginal Price of Energy Served |
:branch | :lmp_pflow | DollarsPerMWFlow | Locational Marginal Price of Power Flow |
E4ST.parse_power_results!
— Functionparse_power_results!(config, data, res_raw)
Adds power-based results. See also get_table_summary
for the below summaries.
table_name | col_name | unit | description |
---|---|---|---|
:bus | :pgen | MWGenerated | Average Power Generated at this bus |
:bus | :pflow | MWFlow | Average power flowing out of this bus |
:bus | :pflow_in | MWFlow | Average power flowing into this bus |
:bus | :pflow_out | MWFlow | Average power flowing into this bus |
:bus | :plserv | MWServed | Average power served at this bus |
:bus | :plcurt | MWCurtailed | Average power curtailed at this bus |
:gen | :pgen | MWGenerated | Average power generated at this generator |
:gen | :pcap | MWCapacity | Power generation capacity of this generator generated at this generator for the weighted representative hour |
:gen | :ecap | MWhCapacity | Total energy generation capacity of this generator generated at this generator for the weighted representative hour |
:gen | :pcap_retired | MWCapacity | Power generation capacity that was retired in each year |
:gen | :pcap_built | MWCapacity | Power generation capacity that was built in each year |
:gen | :pcapinvsim | MWCapacity | Total power generation capacity that was invested for the generator during the sim. (single value). Still the same even after retirement |
:gen | :ecapinvsim | MWhCapacity | Total annual power generation energy capacity that was invested for the generator during the sim. (pcapinvsim * hours per year) (single value). Still the same even after retirement |
:gen | :cf | MWhGeneratedPerMWhCapacity | Capacity Factor, or average power generation/power generation capacity, 0 when no generation |
:branch | :pflow | MWFlow | Average Power flowing through branch |
:branch | :eflow | MWFlow | Total energy flowing through branch for the representative hour |
E4ST.get_raw_results
— Functionget_raw_results(data) -> raw::Dict{Symbol, Any}
E4ST.get_raw_result
— Functionget_raw_result(data, name) -> x
Retrieves the raw result in data[:raw][name]
. See also get_raw_results
.
E4ST.get_results
— Functionget_results(data) -> results::OrderedDict{Symbol, Any}
E4ST.get_result
— Functionget_result(data, name) -> retult
Retrieves data[:results][name]
. See also add_result!
E4ST.add_result!
— Functionadd_result!(data, name, result) -> nothing
Adds result
to data[:results]
. See also get_result
E4ST.save_updated_gen_table
— Functionsave_updated_gen_table(config, data) -> nothing
Save the gen
table to get_out_path(config, "gen.csv")
E4ST.update_build_status!
— Functionupdate_build_status!(config, data, table_name)
Change the build_status of generators built in the simulation.
unbuilt -> new
iflast(pcap)
is above thresholdbuilt -> retired_exog
if retired due to surpassingyear_shutdown
built -> retired_endog
if retired due beforeyear_shutdown
E4ST.read_parsed_results
— Functionread_parsed_results(config) -> data
read_parsed_results(out_path) -> data
Loads data
in from get_out_path(config, "data_parsed.jls")
.
E4ST.read_processed_results
— Functionread_processed_results(config) -> data
read_processed_results(out_path) -> data
Loads data
in from data_processed.jls
.