Skip to content

Interactive lab

The models of the course solved to optimality in the browser: change the data with the sliders or by dragging the points, and a solver written in JavaScript recomputes the solution, with the same numbers as the Python scripts and the lecture notes. Pick an app: it opens full page.

Models side by side

  • Three nonlinear models solved to optimality


    The Markowitz portfolio, the optimal price of a ticket and the location of a service: pick the model, change the data with the sliders and the solver, in the browser, recomputes the optimal solution.

    Open the app →

Deterministic models

  • Markowitz: optimal portfolio and frontier


    The minimum-variance QP with a target return: move the required return, the limit per asset and the expected return of one asset, and watch the optimal portfolio slide along the efficient frontier.

    Open the app →

  • Optimal price with capacity


    The profit as a function of the ticket price with three demand functions: move the capacity and the unit cost and see when the capacity constraint sets the price.

    Open the app →

  • Location: efficiency versus equity


    Where to put the charging station: the point that minimizes the weighted average distance, with a cap on the distance of the farthest district. Lower the cap and see the trade-off.

    Open the app →

Optimization and machine learning

  • SVM: margin and support vectors


    The 90 customers of the chapter in the plane of the two indicators: drag the points and move \(C\), and see the separating line, the margin, the support vectors and the violations.

    Open the app →

  • Least squares versus least absolute deviations


    The 60 days of the bakery: the least-squares line (QP) and the least absolute deviations line (LP). Drag a point or move the hottest day and see which of the two gets pulled by the outliers.

    Open the app →