--- id: ortools version: "9.15.6755" license: Apache 2.0 license_treatment: permissive maintenance: active --- # ortools — Google OR-Tools python libraries and modules License: permissive · Maintenance: active · Downloads: 6.6M/mo ## What it is and what it does OR-Tools is Google's open-source operations research library that bundles multiple specialized solvers for combinatorial optimization problems. It includes constraint programming solvers (CP-SAT and original CP), linear and mixed-integer programming optimizers (Glop and MPSolver wrappers), a vehicle routing library, and graph algorithms for shortest paths, min-cost flows, and assignments. The package wraps C++ implementations with Python bindings and depends on numpy, pandas, protobuf, absl-py, typing-extensions, and immutabledict for data handling and type support. Developers use OR-Tools to model and solve real-world scheduling, routing, assignment, and resource allocation problems. It's particularly suited for problems where you need to optimize an objective function subject to constraints—typical in logistics, manufacturing, workforce scheduling, and network optimization. The library supports both commercial solvers (Gurobi, SCIP) and open-source alternatives (CBC, CLP, GLPK) through its MPSolver wrapper, giving flexibility in solver choice and licensing. Use it for: - Optimize vehicle routes for delivery or service networks with time windows and capacity constraints. - Solve workforce scheduling problems to assign workers to shifts while respecting availability and skill requirements. - Find optimal resource allocation in manufacturing or project management under budget and time constraints. - Compute shortest paths, minimum-cost flows, or maximum flows in large graphs for network optimization. - Model and solve bin packing, knapsack, or assignment problems in supply chain and logistics planning. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. OR-Tools provides constraint programming, linear and mixed-integer programming, vehicle routing, and graph algorithm solvers developed at Google for operations research problems. Yes. OR-Tools is a mature, actively maintained library from Google with no known vulnerabilities, permissive licensing, and broad platform support. Install friction is moderate due to compiled components, but pre-built wheels cover common Python versions and architectures. It is the right choice for operations research and combinatorial optimization work, especially when you need multiple solver types or want to compare commercial and open-source solvers. ## Install pip install ortools uv add ortools poetry add ortools ## Installing ortools Before you install: Medium install friction due to compiled C++ components across multiple Python versions and platforms. Active maintenance with recent commits and stable production status; 13896 repository stars indicate established community adoption. License in practice: Apache 2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for most production and research applications. Quickstart: pip install ortools from ortools.linear_solver import pywraplp solver = pywraplp.Solver.CreateSolver('GLOP') if not solver: print('Could not create solver') Requires Python 3.9 or later; compiled wheels available for macOS (x86_64, arm64), Linux (x86_64, aarch64), and Windows (amd64). Verify before relying: - Whether the package includes pre-built solvers (CBC, CLP, GLPK) or requires separate installation of commercial solvers like Gurobi or SCIP. - Performance characteristics and scalability limits for large constraint programming or vehicle routing problems. - Whether graph algorithm implementations are optimized for specific graph sizes or problem structures. ## Package facts - License: Apache 2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 6.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags constraint programming solver, linear programming optimization, vehicle routing problem, mixed-integer programming, graph algorithms shortest path, operations research library, optimization solver python, optimization, operations-research, constraint-programming [View on SkillFed](https://skillfed.io/packages/ortools) · [View on PyPI](https://pypi.org/project/ortools/)