Mixed-Integer Linear Programming
A linear model with some integer or binary decisions.
In plain terms
Some decisions are all-or-nothing: build a factory or not, buy 3 machines but never 3.5. When a plan mixes these yes/no or whole-number choices with ordinary quantities, it becomes a mixed-integer problem — much harder, because the solver can’t just nudge a dial, it has to choose.
The technical picture
Mixed-integer linear programming adds integrality: some variables must take whole-number or yes/no values, which is what makes the problem combinatorial.
Branch-and-bound based established solvers are strong on MILPs. Quicopt supports them too, and is most valuable when the integer decisions are coupled to structurally hard terms — higher-order, non-convex, or black-box — that those solvers cannot take in their native form.
Mathematical model▾
Minimize a linear objective subject to linear constraints, with a subset of variables restricted to integers.
Example
From install to solved model — a small, self-contained example, copy-paste ready.
Install the client
$ pip install "quicopt[mathopt]"Copy the example
from ortools.math_opt.python import mathopt
from quicopt import Client
# A tiny mixed-integer model: one continuous and one integer variable.
model = mathopt.Model(name="milp")
x = model.add_variable(lb=0.0, name="x")
y = model.add_integer_variable(lb=0.0, ub=10.0, name="y")
model.add_linear_constraint(x + 2 * y <= 14)
model.add_linear_constraint(3 * x - y >= 0)
model.maximize(3 * x + 4 * y)
client = Client("https://try.quicoptapi.pgi.fz-juelich.de")
result = client.solve(model)
print(result.display)Run it
$ python milp.py├── status: optimal ├── feasible: true ├── objective: 42.0 ├── x: x=14, y=0 (2 variables) └── solve_time: 0.0041 s
Docs, API reference and more examples live in the Developer Hub →
Benchmark
How Quicopt performs on representative mixed-integer linear programs.
Measured results for this class are being prepared and will appear here.