The MathOpt Service
Stay organized with collections
Save and categorize content based on your preferences.
MathOpt is an API for modeling and solving optimization problems from C++ and
Python. The MathOpt service is an experimental set of methods within the OR
API that lets you to solve mathematical optimization problems remotely using
the endpoint:
https://optimization.googleapis.com/v1/mathopt:solveMathOptModel
MathOpt Features
MathOpt models can contain:
- Integer or continuous variables
- Linear or quadratic constraints
- Linear or quadratic objectives
Models are defined independently of any solver and solvers can be swapped
interchangeably. The following solvers are supported in the SolveMathOptModel
:
The MathOpt service supports most the features of MathOpt when solving a model,
including:
- Duality
- Primal and dual rays
- Suboptimal primal and dual solutions
- Warm starts (by solution or basis)
- Detailed termination reason
- Branching priority
- Many solver independent parameters
Callbacks, incrementalism, and interruption are not yet supported. The MathOpt
service will support these features in the future using a richer communication
protocol.
Setup and Installation
To use MathOpt's remote solve capabilities, you need an API key that can be
obtained following the setup guide. MathOpt provides client libraries in
C++ and Python, which are available as part of OR-Tools since release 9.9.
You can reach out to or-mathopt-service+support@google.com should you have
questions related to the MathOpt service.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["MathOpt is an API that allows you to model and solve optimization problems using C++ and Python, with the MathOpt service enabling remote problem-solving via a dedicated endpoint."],["MathOpt supports a variety of model components, including integer/continuous variables, linear/quadratic constraints, and linear/quadratic objectives, and offers flexibility in solver selection with options like GLOP, PDLP, CP-SAT, SCIP, GLPK, OSQP, and HiGHS."],["The MathOpt service provides access to features such as duality, primal and dual rays, suboptimal solutions, warm starts, detailed termination reasons, and branching priority, while callbacks, incrementalism, and interruption are planned for future updates."],["To utilize the MathOpt service's remote solving capabilities, you will need an API key and the OR-Tools client libraries (available since release 9.9) for C++ and Python."]]],["MathOpt API allows modeling and remotely solving optimization problems via the `https://optimization.googleapis.com/v1/mathopt:solveMathOptModel` endpoint, supporting integer/continuous variables, linear/quadratic constraints, and objectives. Models are solver-independent, with supported solvers including GLOP, PDLP, CP-SAT, SCIP, GLPK, OSQP, and HiGHS. Features like duality, warm starts, and detailed termination reasons are available. Access requires an API key, and client libraries are in OR-Tools release 9.9. Future features will include callbacks, incrementalism, and interruption.\n"]]