OR-Tools Examples

  • This page provides a variety of code examples and tutorials for different optimization problems, including linear optimization, integer optimization, constraint optimization, and routing.

  • The examples cover various use cases like the Traveling Salesperson Problem (TSP), Vehicle Routing Problem (VRP), and more, with variations like capacity constraints, pickup and delivery, and time windows.

  • Users can access code in C++, Python, .Net, and Java, along with accompanying tutorials to understand the implementation.

  • Interactive Colabs are available, allowing users to run the code demos directly in their browser for immediate experimentation.

  • The table organizes these resources by problem type and interface, providing easy navigation to relevant materials for specific optimization needs.

The following table provides links to:

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 2026-03-18 UTC.