or-tools

VRP example in the docs gives different output when I run it

VRP example in the docs gives different output when I run it Question: On https://developers.google.com/optimization/routing/vrp, it says: The complete programs are shown in the next section. When you run the programs, they display the following output: Route for vehicle 0: 0 -> 8 -> 6 -> 2 -> 5 -> 0 Distance of route: 1552m …

Total answers: 1

Spreading out shift assignments in constraint solver (ortools)

Spreading out shift assignments in constraint solver (ortools) Question: I used the Google OR-Tools Employee Scheduling script (thanks by the way) to make a on-call scheduler. Everything works fine and it is doing what it is supposed to. It makes sure each person works about the same amount of "shifts" (two week periods), it lets …

Total answers: 1

How to put a fixed specific quantity of items to be allowed in a bin

How to put a fixed specific quantity of items to be allowed in a bin Question: I have found this code for a bin packing problem in Google OR-tools. https://developers.google.com/optimization/bin/bin_packing#python_3 However, it does not have a volume constraint. What if the total quantity/number of items packed in a bin (which is printed in the output …

Total answers: 1

OR Tools – Creating Distance Matrix

OR Tools – Creating Distance Matrix Question: I am using Google OR Tools for solving the capacitated vehicle routing problem with pickups and deliveries. I am importing distance matrix from MSSQL database and struggling to formulate the distance matrix. Following are the tasks to be delivered : taskid SiteID CFR CFRC21126412A8612122 CFRORFC2207-002969 CFRC21126412A8612122 CFRORFC2207-003940 CFRC21085782A8615004 …

Total answers: 2

Google OR-Tools NotImplementedError: Evaluating a BoundedLinearExpr as a Boolean value is not supported

Google OR-Tools NotImplementedError: Evaluating a BoundedLinearExpr as a Boolean value is not supported Question: I have developed a nurse scheduling program for one of the departments of the hospital I work with in Python. The program makes use of OR-Tools and is based on the following example: https://github.com/google/or-tools/blob/master/examples/python/shift_scheduling_sat.py In order to constraint the number of …

Total answers: 3

Vehicle Routing with Different Vehicle Speed (Google OR Tools)

Vehicle Routing with Different Vehicle Speed (Google OR Tools) Question: Currently, I am working on the vehicle routing problems with different vehicle speeds. My approach is using speed adjustment ratio for each vehicle (which mean I have default speed), to build the time constraint I used the code: (data[‘travel_service’] is time matrix + service time …

Total answers: 1

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

How to set SetGlobalSpanCostCoefficient and the capacity parameter in AddDimension properly? Question: 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. …

Total answers: 3