8000 GitHub - pdanzinger/or-tools-priority_search: Google's Operations Research tools. Version 9.0 with MiniZinc priority_search, hot start and random variable selection.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Google's Operations Research tools. Version 9.0 with MiniZinc priority_search, hot start and random variable selection.

Notifications You must be signed in to change notification settings

pdanzinger/or-tools-priority_search

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OR-Tools 9.0 with MiniZinc Priority Search, MiniZinc hot start, and random variable selection strategies

This repository contains modifications to Google's OR-Tools solver (version 9.0) I developed for my diploma thesis, Optimizing Constraint Programming for Real World Scheduling of Test Laboratories at TU Wien.

Extensions are:

  • Implementing the MiniZinc priority_search annotation proposed by: Feydy, Thibaut, et al. "Priority search with MiniZinc." ModRef 2017: The Sixteenth International Workshop on Constraint Modelling and Reformulation.
  • Hot start support for MiniZinc, allowing the solver to take solution hints as input through MiniZinc annotations.
  • Random variable selection as a heuristic for custom search strategies.

Priority Search

To use priority search, add the following code to your MiniZinc model:

annotation priority_search(array[int] of var int, array[int] of ann, ann, ann);

And use it like:

solve
    :: priority_search(
        [var1, var2, ...],
        [seq_search([...]), seq_search([...]), ...],
        smallest,
        complete
    )
    satisfy;

Hot Start

To hot start the solver with a known good variable assignment, use the following code:

annotation hot_start_ortools(array[int] of var int,array[int] of ann);
annotation hot_start_value(int);

solve
    :: hot_start_ortools(
        [var1, var2, ...],
        [hot_start_value(val1), hot_start_value(val2), ...]
    )
    satisfy;

The syntax is a bit indirect as a workaround to avoid having to modify the flatzinc parser in OR-Tools.

Random Variable Selection

Use random_order as the variable selection strategy in any search annotation.

License

My modifications to OR-Tools are released under the same Apache 2.0 license as OR-Tools itself.

Funding

This work was financially supported by the Austrian Federal Ministry for Digital and Economic Affairs, the National Foundation for Research, Technology and Development and the Christian Doppler Research Association. Their support is gratefully acknowledged.

OR-Tools - Google Optimization Tools

Build Status Build Status Build Status

PyPI version PyPI download Binder
NuGet version NuGet download
Maven Central
Discord

Google's software suite for combinatorial optimization.

Table of Contents

About OR-Tools

Google Optimization Tools (a.k.a., OR-Tools) is an open-source, fast and portable software suite for solving combinatorial optimization problems.

The suite contains:

  • A constraint programming solver;
  • A linear programming solver;
  • Wrappers around commercial and other open source solvers, including mixed integer solvers;
  • Bin packing and knapsack algorithms;
  • Algorithms for the Traveling Salesman Problem and Vehicle Routing Problem;
  • Graph algorithms (shortest paths, min cost flow, max flow, linear sum assignment).

We wrote OR-Tools in C++, but also provide wrappers in Python, C# and Java.

Codemap

This software suite is composed of the following components:

  • Makefile Top-level for GNU Make based build.
  • makefiles Subsidiary Make files, CI and build system documentation.
  • CMakeLists.txt Top-level for CMake based build.
  • cmake Subsidiary CMake files, CI and build system documentation.
  • bazel Subsidiary Bazel files, CI and build system documentation.
  • ortools Root directory for source code.
    • base Basic utilities.
    • algorithms Basic algorithms.
      • samples Carefully crafted samples.
    • graph Graph algorithms.
      • samples Carefully crafted samples.
    • linear_solver Linear solver wrapper.
      • samples Carefully crafted samples.
    • glop Google linear solver.
      • samples Carefully crafted samples.
    • lp_data Data structures for linear models.
    • constraint_solver Constraint and Routing solver.
      • doc Documentation of the component.
      • samples Carefully crafted samples.
    • sat SAT solver.
      • doc Documentation of the component.
      • samples Carefully crafted samples.
    • bop Boolean solver based on SAT.
    • util Utilities needed by the constraint solver
  • examples Root directory for all examples.
  • tools Delivery Tools (e.g. Windows GNU binaries, scripts, release dockers)

Installation

This software suite has been tested under:

  • Ubuntu 18.04 LTS and up (64-bit);
  • Apple macOS Mojave with Xcode 9.x (64-bit);
  • Microsoft Windows with Visual Studio 2019 (64-bit).

OR-Tools currently builds with a Makefile, but also provides Bazel and CMake support.

For installation instructions (both source and binary), please visit https://developers.google.com/optimization/introduction/installing.

Build from source using Make (legacy)

We provide a Make based build.
Please check the Make build instructions.

Build from source using CMake

We provide a CMake based build.
Please check the CMake build instructions.

Build from source using Bazel

We provide a Bazel based build.
Please check the Bazel build instructions.

Quick Start

The best way to learn how to use OR-Tools is to follow the tutorials in our developer guide:

https://developers.google.com/optimization/introduction/get_started

If you want to learn from code examples, take a look at the examples in the examples directory.

Documentation

The complete documentation for OR-Tools is available at: https://developers.google.com/optimization/

Contributing

The CONTRIBUTING.md file contains instructions on how to submit the Contributor License Agreement before sending any pull requests (PRs). Of course, if you're new to the project, it's usually best to discuss any proposals and reach consensus before sending your first PR.

License

The OR-Tools software suite is licensed under the terms of the Apache License 2.0.
See LICENSE-2.0 for more information.

About

Google's Operations Research tools. Version 9.0 with MiniZinc priority_search, hot start and random variable selection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 81.0%
  • Makefile 4.2%
  • Python 3.4%
  • SWIG 2.9%
  • C# 2.6%
  • Java 2.1%
  • Other 3.8%
0