關於 OR-Tools
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
OR-Tools 是組合最佳化的開放原始碼軟體,可在一組非常可能的解決方案中,針對問題找出最佳解決方案。以下列舉 OR-Tools 能夠解決的問題:
- 車輛路線規劃:根據車輛限制 (例如「這款卡車不能超過 20,000 磅」或「所有送貨人員必須在 2 小時內完成」
- 排程:為一組複雜的工作找出最佳排程,其中部分工作需要在一組固定的機器或其他資源上執行。
- 特徵分塊包裝:盡可能將多種不同大小的物件封裝成具有最大容量的固定二進位數。
在這類情況下,這類問題通常有許多可能的解決方案,例如讓電腦一次搜尋所有解決方案。
為了克服上述問題,OR-Tools 使用最先進的演算法縮小搜尋集,以找出最佳 (或接近最佳) 解決方案。
OR-Tools 提供下列工具的解題工具:
- 限製程式設計
- 運用一組技巧找出可解決的解決方案,以解決限制 (例如一個房間無法同時用於兩個事件,或兩地的裁剪距離不得短於軟管長度,或一次不能錄製超過 5 個電視節目)。
- 線性和混合整數程式設計
- Glop 線性最佳化器會根據一組線性不等式的限制,找出線性目標函式的最佳值 (例如,指派工作給指定人員,或找出一組資源的最佳分配,同時將成本降到最低)。Glop 和混合整數程式設計軟體 SCIP 也可透過 Google Apps Script Optimization Service 取得。
- 汽車路線
- 專門用來找出特定限制條件的最佳車輛路徑專用程式庫。
- 圖形演算法
- 用於在圖形中尋找最短路徑的程式碼、最低流程、最大流量和線性總和。
下一節將協助您快速開始使用 OR-Tools。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-09 (世界標準時間)。
[null,null,["上次更新時間:2024-08-09 (世界標準時間)。"],[[["\u003cp\u003eOR-Tools is an open source software that helps find the best solution among many possibilities for problems like vehicle routing, scheduling, and bin packing.\u003c/p\u003e\n"],["\u003cp\u003eIt utilizes advanced algorithms to efficiently search for optimal or near-optimal solutions without having to examine every single possibility.\u003c/p\u003e\n"],["\u003cp\u003eOR-Tools offers various solvers including constraint programming, linear and mixed-integer programming, vehicle routing, and graph algorithms for diverse problem-solving needs.\u003c/p\u003e\n"],["\u003cp\u003eThese solvers can tackle complex scenarios with limitations like resource capacities, scheduling dependencies, and route optimization.\u003c/p\u003e\n"]]],["OR-Tools tackles combinatorial optimization problems, aiming to find the best solution from numerous possibilities. It addresses challenges like vehicle routing, scheduling, and bin packing. The software uses advanced algorithms to efficiently narrow the search for optimal solutions. It features solvers for Constraint Programming, handling problems with constraints, Linear and Mixed-Integer Programming for optimizing linear functions, specialized Vehicle Routing, and Graph Algorithms for path and flow calculations. OR-Tools can help in the process of finding feasible or optimal solutions.\n"],null,["# About OR-Tools\n\nOR-Tools is open source software for *combinatorial optimization*, which seeks\nto find the best solution to a problem out of a very large set of possible\nsolutions. Here are some examples of problems that OR-Tools solves:\n\n- Vehicle routing: Find optimal routes for vehicle fleets that pick up and deliver packages given constraints (e.g., \"this truck can't hold more than 20,000 pounds\" or \"all deliveries must be made within a two-hour window\").\n- Scheduling: Find the optimal schedule for a complex set of tasks, some of which need to be performed before others, on a fixed set of machines, or other resources.\n- Bin packing: Pack as many objects of various sizes as possible into a fixed number of bins with maximum capacities.\n\nIn most cases, problems like these have a vast number of possible\nsolutions---too many for a computer to search them all.\nTo overcome this, OR-Tools uses state-of-the-art algorithms to narrow down the\nsearch set, in order to find an optimal (or close to optimal) solution.\n\nOR-Tools includes solvers for:\n\n[Constraint Programming](/optimization/cp)\n: A set of techniques for finding feasible solutions to a problem expressed as\n *constraints* (e.g., a room can't be used for two events simultaneously, or the\n distance to the crops must be less than the length of the hose, or no more than\n five TV shows can be recorded at once).\n\n[Linear and Mixed-Integer Programming](/optimization/lp)\n: The [Glop](/optimization/lp/glop) linear optimizer finds the optimal value of\n a linear objective function, given a set of linear inequalities as constraints\n (e.g., assigning people to jobs, or finding the best allocation of a set of\n resources while minimizing cost). Glop and the mixed-integer programming\n software [SCIP](http://scip.zib.de) are also available via the Google Apps\n Script [Optimization Service](/apps-script/reference/optimization).\n\n[Vehicle Routing](/optimization/routing)\n: A specialized library for identifying best vehicle routes given constraints.\n\n[Graph Algorithms](/optimization/flow)\n: Code for finding shortest paths in graphs, min-cost flows, max flows, and\n linear sum assignments.\n\nThe [next section](/optimization/introduction/get_started) will get you started\nusing OR-Tools quickly."]]