Linear Programming Solver

No data sent

Solve linear and integer programs in your browser with the HiGHS solver: fill in a table of the quantities to decide, the value of each, and the limits, and see the best plan. The model is shown as formulas with the results next to each line: the best value, the left side and slack of each limit, and which limits hold it back.

About this tool

What does Linear Programming Solver do?

It solves linear programs (LP) and mixed-integer programs (MILP) with HiGHS, a high-performance open-source solver, compiled to WebAssembly so it runs in your browser.

How to use

Start from an example (production plan, diet, transportation, choosing projects, staff per day) or fill in your own:

  1. Each column is a variable (a quantity to decide). Name it, and set its type just below the name — Integer (0, 1, 2…, for things you count, such as how many tables to make), Decimal (for amounts you measure, such as 2.5 kg) or Yes / No (1 = do it, 0 = do not, for choices such as which projects to take). Variables are 0 or more.
  2. The Objective row: choose maximize or minimize, and enter the value of one unit of each variable (for example profit per item).
  3. Each constraint row: the amount of each variable used, the relation (≤, <, ≥, > or =), and the limit on the right. Empty cells are 0. To limit a single variable (for example at most 15 tables), put 1 in its column only.
  4. With Solve as you type on, the model is solved as you edit; otherwise click Solve.
  5. The Preview shows the model as formulas, one line each, with the results next to them: the best value of the objective, and for each constraint its left side and slack. A binding constraint is at its limit: it holds the objective back. The values of the variables are listed on the right.

Strict inequalities

< and > mean strictly less or more (the limit itself is not allowed). With whole-number variables and whole-number amounts they are exact (x < 5 is x ≤ 4); with other variables they are solved a tiny amount inside the limit, and a note says so.

Results

  • Status: optimal, infeasible (no solution meets all the constraints), unbounded (the objective can grow without limit), or stopped by the time limit.
  • Variables: the value of each variable. If a Decimal variable comes out with a fraction, a note says so: choose Integer if it must be counted in whole units.
  • Constraints: the left-hand side, the right-hand side and the slack (how far from the limit). Constraints with zero slack are binding: they limit the objective.

FAQ

How large a model can it solve?

Up to 5,000 variables. Small and medium models solve in a moment; hard integer models may hit the time limit, and then the best solution found so far is shown.

Is the model sent anywhere?

No. The solver runs in your browser, and the model is saved in this browser with the tool.