Optimization Solver as a Service

paddi911 pts1 comments

Getting started — solve your first model — Quicopt Developer Hub

Solve your first model<br>Quicopt is a solver for hard optimization problems. The point of this page is to<br>get you from an empty directory to a solved model in three steps : install,<br>run an example, understand what happened. You build the model in a standard<br>Python modeling front-end — OR-Tools MathOpt or Pyomo , nothing<br>Quicopt-specific to learn — and hand it to a single client.solve() call.<br>Everything here runs on the free tier : no account, no API key to manage —<br>your first call sets one up automatically. It is a small entry point to try the<br>API; if you have questions or want to go further,<br>talk to us.<br>Step 1 — Install<br>The client is one package on PyPI. Install it with the front-end you model in —<br>the examples on this page use OR-Tools MathOpt:<br>Copy<br>pip install "quicopt[mathopt]"

If you prefer Pyomo, install quicopt[pyomo] instead — solve() accepts both<br>kinds of model directly. That's the whole setup: no license file, no signup, no<br>key to copy anywhere.<br>Step 2 — Run an example<br>Two ready-to-run scripts — a QUBO and a small MILP . Save either one and<br>run it. Switch tabs to compare — each slide shows the model and exactly what<br>prints:<br>QUBOMILP<br>qubo.py<br>Copyfrom ortools.math_opt.python import mathopt<br>from quicopt import Client

# A QUBO: 4 binary variables, a quadratic objective, no constraints.<br>model = mathopt.Model(name="qubo")<br>x = [model.add_binary_variable(name=f"x{i}") for i in range(4)]

# Reward each variable; penalise adjacent pairs on the 4-cycle 0-1-2-3-0.<br># Distinct linear weights break the symmetry, so the optimum is unique.<br>model.minimize(<br>-(1.0 * x[0] + 0.7 * x[1] + 1.3 * x[2] + 0.5 * x[3])<br>+ 2.0 * (x[0] * x[1] + x[1] * x[2] + x[2] * x[3] + x[0] * x[3])

client = Client("https://try.quicoptapi.pgi.fz-juelich.de")<br>result = client.solve(model)<br>print(result.display)

$ python qubo.py<br>├── shots<br>│ ├── 1 · Heuristic 1 -2.3 0.0s ◀ best<br>│ ├── 2 · Heuristic 2 -2.3 0.0s<br>│ └── 3 · Heuristic 2 -2.3 0.0s<br>├── status: heuristic<br>├── feasible: n/a<br>├── objective: -2.3<br>├── x: x0=1, x1=0, x2=1, x3=0 (4 variables)<br>└── solve_time: 0.0017 s

Copyfrom ortools.math_opt.python import mathopt<br>from quicopt import Client

# A tiny mixed-integer model: one continuous and one integer variable.<br>model = mathopt.Model(name="milp")<br>x = model.add_variable(lb=0.0, name="x")<br>y = model.add_integer_variable(lb=0.0, ub=10.0, name="y")<br>model.add_linear_constraint(x + 2 * y 14)<br>model.add_linear_constraint(3 * x - y >= 0)<br>model.maximize(3 * x + 4 * y)

client = Client("https://try.quicoptapi.pgi.fz-juelich.de")<br>result = client.solve(model)<br>print(result.display)

$ python milp.py<br>├── status: optimal<br>├── feasible: true<br>├── objective: 42.0<br>├── x: x=14, y=0 (2 variables)<br>└── solve_time: 0.0041 s

Step 3 — Understand what happened<br>The example did three things:<br>Built a model — a standard MathOpt Model with variables, an objective,<br>and (in the MILP) constraints. Nothing in it is Quicopt-specific; the same<br>code runs against any MathOpt-compatible solver, and a Pyomo model works the<br>same way.<br>Called client.solve(model) — the client converted the model, sent it to<br>the Quicopt API, and took care of the API key: your very first call needs no<br>key, one is set up automatically and reused for every later call on the same<br>Client.<br>Printed and returned the result — result.display is the framed view the<br>server renders; the Result object also carries status, objective, and<br>the solution keyed by your variable names. Every field is described in the<br>API reference.<br>What you can solve today<br>The API currently solves LP, QP, MILP, MINLP, QUBO, PUBO/HUBO, and NLP<br>models — there is a runnable example for each. One<br>free-tier edge to know: in a non-linear model, integer variables beyond binary<br>on/off decisions aren't accepted yet. Black-box objectives are coming soon ;<br>a model outside today's classes is declined with a readable message, never a<br>half-solved result.<br>Beyond the free tier<br>The free tier is a small, one-time entry point to try the API. Questions,<br>something unclear, or real models you want to try Quicopt on? Just ask:<br>Questions? Talk to us.<br>Whether something's unclear or you want to try Quicopt on your real models — tell us what you're optimizing.

Talk to us →<br>Where next<br>Examples — a runnable model for every supported problem<br>class, including how an infeasible model comes back.<br>API reference — the quicopt Python client in full:<br>Client, solve(), the Result fields, and the async job API.<br>Modeling front-ends — what you can express in<br>Pyomo and OR-Tools MathOpt.<br>About this service<br>The free evaluation API is provided as-is , for evaluation and research only —<br>without availability, functionality or result guarantees, and without any<br>service level. Liability is limited, to the extent permitted by law, to intent<br>and gross negligence.<br>We keep the data you send over the API to improve future versions of our<br>solvers. Please don't submit personal, confidential or otherwise sensitive data<br>inside an...

model client quicopt mathopt result solve

Related Articles