HiGHS online linear programming solver

A linear, mixed-integer, and quadratic optimization solver you can use directly from your browser


Demo

LP // ONE-SHOT CPLEX TEXT SOLVER highs.solve()

CPLEX LP Model Optimization

Parses CPLEX LP text and returns primal variable assignments, dual shadow prices, row slacks, and basis status flags in a single call without manual matrix construction.

Core Solving Code 4 lines

Interactive CPLEX LP Text Model

STATUS OPTIMAL
OPTIMAL OBJECTIVE 122.5000

Primal Solution Breakdown

x1--
Loading HiGHS…
⚡ Solved in -- ms
BUILD // PERSISTENT MODEL & CSC MATRIX highs.createModel()

Production Planning Optimization

Allocates factory manufacturing capacity across 4 products to maximize revenue subject to plant labor and machine limits.

Core Solving Code 9 lines

Interactive Variable Inputs

STATUS OPTIMAL
OBJECTIVE --

Primal Assignment Allocation

x1--
Select an example and click Solve.
⚡ Solved in -- ms
MILP // BINARY & INTEGER VARIABLES integrality: [1, 1, ...]

0/1 Knapsack Discrete Optimization

Selects the highest-value subset of discrete items (each either taken or left behind) without exceeding backpack weight capacity.

Core Solving Code 10 lines

Knapsack Items (Value, Weight per line)

STATUS OPTIMAL
MIP GAP 0.00%
TOTAL VALUE $15.00
KNAPSACK WEIGHT DISTRIBUTION 8 / 15 kg
Run MILP to visualize weight packing
Click Solve MILP to run.
⚡ Solved in -- ms
QP // QUADRATIC OBJECTIVE & HESSIAN MATRIX passHessian()

Markowitz Portfolio Risk Minimization

Allocates capital across 3 investment assets (Tech, Energy, Bonds) to achieve a target annual return while minimizing portfolio variance. Passes a symmetric covariance Hessian matrix $Q$ in CSC format via model.passHessian({ format: "triangular", dimension, starts, indices, values }).

Core Solving Code 10 lines

Portfolio Asset Parameters & Targets

Asset 1: Tech Growth
Exp Return: 12.0% | Variance: High
Asset 2: Energy
Exp Return: 8.0% | Variance: Med
Asset 3: Govt Bonds
Exp Return: 4.0% | Variance: Low
STATUS OPTIMAL
MINIMIZED VARIANCE 0.0047

Optimal Portfolio Allocation Breakdown

CAPITAL ALLOCATION (100% TOTAL) Tech: -- | Energy: -- | Bonds: --
Run QP to compute optimal portfolio weights
Click Optimize Portfolio QP to run.
⚡ Solved in -- ms
RANGING // POST-OPTIMAL SENSITIVITY ANALYSIS getRanging()

Objective Cost & Constraint Sensitivity

Calculates exact allowable lower and upper stability bounds for objective cost coefficients (colCostDown, colCostUp) and constraint right-hand sides before the current optimal basis changes.

Core Solving Code 5 lines

LP Model Definition

STATUS OPTIMAL
BASIS STABILITY STABLE

Continuous Cost & Bound Stability Scales

x1 Cost Stability Range [1.0000 ⟷ 4.0000]
Click Solve & Range to analyze.
⚡ Solved in -- ms
OPTIONS // SOLVER TUNING & CALLBACK HOOKS options.describe()

HiGHS Parameter Introspection

Queries, describes, and modifies C++ solver parameters (tolerances, presolve reductions, pivoting rules) on active WebAssembly instances at runtime.

NameTypeCurrentDefault

Option Inspector & Setter

Select an option above or type a name to inspect.
IIS // INFEASIBILITY CONFLICT DIAGNOSTICS getIis()

Minimal Conflicting Subsystem Isolation

Isolates the smallest irreducible subset of contradictory constraints and variable bounds that cause mathematical infeasibility.

Core Solving Code 5 lines

Infeasible Model Inputs

FEASIBILITY STATUS INFEASIBLE

Conflicting Subsystem Isolation

c2: x1 >= 10
Lower Bound Conflict
c3: x2 >= 10
Lower Bound Conflict
c1: x1 + x2 <= 5
RHS Conflict
Click Find IIS to analyze infeasibility.
⚡ Solved in -- ms
I/O // IN-MEMORY SERIALIZATION & NORMALIZATION exportModel("lp")

CPLEX LP & MPS Model Serialization

Parses LP/MPS text directly in WebAssembly memory, normalizes variable names and constraint matrices, and exports clean LP strings without filesystem dependencies.

Core Solving Code 6 lines

CPLEX LP Input Text

VARIABLES 2
CONSTRAINTS 2
PARSER STATUS READY
Load a model to begin.
⚡ Solved in -- ms