Questions tagged [cp-sat]
Questions relating to the Google CP-SAT solver, available through OR-Tools.
77 questions
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
votes
1
answer
143
views
how to use Absolute value constraint & to AddDivisionEquality
I am an absolute beginner here. I was trying to solve the below problem.
I have 4 valves A,B,C,D which are placed in XY plane at locations A(10,10) B(20,10) C(20,20) D(10,20).
Whenever I open a valve, ...
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 ...
-1
votes
2
answers
437
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 ...
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:
...
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
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;
...
1
vote
1
answer
114
views
Infeasibility with scheduling_with_transitions
I am following the example in https://github.com/google/or-tools/blob/stable/examples/contrib/scheduling_with_transitions_sat.py
If am i correct, my example below for jobs_a, each job has a single ...
1
vote
2
answers
235
views
Most constraining constraint CP-SAT
I am using CP-SAT to minimize a problem similar to Flexible Job Shop Scheduling (https://github.com/google/or-tools/blob/stable/examples/python/flexible_job_shop_sat.py), with a minimization objective....
3
votes
1
answer
486
views
How to reset hints in a CP-SAT model?
Pretty much the title. I have a cp model for which I have already provided a hint when minimizing a given objective function. I now want to provide a new hint to minimize the model with respect to a ...
0
votes
0
answers
216
views
Flexible job shop scheduling with sequence dependent setup times - maximum problem size?
I have created a flexible job shop scheduling problem using
https://github.com/google/or-tools/blob/stable/examples/python/flexible_job_shop_sat.py as a basis. I have introduced some conditional ...
0
votes
1
answer
338
views
Job Shop Scheduling with Multiple possible machines for a task in CP-SAT
I am trying to convert the job shop scheduling example of CP-SAT, which goes as;
Below is a simple example of a job shop problem, in which each task is labeled by a pair of numbers (m, p) where m is ...