Examples¶
The gallery consists of standalone Marimo notebooks from examples/gallery.
Each link opens an executed, non-interactive HTML snapshot containing the notebook code and outputs.
Published snapshots use \(\epsilon_{\mathrm{target}}=10^{-5}\) to balance numerical validation and export time;
live sessions can request tighter continuation targets.
Modeling primers¶
Analytic quadratic compares epsilon-relaxed solutions with a closed-form lower response.
Optimistic linear program shows how the upper problem selects among tied lower optimizers.
Parameter-dependent SOCP derives a geometric response and inspects parameter-dependent canonical data.
Best-of local optima compares a deterministic local solve with several complete randomized runs.
Applications¶
Ridge hyperparameter selection selects a training penalty using validation loss.
Demand-response pricing designs a time-of-use price while anticipating flexible energy use.
Renewable-capacity planning trades capacity investment against lower-level electricity dispatch.
Traffic tolling selects tolls while anticipating a congestion equilibrium.
Stackelberg port security allocates limited patrol coverage against a best-responding attacker.
Planar truss sizing allocates member areas while anticipating elastic equilibrium.
DC motor MPC tuning learns control-cost weights while anticipating a constrained MPC response.
Advanced examples¶
Advanced examples are available as source notebooks in the repository. They are checked statically and executed during release validation, but are not published with the gallery.
Ridge-polishing decision retrains a validation-selected ridge model at its fixed penalty, then lets the user choose between lower-level feasibility and a better relaxed validation objective.
Low-carbon blend polishing designs material rebates for a constrained producer, rejects a coarse polished response, tightens continuation, and explicitly adopts the candidate that passes a quantitative deployment gate.
Clean-equipment rebates uses a three-dimensional power cone to design a rebate while anticipating a producer’s clean and fossil input choices under Cobb–Douglas production.
Carbon-tax abatement sets a carbon tax while anticipating sector-level abatement with exponential costs represented by exponential cones.
Browse all repository examples.
For live interaction, install and open the complete example workspace from a repository checkout:
make marimo