Questions tagged [or-tools]
Questions related to or-tools, Google's open-source software suite for optimization
197 questions
2
votes
1
answer
320
views
Solver-agnostic Modeling Language in Java
Some good solver-agnostic modeling packages in Python are Pyomo and PuLP, with Pyomo being a little more versatile than PuLP. What are the equivalent non-commercial and well-supported solver-agnostic ...
2
votes
1
answer
269
views
How to stop optimization if (objective value improvement < 2) or (the time elapsed after previous solution > 60 seconds)
I want to return the solution of a cp-sat problem with respect to the below conditions.
If the optimization time exceeds 600 seconds ( I am doing it by using solver.parameters.max_time_in_seconds)
If ...
1
vote
0
answers
102
views
Using addHint in Google OR Tools CP sat solver is giving invalid model
I am working on solving a large scheduling model using GOOGLE OR Tools, and was trying to add warm start to it via addHint() for one of the variables, from the ...
2
votes
1
answer
200
views
how to formulate Shortest path prize collecting with revising the nodes allowed?
I am trying to formulate the shortest path prize collecting problem. If I use MTZ formulation then revisiting the nodes is not allowed.
However the shortest path between 1 to 5 is shown in left ...
0
votes
1
answer
179
views
Linearisation of variable positive or negative - test working but not on code
I am using ortools pywraplp with CBC solver. I need to calculate at some point the balance of the previous period and apply a different coefficient depending on the sign of it. In order to do this, I ...
-1
votes
2
answers
436
views
Job shop problem using google or-tools
We're looking for a replacement for our custom-written scheduling algorithm with endless loops and ifs. Recently we've discovered that or-tools exist with cp-sat solver and the problem we're solving ...
1
vote
1
answer
176
views
Scheduling optimization, adding loop change constraint
I am quite new to constraint programming and cp-sat. By following this blog post and example, I have been able to mostly tailor it to suit my shift scheduling. However there is one constraint I would ...
1
vote
0
answers
94
views
Guided local search for VRP in OR-TOOLS
I am trying to solve capacitated vehicle routing problem (CVRP) using OR-TOOLS
could you please tell me how guided local search (GLS) works for this problem in OR-TOOLS?
I only find very general ...
0
votes
1
answer
141
views
Slow performance with simple constraint programming model
Im pretty new in the world of CP. Currently Im trying to solved a single machine scheduling problem with changeovers.
Here is my code and model:
...
1
vote
1
answer
222
views
ortools CVRP objective: minimize routes past a threshold
I know that the ortools CVRP module, by default, is designed to minimize the total distance traveled among all vehicles. In my case, I am primarily concerned about making sure a very high percentage ...
0
votes
1
answer
100
views
CP-SAT solver stopped without print status statistics after first solution after implemented callback
Please, cp-sat solver stopped just after first solution when i add the test on objective value. Here below the code of callback.
...
5
votes
4
answers
757
views
Finding the longest snake on a grid
I'm trying to solve some variants of the following problem:
A 2D rectangular grid is given. Find the longest "snake" on it. Informally, a snake is a path that does not touch itself. In ...
1
vote
1
answer
164
views
OR-Tools CP-SAT solver: How modeling Flow constraints
I try to modeling this constraint (flow conservation constraint): Xi = sumj(Zij) = sumj(Zji). So I tried the first part : ...
1
vote
1
answer
187
views
Free solver for large LP with warm start and shadow prices
Please advise me a free solver for large linear programming problems that
supports warm start
can calculate shadow prices simultaneously solving the LP problem
has Python interface
I considered GLOP ...
-1
votes
1
answer
158
views
CP-SAT Explanation for interleave_search and interleave_batch_size
I am looking for more information in the above topics. The documentation shows the following;
...