--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: ortools excerpt: | DuckDB Community Extensions Native CP-SAT constraint solving and GLOP linear optimization with relational resource allocation extension: name: ortools description: Native CP-SAT constraint solving and GLOP linear optimization with relational resource allocation version: 0.1.0 language: C++ build: cmake license: Apache-2.0 maintainers: - prasanthj excluded_platforms: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64;windows_arm64;windows_amd64_mingw;windows_amd64_rtools;linux_amd64_musl;linux_arm64_musl" opt_in_platforms: "linux_arm64;osx_amd64;osx_arm64" repo: github: prasanthj/duckdb-ortools ref: c657da7900676c05dbc46b8eeb022ed70b182ad6 variegata: c657da7900676c05dbc46b8eeb022ed70b182ad6 andium: c657da7900676c05dbc46b8eeb022ed70b182ad6 docs: hello_world: | INSTALL ortools FROM community; LOAD ortools; WITH solved AS ( SELECT ortools_solve('{ "version": 1, "solver": "cp_sat", "maximize": true, "variables": [{"id": "x", "upper": 4, "objective": 2}], "constraints": [] }') AS solution ) SELECT solution.status, solution.values['x'] AS x, solution.objective FROM solved; -- OPTIMAL | 4.0 | 8.0 extended_description: | Solve optimization models directly in DuckDB SQL using native C++ OR-Tools. No API key, hosted solver, or Python solver runtime is required. `ortools_solve` accepts a versioned JSON model and returns a typed solution struct containing status, objective, bound, decision values, timing, and infeasibility diagnostics. CP-SAT handles integer and Boolean constraints; GLOP handles continuous linear optimization. `ortools_allocate` supports relational allocation with capacity and demand shared across input chunks. Active searches honor DuckDB query cancellation. The community build is self-contained: its pinned, minimal OR-Tools dependencies are statically linked. Gurobi, CPLEX, Xpress, COIN-OR, GLPK, SCIP, HiGHS, and PDLP are disabled. License and modification notices are embedded and readable with `SELECT ortools_licenses();`. Model reference, examples, and dependency policy: https://github.com/prasanthj/duckdb-ortools extension_star_count: 0 extension_star_count_pretty: 0 extension_download_count: null extension_download_count_pretty: n/a image: '/images/community_extensions/social_preview/preview_community_extension_ortools.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Linux ARM64 | ❌ | ❌ | ❌ | ❌ | ✅ | | macOS AMD64 | ❌ | ❌ | ❌ | ❌ | ✅ | | macOS ARM64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Windows AMD64 | ❌ | ❌ | ❌ | ❌ | ❌ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ❌ | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions
| function_name | function_type | description | comment | examples | |------------------|---------------|-------------|---------|----------| | ortools_allocate | table | NULL | NULL | | | ortools_licenses | scalar | NULL | NULL | | | ortools_solve | scalar | NULL | NULL | | | ortools_version | scalar | NULL | NULL | | ### Overloaded Functions
This extension does not add any function overloads. ### Added Types
This extension does not add any types. ### Added Settings
| name | description | input_type | scope | aliases | typed_value | |----------------|---------------------------------------------------------|------------|--------|---------|-------------| | temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |