Modules

Constrained optimization

Plan : Free

Choose whom to target to maximise a result within your budgets, and know which budget holds you back.

Business problems

  • Choose the customers to contact to make the most profit, under a cap on contacts and on cost.
  • Know which budget really limits the result, and what loosening it would bring.
  • Avoid soliciting the same customer several times in a campaign with several offers.

Academic problems

  • Teach Lagrangian relaxation and the economic reading of multipliers.
  • Illustrate the Karush-Kuhn-Tucker conditions on a concrete selection problem.

Methods & guarantees

  • Lagrangian relaxation: each constraint gets a price, adjusted until the KKT conditions hold.
  • Solving on growing samples of the rows, up to the full dataset.
  • Fixed seed: two runs give the same result.

Keep the best rows under several budgets

You pick the variable to optimise (Target, expected profit for instance) and the direction (Direction), then set the constraints in the Constraints block. An aggregation constraint bounds a number of rows (Count) or a sum (Sum): at most 50 contacts, at most 1,200 of cost, at least 40,000 of value. A Scope restricts it to part of the rows, a segment for instance. Multiple Selection caps commercial pressure: the same customer does not come back more than N times in the selection.

Error Margin sets the tolerance around the optimum, and Seed makes the computation reproducible.

Constraints block: a cap of 50 contacts, a cost budget, a minimum value to reach
Three constraints: at most 50 contacts, at most 1,200 of contact cost, at least 40,000 of value.

Read the price of each constraint

The result does not stop at a list: each constraint shows the value reached, whether it holds, and its price μ. Near zero, the constraint does not bind; far from zero, it is the one holding the objective back, and its absolute value says roughly what one more unit of slack would bring: one more contact, one more euro of budget. You know which budget to renegotiate first.

Result block: 49 rows retained, objective reached, price μ and value reached for each constraint
The contact cap binds: each extra contact would be worth about 46 of profit. Cost and value do not bind (μ close to 0).

See the selection in the 3D scene

The selection becomes a colour group, Optimized, to spot in the 3D scene or to describe in profiling. Selection Plane draws in the scene the hyperplane that separates the retained rows from the others.

3D scene: customers by expected profit, contact cost and value, retained ones in red, an amber plane cutting through the cloud
The retained customers (`Optimized` group, in red) and the selection plane, which weighs profit and each budget by its price μ.

Try it on your own data

Everything runs in your browser: your data never leaves it.

Open Tetrachore

Updated 7 November 2026