suboptimumg.sweep.energy_grid_results#
- class suboptimumg.sweep.energy_grid_results.EnergyGridResults(data, config)[source]#
Bases:
objectResults and visualization for energy-constrained grid characterization.
- Parameters:
data (EnergyGridData)
config (EnergyGridConfig)
- grid_plot(*, mask_infeasible=True, show_capacity_kwh=False, title=None, theme='accumulator', layout_config=LayoutConfig(width=1000, height=700, grid_width_per_col=400, grid_height_per_row=350, grid_horizontal_spacing=0.08, grid_vertical_spacing=0.12, margin={'l': 70, 'r': 50, 't': 90, 'b': 70}, plot_bgcolor='white', scene_bgcolor='rgba(240, 240, 240, 0.8)', title_x=0.5, title_xanchor='center', title_yanchor='top'), font_config=FontConfig(large=24, medium=16, small=12))[source]#
2x3 contour grid: total pts, endurance pts, efficiency pts, coast trigger, net energy, endurance time.
- Parameters:
mask_infeasible (bool, optional) – Replace infeasible cells with NaN so they appear blank. Default True.
show_capacity_kwh (bool, optional) – Show pack capacity (kWh) instead of pack weight (kg) on axes. Default False.
title (str, optional) – Custom title for the entire grid. Default None (auto-generated).
theme (str, optional) – Theme for the contour colors. Default “accumulator”.
font_config (FontConfig, optional)
layout_config (LayoutConfig, optional)
- Return type:
go.Figure
- plot_contour(metric=EnergyGridMetric.TOTAL_PTS, *, mask_infeasible=True, show_capacity_kwh=False, title=None, theme='accumulator', layout_config=LayoutConfig(width=1000, height=700, grid_width_per_col=400, grid_height_per_row=350, grid_horizontal_spacing=0.08, grid_vertical_spacing=0.12, margin={'l': 70, 'r': 50, 't': 90, 'b': 70}, plot_bgcolor='white', scene_bgcolor='rgba(240, 240, 240, 0.8)', title_x=0.5, title_xanchor='center', title_yanchor='top'), font_config=FontConfig(large=24, medium=16, small=12))[source]#
2D filled contour of any metric over the grid.
- Parameters:
metric (EnergyGridMetric) – Which z-variable to plot.
mask_infeasible (bool) – Replace infeasible cells with NaN so they appear blank.
show_capacity_kwh (bool) – Show pack capacity (kWh) instead of pack weight (kg) on axes.
title (str, optional) – Custom title.
theme (str, optional) – Color theme name. Default “accumulator”.
font_config (FontConfig, optional)
layout_config (LayoutConfig, optional)
- Return type:
go.Figure
- plot_feasibility(*, show_capacity_kwh=False, title=None, layout_config=LayoutConfig(width=1000, height=700, grid_width_per_col=400, grid_height_per_row=350, grid_horizontal_spacing=0.08, grid_vertical_spacing=0.12, margin={'l': 70, 'r': 50, 't': 90, 'b': 70}, plot_bgcolor='white', scene_bgcolor='rgba(240, 240, 240, 0.8)', title_x=0.5, title_xanchor='center', title_yanchor='top'), font_config=FontConfig(large=24, medium=16, small=12))[source]#
Binary heatmap: green = feasible, red = infeasible.
- Parameters:
show_capacity_kwh (bool, optional) – Show pack capacity (kWh) instead of pack weight (kg) on axes. Default False.
title (str, optional) – Custom title for the plot. Default None (auto-generated).
font_config (FontConfig, optional)
layout_config (LayoutConfig, optional)
- Return type:
go.Figure
- plot_surface(metric=EnergyGridMetric.TOTAL_PTS, *, mask_infeasible=True, show_capacity_kwh=False, title=None, theme='accumulator', layout_config=LayoutConfig(width=1000, height=700, grid_width_per_col=400, grid_height_per_row=350, grid_horizontal_spacing=0.08, grid_vertical_spacing=0.12, margin={'l': 70, 'r': 50, 't': 90, 'b': 70}, plot_bgcolor='white', scene_bgcolor='rgba(240, 240, 240, 0.8)', title_x=0.5, title_xanchor='center', title_yanchor='top'), font_config=FontConfig(large=24, medium=16, small=12), scene_config=SceneConfig(aspect_ratio_x=1.0, aspect_ratio_y=1.0, aspect_ratio_z=0.8, camera_distance=2.0, camera_z=0.8, default_view_angle=-60, camera_up_x=0, camera_up_y=0, camera_up_z=1))[source]#
3D surface of any metric over the grid.
- Parameters:
metric (EnergyGridMetric) – Which z-variable to plot.
mask_infeasible (bool, optional) – Replace infeasible cells with NaN so they appear blank. Default True.
show_capacity_kwh (bool, optional) – Show pack capacity (kWh) instead of pack weight (kg) on axes. Default False.
title (str, optional) – Custom title for the plot. Default None (auto-generated).
theme (str, optional) – Theme for the surface colors. Default “accumulator”.
layout_config (LayoutConfig, optional)
font_config (FontConfig, optional)
scene_config (SceneConfig, optional)
- Return type:
go.Figure