As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [cp-sat]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
40 views

how to count the number of values that are greater than zero in OR-Tools

I am using OR-Tools for an employees scheduling problem. I have a dictionary that is defined as an IntVar, where such dictionary contains the number of hours that will be assigned to each employee, ...
luca_dix's user avatar
2 votes
1 answer
144 views

What exactly does the AddHint() method in Google OR-Tools' CP-SAT solver do?

I have an optimization problem that I am solving with CP-SAT and I am using the Python interface. Moreover, I know a good feasible solution coming from a heuristic and I want the solver to start its ...
John D's user avatar
  • 199
-1 votes
1 answer
91 views

[OR-Tools][CP-SAT] Implement an indicator function in a constraint

Good morning ! I would like to implement this constraint using CP-SAT (see image below). x_i,j is a boolean variable, a and b are given. The problem is that I don't know how to implement the ...
Arthursbr's user avatar
1 vote
1 answer
143 views

About circuit constraints in OR - tools

I am trying to implement a scheduling problem to solve with CP-SAT from OR-tools. There, in particular, for every machine I want to add a time transition constraint from every task that is performed ...
John D's user avatar
  • 199
3 votes
1 answer
108 views

CP-SAT's `NumBooleans()` parameter

The solver API for CP-SAT offers the attribute NumBooleans, which is documented as "Returns the number of boolean variables managed by the SAT solver". ...
Hanno's user avatar
  • 181
4 votes
1 answer
217 views

Relevance of order of model construction in CP-SAT

Question 1: Is ortool's CP-SAT sensitive to the order in which a model is constructed? In other words, does it matter which variables and constraints come first? I am seeing a high performance ...
Hanno's user avatar
  • 181
1 vote
1 answer
92 views

Simple Constraint Programming Problem: docplex works but equivalent ortools model is infeasible

I have a simple constraint programming model which can be solved using the docplex library, however I am struggling to implement the same model using ...
SlowLoris's user avatar
  • 145
2 votes
1 answer
79 views

Circuit constraint leading to infeasibility if there are 0 jobs producable one a machine

Using the CP-SAT Solver: My Model turns infeasible whenever there is no job available for a machine. Not every job can be built on every machine. Example Situtations: Less jobs than machines No jobs ...
cl_cookie's user avatar
2 votes
1 answer
183 views

RAM overflow when scheduling 1000+ intervals

Due to the answers to this and this questions, I was able to find the optimal solution for scheduling problem. However, if there are many tasks that must be scheduled, e.g. 1000+, then the solver ...
Artem Popov's user avatar
2 votes
1 answer
257 views

CP-SAT solver doesn't use all space available for scheduling

This problem is a continuation of this problem. The issue here is the solver doesn't use the whole space available for the scheduling and thus some jobs are not being scheduled. For example: we need ...
Artem Popov's user avatar
3 votes
1 answer
219 views

Force gaps between tasks, tasks are scheduled within their job's time windows in Jobshop problem

The problem I'm trying to solve is a modification of the original Jobshop problem. The additional constraints are: There is only one machine for all jobs and their tasks. Each job has a priority (...
Artem Popov's user avatar
3 votes
0 answers
140 views

Can Pyomo be linked with Google's GLOP or CP-SAT solvers?

Pyomo can be linked with several solvers Open source and commercial ones. I was wondering if Pyomo can be linked with Google's GLOP or CP-SAT solvers?
Optimization team's user avatar
2 votes
1 answer
153 views

Scheduling optimization, Adding 4 day same shift and 3 day off weekly constraint

Am writing a small scheduling program in C# for a group of 7 staff who will be working in three shifts daily for 4 weeks. Am using the google OR-Tools Template, but i have modified it abit This is the ...
indago's user avatar
  • 121
1 vote
1 answer
132 views

Modeling Multi-Agent Collision in Google CP-SAT Solver

I would like to implement a solution for Multi-Agent Pathfinding Problem using Google's CP-SAT Solver. How do I implement the constraint that prohibits 2 or more agents from occupying the same cell at ...
Raghav Thakar's user avatar
1 vote
2 answers
211 views

Google CP-SAT Infeasible ILP for Large Problem Area

I am trying to generate a shortest path between source and sink in a square grid of cells. I am using the Google CP-SAT solver ...
Raghav Thakar's user avatar
0 votes
1 answer
180 views

or-tools: job shop problem never exists not finding additional solutions

I am trying to solve a flexible job shop problem variant using or-tools. And in some input configuration, in general after one month of scheduling time, I am facing a weird behavior. I am aware that ...
Joel's user avatar
  • 9
3 votes
0 answers
389 views

Circuit constraints in ortools

I am looking to assign tasks to people. Each successive task should be started after the first one is finished and should be started at the same location as the preceding task. While the time ...
Srikanth Shastry's user avatar
3 votes
1 answer
145 views

"Complex" scheduling problem model structure

So, I'm modelling a job assigning problem in OR-Tools CP-SAT. I want to maximize rescheduled jobs based on some constraints. Right now jobs in my model look like this: ...
Gleb S's user avatar
  • 51
1 vote
1 answer
248 views

Circuit constraint respecting the order of the next n jobs / jobs on each machine starting at 0

I am working on a scheduling problem in OR-Tools using the CP-SAT solver. I'm working with python but I managed to rebuild this solution as starting point: Optimal way to ensure optional intervals are ...
cl_cookie's user avatar
3 votes
1 answer
753 views

CP-SAT _ Summing variables under conditions

I have been working lately on scheduling optimization using CP-SAT in OR-TOOLS and now I'm at the point where I need to start considering due dates in my model. I didn't want to put them as ...
ooo's user avatar
  • 119
2 votes
2 answers
127 views

Parallel scheduling with precedence constraints and variable job length

I have $N$ jobs and $M$ machines and want to minimize the makespan, i.e. the total time to finish all jobs. Some jobs have precedence constraints and can only be started once other jobs are finished. ...
tphillips's user avatar
  • 145