Skip to main content
Filter by
Sorted by
Tagged with
Advice
1 vote
1 replies
42 views

Some resources point to the fact that these constraints are encoded exactly the same way: model.add_bool_or(b1, b2, b3) # b1 or b2 or b3 must be true model.add_at_least_one([b1, b2, b3]) # ...
Josep's user avatar
  • 754
1 vote
1 answer
71 views

I have set of tasks in a constraint satisfaction problem. These tasks are using a centrifuge. So if they overlap, then they must overlap completely (I can't add tasks while the centrifuge is spinning)....
Austin's user avatar
  • 11
0 votes
1 answer
104 views

I installed OR-Tools following these instructions: C++ binary on Windows Now I am trying to run this example: nurse scheduling problem I get a compiler error: 'StopSearch': identifier not found This ...
Dr Phil's user avatar
  • 899
0 votes
1 answer
98 views

I have the following excerpt from my Python code For emp in employees: Model.Add(d[emp] >= 25) .OnlyEnforceIf(d120[emp]) Model.Add(d[emp] < 25) .OnlyEnforceIf(d121[emp]) It is my ...
Prem Narasimhan's user avatar
0 votes
0 answers
169 views

I'm working on a multi-objective optimization problem using CP-SAT, where I combine several objectives into a single objective using a weighted sum approach. All my objective terms are positive-valued,...
mcane's user avatar
  • 1
-1 votes
1 answer
76 views

I have an startTime interval, and a series of shift times like (2025-03-14 08:00-11:00,2025-03-14 11:30-15:00,2025-03-15 08:00-11:00,2025-03-15 11:30-15:00,2025-03-16 08:00-11:00,2025-03-16 11:30-15:...
Hakan Cunier's user avatar
3 votes
2 answers
449 views

I'm trying to establish an upper bound on a fairly elaborate equation that comes from a tree. It has a small number of of inputs that can be encoded with "one-hot" variables. All numbers are ...
danvk's user avatar
  • 17.2k
0 votes
1 answer
189 views

I am solving a simple capacitated VRP with CP-SAT solver with 6 vehicles and 17 nodes. The issue that is happening is that the solution ends up using all 6 vehicles, when clearly a smaller number of ...
Bhartendu Awasthi's user avatar
1 vote
1 answer
402 views

I am using ortools.sat.python.cp_model (version 9.9) to solve some kind of JSSP. I have heuristics that find me (possibly infeasible) solutions. I test the solutions, choose the best one and use ...
S.M.'s user avatar
  • 13
0 votes
1 answer
99 views

In a task allocation problem, suppose: We need to allocate 2 tasks to a worker in the following 2 days. There is only one worker and he can work at most 8 hours a day. We want to minimize the total ...
John's user avatar
  • 1,838
0 votes
1 answer
204 views

I'm building a Python Sudoku Solver to solve the classic and non-classic sudokus using the cp_model from Google's ortools library. Specifically, I'm trying to write a method that solves a Sudoku ...
Arun's user avatar
  • 295
-1 votes
1 answer
132 views

I manage employees' working days. If an employee works for {consecutive_count} consecutive days, they are given {rest} days off. ex) OK [0,1,1,1,1,0,0,1,0,0,0,1,1,1,0,...] FAIL [0,0, ** 1,1,1,1,0, ** ...
nakamura johnielo's user avatar
0 votes
1 answer
66 views

By mistake, while defining a CP-SAT model, I've created two variables with the same name: variable1 = model.NewIntVar(0, cp_model.INT32_MAX, "cool_name") variable2 = model.NewIntVar(0, ...
MarcoM's user avatar
  • 1,204
0 votes
1 answer
93 views

define 2d-array as following in minizinc : array[1..400,1..400] of var int : en_b ; run with Or-tools CP-SAT 9.11 as backend , get error with "=====UNKNOWN=====" . PS. 9.11 is default with ...
qin cubism's user avatar
0 votes
1 answer
187 views

I am trying to combine the flexible job shop optimization with flexible durations based on machine calendars like here: https://groups.google.com/g/or-tools-discuss/c/DA_4Pniwhn8/m/BH2vO5K1BgAJ My ...
Martin Stimpfl's user avatar
0 votes
1 answer
163 views

I have two tasks to plan for the next two days in the shopfloor. There is only one operator in the shopfloor and this operator can do only one task a day in these two days. The tasks are of different ...
John's user avatar
  • 1,838
0 votes
1 answer
67 views

From the attached seminar (timestamped), if you constrain the sum of all presence_literals * interval_size to be less than the makespan, the proven problems number of problems rises according to the ...
Gerard L's user avatar
0 votes
1 answer
438 views

I'd be interested to use MiniZinc for its in-browser experience & its support of many solvers, but at the same time I find CP-SAT (from OR-Tools) really efficient and I'd like to be sure that by ...
tobiasBora's user avatar
  • 2,594
0 votes
2 answers
139 views

I have two arrays of model variables - arr1 and arr2. I would like to declare a constraint that would forbid a situation when there is at least 1 true in arr1 AND at least 1 true in arr2. (There can ...
Leszek Pachura's user avatar
0 votes
1 answer
59 views

I want to add the constraint that abs(x) >= y with x and y being variables. The following code fails because AddBoolOr doesn't suppport BoundedLinearExpression as arguments. model = cp_model....
Rodolphe LAMPE's user avatar
3 votes
2 answers
603 views

I am using a CP-sat solver by google or tools and I am adding some constraints to my variables. There is a constraints that should be enforce if 2 bool variables are True. However I can't manage to ...
andré amistadi's user avatar
0 votes
1 answer
182 views

I wanted to expand the job shop problem for the CP-Sat Solver by adding optional tasks,that don't have to be executed. But my problem is that I don't really know how "remove" a task from the ...
sodanet's user avatar
0 votes
0 answers
61 views

I am currently using a cp-sat solver from google or-tools in python. I am using it to plan tasks in a schedule and to affect people to this task. So my variables are tasks that require a set of skills,...
andré amistadi's user avatar
0 votes
1 answer
452 views

I ran the CP-SAT solver three consecutive times on my model. The wall times were: 0h07m41s 0h39m45s 2h17m42s There is almost 18x difference in runtime from the fastest to the slowest. There were no ...
ScottJ's user avatar
  • 1,091
0 votes
1 answer
679 views

I apologize if people feel like this stuff have already been explained plenty of times. But after an extensive search I am still not sure exactly what is what, or which information is still correct. ...
Tue's user avatar
  • 546

1
2 3 4 5
8