ExplanResultsViewer Class

The ExplanResultsViewer class processes and visualizes the results from the QuESt Planning optimization model. It provides tools for creating result folders, visualizing data through plots and maps, and exporting results for further analysis.

Authors: C. Newlun and W. Olis

Class Initialization

class ExplanResultsViewer

Initializes the ExplanResultsViewer class.

Parameters:
  • data_handler: An instance of the ExplanDataHandler class to access simulation data.

Attributes:
  • system: Placeholder for system name.

  • rd: Results data.

  • stacked_bar_by_bus_option: Boolean flag for plotting options.

  • policy_plot_option: Boolean flag for policy plots.

Public Methods

create_lookup_info()

Creates lookup information for generator, technology, and bus mappings from the data handler.

Example Usage:
>>> viewer.create_lookup_info()
create_results_folder(filepath)

Creates directories for storing results.

Parameters:
  • filepath (str): Base path for results folder. Defaults to current working directory if None.

Example Usage:
>>> viewer.create_results_folder(filepath='/path/to/results')
process_results_gui(rd, pd, timestamp, report, filepath)

Processes optimization results in GUI mode.

Parameters:
  • rd: Results data.

  • pd: Parameter data.

  • timestamp (str): Timestamp of the results.

  • report (str): Report summary.

  • filepath (str): Path for results storage.

Example Usage:
>>> viewer.process_results_gui(rd, pd, '20250113', 'Report', '/path/to/results')
plot_results()

Generates and saves various result plots.

Example Usage:
>>> viewer.plot_results()
create_map()

Generates geographic maps visualizing generation and transmission.

Example Usage:
>>> viewer.create_map()
export_results()

Exports results to an Excel file.

Example Usage:
>>> viewer.export_results()
stacked_resource_bar(fig, ax, figsize)

Creates a stacked bar chart of installed capacity by year.

Parameters:
  • fig (matplotlib.figure.Figure): Figure object.

  • ax (matplotlib.axes.Axes): Axes object.

  • figsize (tuple): Size of the figure.

Example Usage:
>>> fig, ax = plt.subplots()
>>> viewer.stacked_resource_bar(fig, ax, figsize=(8, 6))

Visualization

plot_cost_bar()

Plots operational and investment costs.

Example Usage:
>>> viewer.plot_cost_bar()
map_results()

Generates maps of system results.

Example Usage:
>>> viewer.map_results()
policy_plot()

Creates plots related to policy constraints, such as emissions.

Example Usage:
>>> viewer.policy_plot()

API Reference

For a detailed reference of all methods, attributes, and inherited properties, refer to the autodoc-generated content below.

QuESt Planning - explan results viewer to process and visualize the results from the QuESt Planning model Authors: C. Newlun and W. Olis

class quest_planning.explan.explan_results_viewer.ExplanResultsViewer(data_handler)[source]

Bases: object

color_tech(tech)[source]
Parameters:

tech (technology)

Raises:

TypeError – DESCRIPTION.

Returns:

color

Return type:

technology

create_lookup_info()[source]
create_map()[source]

Create map visualizations

create_results_folder(filepath)[source]
export_results()[source]

Writes Excel file of optimizer’s results

Return type:

None.

map_es_results()[source]
Parameters:
  • gen_map_info (TYPE) – DESCRIPTION.

  • tech_map_info (TYPE) – DESCRIPTION.

Return type:

None.

map_results()[source]
Parameters:
  • gen_map_info (TYPE) – DESCRIPTION.

  • tech_map_info (TYPE) – DESCRIPTION.

Return type:

None.

plot_cost_bar()[source]
Return type:

None.

plot_es_system(fig, ax, figsize)[source]
plot_results()[source]

Create results plots and save in apprpriate folders

plot_tx_flow()[source]
Return type:

None.

policy_plot()[source]
Return type:

None.

policy_resource_plot()[source]
Return type:

None.

process_results(rd, pd, timestamp, report)[source]

Process the output of the optimizer - Command line only

process_results_gui(rd, pd, timestamp, report, filepath)[source]

Process the output of the optimizer - GUI only - filepath is provided as an option

stacked_resource_area()[source]
Parameters:
  • gen_map_info (TYPE) – DESCRIPTION.

  • tech_map_info (TYPE) – DESCRIPTION.

Return type:

None.

stacked_resource_area_by_bus(bus)[source]
Parameters:
  • gen_map_info (TYPE) – DESCRIPTION.

  • tech_map_info (TYPE) – DESCRIPTION.

  • bus (TYPE) – DESCRIPTION.

  • bus_names (TYPE) – DESCRIPTION.

Return type:

None.

stacked_resource_bar(fig, ax, figsize)[source]

Plot staked bar chart of installed capacity by year

stacked_resource_bar_by_bus(bus)[source]
Parameters:
  • gen_map_info (TYPE) – DESCRIPTION.

  • tech_map_info (TYPE) – DESCRIPTION.

  • bus (TYPE) – DESCRIPTION.

  • bus_names (TYPE) – DESCRIPTION.

Return type:

None.

stacked_resource_dispatch(select_year)[source]
Parameters:
  • gen_map_info (TYPE) – DESCRIPTION.

  • tech_map_info (TYPE) – DESCRIPTION.

  • select_year (TYPE) – DESCRIPTION.

Return type:

None.

stacked_resource_es_duration_bar(fig, ax, figsize)[source]

Plot staked bar chart of installed capacity by year