Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lectures/lp_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,11 @@ The optimal plan tells the factory to produce $2.5$ units of Product 1 and $5$

We are using the `linprog` function as a *black box*.

Inside it, Python first transforms the problem into standard form.
SciPy accepts inequality constraints in the form $A_{ub} x \leq b_{ub}$, equality constraints in the form $A_{eq} x = b_{eq}$, and variable bounds.

To do that, for each inequality constraint it generates one slack variable.
In this lecture, `linprog` uses SciPy's default `highs` method, which calls the HiGHS optimization solver.

Here the vector of slack variables is a two-dimensional NumPy array that equals $b_{ub} - A_{ub}x$.
The slack value returned by `linprog` is a one-dimensional NumPy array whose entries measure the difference $b_{ub} - A_{ub}x$ for each inequality constraint.

See the [official documentation](https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.linprog.html#scipy.optimize.linprog) for more details.

Expand Down