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.

LanguageFront-endInstall
PythonPyomo, OR-Tools MathOptpip install "quicopt[pyomo]" or "quicopt[mathopt]"
JuliaJuMPPkg.add(["QuicoptClient", "JuMP"])
R, Rubythe client's own modelsee 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

PyomoOR-Tools MathOpt
Objectiveslinear, quadratic, and general non-linear — + - * / ^ and sin cos exp log sqrt abslinear and quadratic
Constraints== / <= / >= / ranged, including non-linear expressionslinear: == / <= / >= / ranged and one-sided
Variablesbounds (incl. unbounded), continuous / integer / binarybounds (incl. unbounded), continuous / integer / binary
Senseminimize / maximizeminimize / 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 @ x with 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 generic x1, 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:

milp.jl
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.

Talk to us →