parasolpy.dash_tools

Dash-based interactive tradeoff explorer for multi-objective optimization results.

Functions

build_tradeoff_dash_app(solutions, ...[, ...])

Build a Dash app for exploring solution tradeoffs via parallel coordinates.

load_dash_inputs(output_folder[, ...])

Load objective names and solutions DataFrame for a tradeoff Dash app.

main([argv])

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 solutions and 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.DataFrame where 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 to run_tradeoff_dash_app()) to serve it.

Return type:

dash.Dash

Raises:
  • TypeError – If solutions is not a DataFrame.

  • ValueError – If solutions is empty, or if default_color_column is 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)
parasolpy.dash_tools.main(argv=None)[source]

CLI entry point: launch the tradeoff explorer against a results folder.

Usage:
python -m parasolpy.dash_tools OUTPUT_FOLDER [–config …] [–solutions …]

[–title …] [–colorscale …] [–host 127.0.0.1] [–port 8050] [–debug]