שירות MathOpt
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
MathOpt הוא ממשק API לבניית מודלים ולפתרון בעיות אופטימיזציה מ-C++ ומ-Python. שירות MathOpt הוא קבוצה ניסיונית של שיטות ב-OR API, שמאפשרת לפתור בעיות אופטימיזציה מתמטיות במרחוק באמצעות נקודת הקצה:
https://optimization.googleapis.com/v1/mathopt:solveMathOptModel
תכונות MathOpt
מודלים של MathOpt יכולים להכיל:
- משתנים רציפים או מספרים שלמים
- מגבלות לינאריות או ריבועיות
- יעדים לינאריים או ריבועיים
המודלים מוגדרים בנפרד מכל פותר, ואפשר להחליף ביניהם. בSolveMathOptModel
יש תמיכה בפותרים הבאים:
שירות MathOpt תומך ברוב התכונות של MathOpt בעת פתרון מודל, כולל:
- זוגיות
- קרניים ראשוניות וקרניים כפולות
- פתרונות ראשוניים לא אופטימליים ופתרונות כפולים
- התחלות חמימות (לפי פתרון או בסיס)
- הסיבה המפורטת לסגירה
- עדיפות הסתעפות
- פרמטרים עצמאיים רבים לפותרים
עדיין אין תמיכה בקריאות חוזרות (callback), צמיחה מצטברת והפרעות. שירות MathOpt יתמוך בתכונות האלה בעתיד באמצעות פרוטוקול תקשורת עשיר יותר.
הגדרה והתקנה
כדי להשתמש ביכולות של MathOpt כדי לפתור מרחוק את הבעיה, אתם צריכים מפתח API שתוכלו לקבל במדריך ההגדרה. MathOpt מספקת ספריות לקוח ב-C++ וב-Python, שזמינות כחלק מכלי ה-OR מאז גרסה 9.9.
אם יש לך שאלות
שקשורות לשירות MathOpt, אפשר לפנות אלינו בכתובת or-mathopt-service+support@google.com.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-08-09 (שעון UTC).
[null,null,["עדכון אחרון: 2024-08-09 (שעון UTC)."],[[["\u003cp\u003eMathOpt 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.\u003c/p\u003e\n"],["\u003cp\u003eMathOpt 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.\u003c/p\u003e\n"],["\u003cp\u003eThe 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.\u003c/p\u003e\n"],["\u003cp\u003eTo 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.\u003c/p\u003e\n"]]],["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"],null,["# The MathOpt Service\n\nMathOpt is an API for modeling and solving optimization problems from C++ and\nPython. The MathOpt *service* is an experimental set of methods within the OR\nAPI that lets you to solve mathematical optimization problems *remotely* using\nthe endpoint:\n\n- `https://optimization.googleapis.com/v1/mathopt:solveMathOptModel`\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\nModels are defined independently of any solver and solvers can be swapped\ninterchangeably. The following solvers are supported in the `SolveMathOptModel`:\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- [OSQP](https://osqp.org/)\n- [HiGHS](https://highs.dev/)\n\nThe MathOpt service supports most the features of MathOpt when solving a model,\nincluding:\n\n- Duality\n- Primal and dual rays\n- Suboptimal primal and dual solutions\n- Warm starts (by solution or basis)\n- Detailed termination reason\n- Branching priority\n- Many solver independent parameters\n\nCallbacks, incrementalism, and interruption are not yet supported. The MathOpt\nservice will support these features in the future using a richer communication\nprotocol.\n\nSetup and Installation\n----------------------\n\nTo use MathOpt's remote solve capabilities, you need an API key that can be\nobtained following the [setup guide](/optimization/service/setup). MathOpt provides client libraries in\nC++ and Python, which are available as part of [OR-Tools since release 9.9](https://github.com/google/or-tools/releases/tag/v9.9).\n\nYou can reach out to [or-mathopt-service+support@google.com](mailto:or-mathopt-service+support@google.com) should you have\nquestions related to the MathOpt service."]]