Just wondering what CP SAT does when it selects a branch which does not lead to global optimum? For instance, a code minimizing an objective returns: I understand it ignores solutions with greater objective value in minimizing context. Below is the setup. Since the code finished in 40 seconds, can one assume it enumerated all solutions? I was unable to
Tag: or-tools
How to create a vehicle route optimization problem using or-tools and google-distance matrix while nullifying the end location only?
I am trying to create a vehicle routing problem for multi-drivers with pickup and drop-off locations. The starting point for each driver is their current location and the ending point would be anywhere they end. The input to my algorithm is a series of lot/long locations. The final output would be the best(shortest) route decided for the driver starting from
Pickup and delivery VSP with aggregation points
I’m trying to solve a simple pickup and delivery VRP for one vehicle only using or-tools. I was following the docs https://developers.google.com/optimization/routing/pickup_delivery, and it seems that everything works as expected when all the pickup and drop-off points are different from each other. The pickups_deliveries array looks like this: However, let’s assume there are aggregation points where there’s more than one
VRP with different vehicle types using or-tools
I’m trying to optimize the best routes VRP with OR-Tools. I couldn’t find the right function in the documentation. CASE: Some customers only accept pickup trucks, some accept only trucks, some accept both trucks, pickup, and vans. There’s a single depot location and vehicles should carry orders to the right customers with accepted vehicles. Those vehicles I have Customers accept those vehicle
OR-Tools Vehicle Routing with Multiple Trips, Multiple Pickup and limited capacity
I am trying to solve a routing problem as follows: We have many ‘tasks’ and each task contains many items to be collected by workers items can appear in multiple tasks (e.g. item 1 can be in both task A and B) We already have the distance matrix of the items depot is fixed in each trip, each worker can
ORTools add constraint on visited nodes
I want to know if it is possible to set a traveling constraint for different routes, using ORTools VRPTWs problem. For example, if I have a list of nodes A, B, C, D, E Where C cannot be routed with D and E. Therefore possible routes would be (just a few examples): B -> A -> C A -> B
Adding an or-statement to an OR-Tools constraint (CP-SAT solver)
So I’m trying to build a scheduling tool in OR-tools similar to the employee scheduling example. However, in my case there are ten shifts to cover, and I would like to prevent people from having a ten hour workday by making sure either the first two shifts are off, or the last two shifts are off. I would like to
OR-Tools MIP Solver – Defining an objective in terms of int, instead of IntVar
I am trying to define an objective function which uses the current value of a variable, as an integer, for computation (as shown below): where x0, x1, x2 are IntVars. In my use case, the function foo is defined in a way that it requires int arguments. When I try and maximize objective_that_does_not_work, it randomly gives me either the upper