Questions tagged [or-tools]

Google's Operations Research Tools (OR-Tools)

Google Operations Research Tools (OR-Tools), also known as Google Optimization Tools, is a software suite for solving combinatorial optimization problems. It contains:

  • Constraint programming solver.
  • Interface to linear programming and mixed integer programming solvers.
  • Algorithms for TSP, VRP and Graphs.
  • Bin packing and knapsack algorithms.

Natively in C++; available also in Python, C#, or Java.

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

1080 questions
19
votes
3 answers

Finding all the combinations of free polyominoes within a specific area with a SAT-solver (Python)

I am new to the world of SAT solvers and would need some guidance regarding the following problem. Considering that: ❶ I have a selection of 14 adjacent cells in a 4*4 grid ❷ I have 5 polyominoes (A, B, C, D, E) of sizes 4, 2, 5, 2 and 1 ❸ these…
solub
  • 1,291
  • 17
  • 40
12
votes
1 answer

Which solver do Googles OR-Tools Modules for CSP and VRP use?

I am currently evaluating googles or-tools and just noticed that it's not really a solver on its own but mainly an interface to other solvers. What I'd like to know is which solvers this framework uses for constraint and routing problems. I have…
11
votes
1 answer

OR-tools consistently returns very sub-optimal TSP solution

Generating some random Gaussian coordinates, I noticed the TSP-solver returns horrible solutions, however it also returns the same horrible solution over and over again for the same input. Given this code: import numpy import math from…
Herbert
  • 5,279
  • 5
  • 44
  • 69
10
votes
3 answers

How to set SetGlobalSpanCostCoefficient and the capacity parameter in AddDimension properly?

I'm using OR-Tool to solve a VRP problem. I have experimented a bit with the exemple problem in the doc and managed to write a functioning program, but, I do not understand the purpose of the SetGlobalSpanCostCoefficient and how to set it properly.…
Jugurtha
  • 113
  • 1
  • 9
10
votes
2 answers

Constraint optimisation with google operations research tools

I have a set of many (10000+) items, from which have I have to choose exactly 20 items. I can only choose each item once. My items have profits, and costs, as well as several boolean properties (such as colour). I've read and worked through the…
10
votes
3 answers

Boolean operations on constraints in Google or-tools library

I'm beginner in constraint programming and I'm using Google or-tools library in my c# program. I want to add following constraint to my solver: ((t1 >= 12 && t1 <= 15) || (t2 >= 16 && t2 <= 18)) && ( t1 + t2 ) < 30 So I write following piece of…
Masoud
  • 8,020
  • 12
  • 62
  • 123
9
votes
1 answer

Modified bus scheduling problem in ortools

I want to modify the bus scheduling problem from ortools so as each driver's shift to be consecutive in terms of slots and drivers can share a shift at the same time if needed. For example, assuming that we have the following half-hour shifts…
azal
  • 1,210
  • 6
  • 23
  • 43
9
votes
1 answer

How can i install Google's CP solver OR-Tools in MiniZinc?

I'm currently working on MiniZinc, and i have been running my models with the two solvers integrated in MiniZinc: Gecode and Chuffed. I've been running it in the IDE, but i am aware that it can be runned in bash too (using minizinc command). But i…
9
votes
4 answers

Google OR-Tools: Could not run the java example, java.lang.UnsatisfiedLinkError: no jniortools in java.library.path

I a newbie in java, I wanna try google or-tools for vehicle routing problem Just try to run java example from here But I got this exception: java.lang.UnsatisfiedLinkError: no jniortools in java.library.path There is a line of code which load…
pham cuong
  • 849
  • 1
  • 12
  • 24
9
votes
2 answers

N-Queens Symmetry Breaking Google OR Tools

One of the samples for the Google or-tools is a solver for the n-queens problem. At the bottom it says that the implementation can be improved by adding symmetry breaking constraints to the constraint solver. Looking around the internet, I found…
Nick Larsen
  • 18,631
  • 6
  • 67
  • 96
8
votes
2 answers

Google OR-Tools TSP spanning multiple days with start/stop times

I am using Google OR-Tools to optimize the routing of a single vehicle over the span of a several day. I am trying to: Be able to specify the number of days over which to optimize routing. Be able to specify the start location and end location for…
8
votes
2 answers

Installing Google or-tools with gradle project on Windows 10 (Intellij IDEA)

Is it possible to install the library on IntelliJ Idea? or do I have to use Visual Studio 2017? If so, how do I install it? I find the google documentation confusing.
Mattia Z.
  • 103
  • 1
  • 6
7
votes
0 answers

VRPTW: OR-Tools does not return a feasible solution in a very simple case

I've been working with or-tools for a few months now but have recently experienced the following miss: Model: 2 vehicles, each one has a start location s0, s1 and an end location t0, t1. 2 locations to visit x0, x1. Time windows: [[5400, 5820],…
Amihai Zivan
  • 173
  • 4
7
votes
1 answer

Can the CP solver be initialised at a specific point?

I am using the CP-Sat solver to optimise a timetable I am making. However, this now takes a long time to solve. Is it possible to seed the solver with an old result, to act as a starting point, with the goal of reducing the time required to find the…
Andrew
  • 539
  • 5
  • 20
7
votes
1 answer

Employees shift problem - link missions together

I have a list of Employee and a list of Mission. Each mission have a start time and a duration. In the cp model (Google CpSat, from or-tools package), I defined shifts = Dictionary<(int,int),IntVar>, where shifts[(missionId, employeeId)] == 1 if and…
Antoine C.
  • 3,730
  • 5
  • 32
  • 56
1
2 3
71 72