Skip to main content
2 votes
2 answers
151 views

How to enforce consecutive hours constraint for school timetable in Google OR-Tools CP-SAT?

I have created a small script to play around and learn how to use or-tools. As an example, I am trying to create a timetable for different school classes with the following constraints: Each subject ...
Ernesto Hernández's user avatar
0 votes
0 answers
67 views

How to minimize passenger ride time in OR-Tools Vehicle Routing Problem for school bus?

I'm working on a Vehicle Routing Problem using Google OR-Tools where I want to minimize ride time for passengers as part of the optimization objective. Context AM routes: Pick up kids from houses → ...
Harshaadhithya K's user avatar
0 votes
1 answer
65 views

Constraints: AddNoOverlap with OnlyEnforceIf

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
  • 1
2 votes
1 answer
148 views

How to enforce per-passenger maximum ride time as a soft constraint in OR-Tools VRP?

I’m working on a Vehicle Routing Problem using Google OR-Tools. The context is that each “customer” (or passenger) has to be picked up and eventually delivered to a common destination (for example, a ...
Harshaadhithya Kalaikumar's user avatar
-4 votes
1 answer
214 views

The correct way to include OR-tools library into your project (CMake)

I installed OR-tools for C++ binary on Windows following these instructions I am now trying to build this example cp solver program The compiler runs fine, but the linker gives me "unresolved ...
Dr Phil's user avatar
  • 899
0 votes
1 answer
102 views

Installing OR-Tools for C++ from Binary on Windows

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
2 answers
139 views

Using Add_implications in CP-SAT solver (google OR Tools)

I'm working on learning to use CP solver in ortools. I've built a test problem that attempts to locate feasible options for placing dogs that don't get along in cages so incompatible pairs are not ...
Jon T's user avatar
  • 23
0 votes
1 answer
92 views

Problem faced in CP-SAT when using OnlyEnforceIf

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
243 views

OR-tools (CP-SAT), Python implementation way faster than c++

I was working on solving the Minimum Dominating Set problem using CP_SAT, and I initially implemented it in Python. The Python version was very fast, so I decided to incorporate it into my main C++ ...
Floris van der Hout's user avatar
0 votes
1 answer
81 views

How to use QuadraticSum in or-tools

I am using or-tools solve a non-linear mixed integer programming problem. It's unclear to me how the QuadraticSum feature works. The questions I have are: what does it do, and how do I use it? In the ...
dikdirk's user avatar
  • 13
2 votes
1 answer
210 views

Getting Infeasibility while solving constraint programming for shelf space allocation problem

I'm trying to allocate shelf space to items on planogram using constraint programming. It is a big problem and I'm trying to implement piece by piece. At first we're just trying to place items on ...
Anand's user avatar
  • 391
0 votes
0 answers
157 views

CP-SAT: normalization for multi-objective optimization

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
3 answers
387 views

Python ortools CP-SAT solution for group optimization - code too clunky?

I have a group of people that I need to split up into subgroups. The subgroups do not all have to be the same size, but can be no smaller than 5 and no larger than 10. I have created a matrix (in ...
anon_group_optimizer's user avatar
-1 votes
1 answer
76 views

How can we apply constraints for a start time in a given time series with Google ORTools?

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
1 vote
1 answer
136 views

Optimize load balancing using a constraint solver

I'm trying to solve a load balancing problem with a constraint solver. I have a list of partitions, each one is associated with a load, and I want to assign these partitions to a fixed number of ...
darkjh's user avatar
  • 2,881

15 30 50 per page
1
2 3 4 5
88