使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
什么是 MathOpt
MathOpt 是一个用于对数学优化问题进行建模和解决的库,例如线性编程问题 (LP) 或混合整数编程问题 (MIP)。MathOpt 将建模与求解分隔开来,允许用户通过更改枚举(和构建依赖项)来选择求解器,从而在求解方法之间切换。
观看此视频,简要了解 2023 年 JuMP 大会演讲中的 MathOpt。
MathOpt 功能
MathOpt 模型可以包含:
- 整数或连续变量
- 线性约束或二次约束
- 线性目标或二次目标
- 多个层级的目标
- 专用 MIP 约束条件(SOS、指示器,将推出更多功能)
- 一些圆锥约束(二阶圆锥,更多即将出现)
模型的定义独立于任何求解器,并且求解器可以互换使用。MathOpt 支持以下求解器:
MathOpt 提供 C++ 和 Python 的客户端库来构建优化模型。
MathOpt 支持许多高级功能,包括:
- 不可行性分析(不可行的不可行集合,即 IIS),仅限 Gurobi
- 增量求解
- 回调
- 重复
- 原光和双射线
- 不太理想的原初解和二元解
- 删除变量和限制条件
- 温启动(按解决方案或基于)
- 详细的终止原因
- 分支优先级
- 中断
- 许多求解器独立参数
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-09。
[null,null,["最后更新时间 (UTC):2024-08-09。"],[[["\u003cp\u003eMathOpt is a library for modeling and solving mathematical optimization problems, including linear programming (LP) and mixed integer programming (MIP).\u003c/p\u003e\n"],["\u003cp\u003eMathOpt allows users to define models independently of solvers, enabling easy switching between various solvers like GLOP, PDLP, CP-SAT, SCIP, GLPK, Gurobi, and HiGHS.\u003c/p\u003e\n"],["\u003cp\u003eMathOpt supports a wide range of features including linear and quadratic constraints and objectives, integer and continuous variables, hierarchical objectives, and specialized MIP constraints.\u003c/p\u003e\n"],["\u003cp\u003eMathOpt provides client libraries in C++ and Python, along with a remote solving service for larger problems.\u003c/p\u003e\n"],["\u003cp\u003eMathOpt offers advanced features like infeasibility analysis, incremental solving, callbacks, duality, primal and dual rays, and more.\u003c/p\u003e\n"]]],["MathOpt is a library for modeling and solving mathematical optimization problems, such as LPs and MIPs. It supports continuous or integer variables, linear/quadratic constraints and objectives, and specialized MIP/conic constraints. Users can switch between solvers like GLOP, PDLP, CP-SAT, SCIP, GLPK, Gurobi, and HiGHS, independently of the model's definition. MathOpt offers C++ and Python client libraries with example, and provides features such as infeasibility analysis, incremental solving, callbacks, duality, and warm starts.\n"],null,["MathOpt\n-------\n\nMathOpt is a library for modeling and solving mathematical optimization\nproblems, for example, linear programming problems (LPs) or mixed integer\nprogramming problems (MIPs). MathOpt separates modeling from solving, allowing\nusers to switch between solution methods by changing an enum (and a build\ndependency) to select their solver.\n\nWatch this [video](https://www.youtube.com/watch?v=L5b4YQowXBg) for brief\nintroduction to MathOpt from the 2023 JuMP Conference Presentation.\n\nMathOpt Features\n----------------\n\nMathOpt models can contain:\n\n- integer or continuous variables\n- linear or quadratic constraints\n- linear or quadratic objectives\n- multiple hierarchical objectives\n- specialized MIP constraints (SOS, indicator, more to come)\n- some conic constraints (second order cone, more to come)\n\nModels are defined independently of any solver and solvers can be swapped\ninterchangeably. MathOpt supports the following solvers:\n\n- [GLOP](/optimization/lp/lp_advanced)\n- [PDLP](/optimization/lp/pdlp_math)\n- [CP-SAT](/optimization/cp/cp_solver)\n- [SCIP](https://www.scipopt.org/)\n- [GLPK](https://www.gnu.org/software/glpk/)\n- [Gurobi](https://www.gurobi.com) (requires licence)\n- [HiGHS](https://highs.dev/)\n\nMathOpt provides client libraries in [C++](https://github.com/google/or-tools/tree/stable/ortools/math_opt/cpp) and [Python](https://github.com/google/or-tools/tree/stable/ortools/math_opt/python) to build your\noptimization model. [Examples](https://github.com/google/or-tools/tree/stable/ortools/math_opt/samples) for both libraries are also available on\nGitHub.\n| **Note:** Check out the [MathOpt service](/optimization/service/math_opt/overview) for remote solves.\n\nMathOpt supports many advanced features, including:\n\n- Infeasibility Analysis (Irreducible Infeasible Set or IIS), Gurobi only\n- Incremental Solving\n- Callbacks\n- Duality\n- Primal and Dual rays\n- Suboptimal primal and dual solutions\n- Variable and constraint deletions\n- Warm starts (by solution or basis)\n- Detailed termination reason\n- Branching priority\n- Interruption\n- Many solver independent parameters"]]