优化求解器即服务
Optimization Solver as a Service

原始链接: https://www.quicopt.com/developer/getting-started/

Quicopt 是一款功能强大的优化求解器,专为快速部署各类难题而设计。它支持使用 OR-Tools MathOpt 或 Pyomo 等标准 Python 框架构建模型,无需学习任何 Quicopt 专用语法。 使用方法十分简单:通过 PyPI 安装 `quicopt` 软件包,构建模型后调用 `client.solve(model)` 即可。该服务会在首次调用时自动管理您的 API 密钥,无需注册或申请许可文件。目前支持的问题类型包括 LP、QP、MILP、MINLP 和 QUBO。 该平台为研究和评估提供免费层级,方便用户快速测试模型。用户可访问完整的文档,其中包含所有支持问题类型的可运行示例及详细的 API 参考手册。 **重要提示:** 免费评估层级按“现状”提供,不包含服务保证。由于提交的数据将用于改进未来的求解器版本,请避免上传机密或敏感信息。如有咨询需求或需探索高级应用场景,欢迎直接联系 Quicopt 团队。

Hacker News 新内容 | 往期 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 优化求解器即服务 (quicopt.com) 6 点 由 paddi91 发布于 2 小时前 | 隐藏 | 往期 | 收藏 | 3 条评论 帮助 greatony 2 分钟前 | 下一条 [–] 看起来很有意思,它能解决多大规模的问题? 回复 paddi91 2 小时前 | 上一条 [–] 保持简单,每个模型只需一次调用即可求解。 回复 uoaei 7 分钟前 | 父评论 [–] *叹气* 我们真的需要教教这批新人什么叫“没有免费的午餐”了。又来了。 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请加入 YC | 联系 搜索:
相关文章

原文

Quicopt is a solver for hard optimization problems. The point of this page is to get you from an empty directory to a solved model in three steps: install, run an example, understand what happened. You build the model in a standard Python modeling front-end — OR-Tools MathOpt or Pyomo, nothing Quicopt-specific to learn — and hand it to a single client.solve() call.

Everything here runs on the free tier: no account, no API key to manage — your first call sets one up automatically. It is a small entry point to try the API; if you have questions or want to go further, talk to us.

The client is one package on PyPI. Install it with the front-end you model in — the examples on this page use OR-Tools MathOpt:

pip install "quicopt[mathopt]"

If you prefer Pyomo, install quicopt[pyomo] instead — solve() accepts both kinds of model directly. That's the whole setup: no license file, no signup, no key to copy anywhere.

Two ready-to-run scripts — a QUBO and a small MILP. Save either one and run it. Switch tabs to compare — each slide shows the model and exactly what prints:

from ortools.math_opt.python import mathopt
from quicopt import Client

# A QUBO: 4 binary variables, a quadratic objective, no constraints.
model = mathopt.Model(name="qubo")
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.
# Distinct linear weights break the symmetry, so the optimum is unique.
model.minimize(
    -(1.0 * x[0] + 0.7 * x[1] + 1.3 * x[2] + 0.5 * x[3])
    + 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")
result = client.solve(model)
print(result.display)

$ python qubo.py

├── shots
│   ├── 1 · Heuristic 1   -2.3   0.0s  ◀ best
│   ├── 2 · Heuristic 2   -2.3   0.0s
│   └── 3 · Heuristic 2   -2.3   0.0s
├── status:     heuristic
├── feasible:   n/a
├── objective:  -2.3
├── x:          x0=1, x1=0, x2=1, x3=0  (4 variables)
└── solve_time: 0.0017 s
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)

$ python milp.py

├── status:     optimal
├── feasible:   true
├── objective:  42.0
├── x:          x=14, y=0  (2 variables)
└── solve_time: 0.0041 s

The example did three things:

  1. Built a model — a standard MathOpt Model with variables, an objective, and (in the MILP) constraints. Nothing in it is Quicopt-specific; the same code runs against any MathOpt-compatible solver, and a Pyomo model works the same way.
  2. Called client.solve(model) — the client converted the model, sent it to the Quicopt API, and took care of the API key: your very first call needs no key, one is set up automatically and reused for every later call on the same Client.
  3. Printed and returned the resultresult.display is the framed view the server renders; the Result object also carries status, objective, and the solution keyed by your variable names. Every field is described in the API reference.

The API currently solves LP, QP, MILP, MINLP, QUBO, PUBO/HUBO, and NLP models — there is a runnable example for each. One free-tier edge to know: in a non-linear model, integer variables beyond binary on/off decisions aren't accepted yet. Black-box objectives are coming soon; a model outside today's classes is declined with a readable message, never a half-solved result.

The free tier is a small, one-time entry point to try the API. Questions, something unclear, or real models you want to try Quicopt on? Just ask:

Questions? Talk to us.

Whether something's unclear or you want to try Quicopt on your real models — tell us what you're optimizing.

Talk to us →
  • Examples — a runnable model for every supported problem class, including how an infeasible model comes back.
  • API reference — the quicopt Python client in full: Client, solve(), the Result fields, and the async job API.
  • Modeling front-ends — what you can express in Pyomo and OR-Tools MathOpt.

The free evaluation API is provided as-is, for evaluation and research only — without availability, functionality or result guarantees, and without any service level. Liability is limited, to the extent permitted by law, to intent and gross negligence.

We keep the data you send over the API to improve future versions of our solvers. Please don't submit personal, confidential or otherwise sensitive data inside an optimization model — the service isn't designed for that. Full details: Privacy Policy · Legal notice.

联系我们 contact @ memedata.com