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_resultandget_raw_results- results can now be computed using
compute_result
process_results!is called, which in turn calls [modify_results!(mod, config, data)] for eachModificationin the config. Here are a couple ofModifications 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, unscales the shadow prices, and dumps them into
data[:results][:raw](seeget_raw_resultsandget_results). - Adds relevant info to
gen,bus, andbranchtables. Seeparse_lmp_results!andparse_power_results!for more information. - Saves updated
gentable viasave_updated_gen_table - Saves
datatoget_out_path(config,"data_parsed.jls")unlessconfig[:save_data_parsed]isfalse(true by default).
E4ST.process_results! — Functionprocess_results!(config::OrderedDict, data::OrderedDict) -> dataCalls 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) -> dataThis reads data in, then calls process_results!(config, data).
processed=false- reads indataviaread_parsed_resultsprocessed=true- reads indataviaread_processed_results
process_results!(mod_file::String, out_path::String; processed=true) -> dataProcesses the results the Modifications found in mod_file, a .yml file similar to a config file (see read_config), only requiring the mods field.
processed=false- reads indataviaread_parsed_resultsprocessed=true- reads indataviaread_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 | :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) -> xRetrieves 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) -> retultRetrieves data[:results][name]. See also add_result!
E4ST.add_result! — Functionadd_result!(data, name, result) -> nothingAdds result to data[:results]. See also get_result
E4ST.save_updated_gen_table — Functionsave_updated_gen_table(config, data) -> nothingSave 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 -> newiflast(pcap)is above thresholdbuilt -> retired_exogif retired due to surpassingyear_shutdownbuilt -> retired_endogif retired due beforeyear_shutdown
E4ST.read_parsed_results — Functionread_parsed_results(config) -> data
read_parsed_results(out_path) -> dataLoads data in from get_out_path(config, "data_parsed.jls").
E4ST.read_processed_results — Functionread_processed_results(config) -> data
read_processed_results(out_path) -> dataLoads data in from data_processed.jls.