Examples¶
Start with the Optimizer Catalog for a short, runnable setup for each optimizer. Install only the extra required by your chosen backend; SciPy and the iwopy optimizers are included in the base package.
Pareto flows¶
The catalog contains explicit unconstrained and constrained NSGA2/NSGA3 flows, including selection of a weighted compromise from iwopy Pareto results:
uv run --extra pymoo python examples/optimizers/pymoo_nsga2.py
uv run --extra pymoo python examples/optimizers/pymoo_nsga2_constrained.py
See pymoo NSGA3 and pymoo NSGA3 Constrained Flow for the reference-direction alternative.
Callback scripts¶
The examples/callbacks folder contains standalone SLSQP and pymoo scripts
that print intermediate optimization results with a custom callback and record
the same states with OptimizationHistory. Run them from the repository root:
uv run python examples/callbacks/run_slsqp.py
uv run --extra pymoo python examples/callbacks/run_pymoo.py
Both scripts save objective-history plots to the Git-ignored
examples/callbacks/output directory.
Notebook workflows¶
The notebooks explore analytical and numerical derivatives, multi-objective results, and mixed variables. Some require pymoo or PyGMO; see their imports and Installation.