Modeling front-ends
There is no Quicopt-specific modeling language to learn. You write the model in a front-end you already know and hand it to the client's solve call; the client converts it.
| Language | Front-end | Install |
|---|---|---|
| Python | Pyomo, OR-Tools MathOpt | pip install "quicopt[pyomo]" or "quicopt[mathopt]" |
| Julia | JuMP | Pkg.add(["QuicoptClient", "JuMP"]) |
| R, Ruby | the client's own model | see Client libraries |
Python: Pyomo and OR-Tools MathOpt
Both extras can be installed side by side; solve() dispatches on the model
type you pass in.
What each front-end can express
| Pyomo | OR-Tools MathOpt | |
|---|---|---|
| Objectives | linear, quadratic, and general non-linear — + - * / ^ and sin cos exp log sqrt abs | linear and quadratic |
| Constraints | == / <= / >= / ranged, including non-linear expressions | linear: == / <= / >= / ranged and one-sided |
| Variables | bounds (incl. unbounded), continuous / integer / binary | bounds (incl. unbounded), continuous / integer / binary |
| Sense | minimize / maximize | minimize / maximize |
Which one to pick
- OR-Tools MathOpt for LP, QP, MILP, and QUBO models. Your variable names
survive into
result.solution, and the vectorised quadratic form (x @ Q @ xwith numpy) is a natural fit for QUBOs. - Pyomo when the model is genuinely non-linear —
exp,log, trigonometry, powers beyond quadratic — including MINLP (binary decisions mixed into a non-linear model) and higher-order binary polynomials (PUBO/HUBO). Note that the Pyomo front-end currently returns genericx1, x2, …solution keys.
Whatever the front-end, the same Result
comes back, and the status semantics are
identical.
Julia: JuMP
The Julia client reads JuMP models: affine, quadratic and non-linear objectives
and constraints, variable bounds (unbounded included), integrality, and Min or
Max. The model you build for any other JuMP solver goes to Quicopt as it is:
using QuicoptClient, JuMP
# A tiny mixed-integer model: one continuous and one integer variable.
model = Model()
@variable(model, x >= 0)
@variable(model, 0 <= y <= 10, Int)
@constraint(model, x + 2y <= 14)
@constraint(model, 3x - y >= 0)
@objective(model, Max, 3x + 4y)
result = solve(model) # reads QUICOPT_API_KEY
println(result.objective)
The full list of what the Julia client can express, including stochastic terms and orderings, is in its reference ↗.
R and Ruby: the client's own model
The R and Ruby clients come with their own model object: you declare variables
on it (bin_var, …), state the objective with minimize or maximize, and
solve it. The quickstart shows a complete example
in each; the R reference ↗ and the
Ruby reference ↗ list the rest.
Problem classes
Today the service solves LP, QP, MILP, MIQP, MINLP, QUBO, PUBO/HUBO, and NLP —
see the runnable example for each class.
Black-box objectives are coming soon; a model outside
today's classes is declined with a readable message (a
QuicoptError with
reason: "unsupported_model"), never a wrong result.
Need a class that isn't live yet?
Tell us what you're optimizing — we'll let you know as soon as your problem class ships.