parasolpy.dash_tools
Dash-based interactive tradeoff explorer for multi-objective optimization results.
Functions
|
Build a Dash app for exploring solution tradeoffs via parallel coordinates. |
|
Load objective names and solutions DataFrame for a tradeoff Dash app. |
|
CLI entry point: launch the tradeoff explorer against a results folder. |
- parasolpy.dash_tools.load_dash_inputs(output_folder, config_filename=None, solutions_filename=None)[source]
Load objective names and solutions DataFrame for a tradeoff Dash app.
- parasolpy.dash_tools.build_tradeoff_dash_app(solutions, default_color_column, title='Tradeoff Explorer', default_colorscale='viridis')[source]
Build a Dash app for exploring solution tradeoffs via parallel coordinates.
The returned app renders a parallel-coordinates plot of
solutionsand exposes two dropdowns: one to select which column drives the color scale and one to pick a named Plotly colorscale. Both dropdowns are wired to a callback that redraws the figure; no other state is maintained.- Parameters:
solutions – Non-empty
pandas.DataFramewhere each row is a candidate solution and each column is either an objective or a decision variable. All columns are shown as axes in the parallel-coordinates plot.default_color_column – Name of the column used to color lines on initial render. Must be a column of
solutions.title – Heading rendered above the plot.
default_colorscale – Name of a Plotly continuous colorscale (see
plotly.express.colors.named_colorscales()). Falls back to"viridis"if the given name is not recognized.
- Returns:
A configured app. Call
app.run(...)(or pass it torun_tradeoff_dash_app()) to serve it.- Return type:
dash.Dash
- Raises:
TypeError – If
solutionsis not a DataFrame.ValueError – If
solutionsis empty, or ifdefault_color_columnis not one of its columns.
Example
>>> names, solutions, default_col = load_dash_inputs("output/run_01") >>> app = build_tradeoff_dash_app(solutions, default_col) >>> app.run(debug=True)