suboptimumg.sweep.pack_optimizer_results#
- class suboptimumg.sweep.pack_optimizer_results.PackOptimizerResults(data, config)[source]#
Bases:
objectResults for a pack optimization run, with visualization
- Parameters:
data (PackOptimizationData)
config (PackOptimizerConfig)
- plot_3D(x_var, y_var, show_infeasible=True, title=None, subtitle=None, theme=None, font_config=FontConfig(large=24, medium=16, small=12), 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'))[source]#
Create a 3D Plotly figure of the optimization results, including all intermediate evaluations. Plots two parameters (e.g., coast_trigger and gear_ratio) vs total points.
- Parameters:
x_var (str) – Name of the parameter to plot on the x-axis (e.g., “coast_trigger”)
y_var (str) – Name of the parameter to plot on the y-axis (e.g., “gear_ratio”)
show_infeasible (bool) – Whether to include energy-infeasible points in the plot.
subtitle (str, optional) – Optional subtitle displayed below the title.
theme (str, optional) – Color theme name, see plotting.color_themes.
font_config (FontConfig, optional) – FontConfig object for font settings.
layout_config (LayoutConfig, optional) – LayoutConfig object for layout settings.
title (str | None)
- Returns:
Interactive Plotly 3D scatter figure.
- Return type:
go.Figure