817 questions
0
votes
0
answers
76
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 → ...
0
votes
2
answers
157
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 ...
2
votes
1
answer
213
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 ...
1
vote
1
answer
139
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 ...
3
votes
1
answer
217
views
Sicstus CLPFD labeling time discrepancy
I was using Sicstus Prolog to solve Advent of Code 2024 Day 13, and I came across a surprising discrepancy in labeling times between different instances of the same constraint model. I have:
minCost(...
0
votes
1
answer
82
views
Is defining a problem in SMT-LIB language considered a form of constraint programming?
I've been exploring SMT solvers and the SMT-LIB standard, which provides a declarative language for defining problems in terms of logical formulas and constraints. My understanding is that SMT solvers ...
0
votes
1
answer
114
views
Ortools can not evaluate LinearExpr edge case
I encounter a specific edge case in a CP model. All my variables are int based but the objective which is float based.
In a lot of usage of my model, there is no issue doing this. But in one specific ...
0
votes
1
answer
168
views
How can we achieve prioritization of tasks with OR-Tools?
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 ...
1
vote
0
answers
53
views
How to identify and print which constraints are violated in OptaPy?
I'm working on a scheduling optimization project using OptaPy, where I've defined several hard and soft constraints like room conflicts, teacher conflicts, student group conflicts, etc. The problem ...
1
vote
1
answer
58
views
CP Optimizer: Subtracting time-dependent value from cumul Function with minValue 0
in a CP model (simplified version of Laborie et al. 2018) I have a cumulFunction rUsage indicating the material demand along time, derived by the demand rate dmdR of a present interval variable:
dvar ...
0
votes
1
answer
58
views
CP Optimizer: Provide Initial Value for State Function
in my CP model I have a state function
stateFunction f(a in aRange) with TransitionTimes[a]
By default, the value of f[a] equals -1 until time 0, e.g.
id,value
1,stepwise{ -1 -> 0; 1 -> 3; -1 -&...
0
votes
0
answers
108
views
or tools flexible job shop intervals with multiple machines and per machine availability per job
I have been looking at OR-tools flexible job shop examples, specifically around machine jobs with per job durations. I see examples for this base problem problems but not for a way to specify specific ...
0
votes
1
answer
300
views
When does the CP-SAT Solver use CP-Solving and when SAT-Solving?
I have succesfully used the Google OR Tools to solve a complex matching problem.
However I want to know how the solver really works. Are there any public essays or books which explain the CP-SAT ...
1
vote
1
answer
338
views
OR-Tools CP-SAT Job Shop Scheduling - grouping tasks from different jobs
I am trying to build a schedule using Google OR-TOOLS CP-SAT. I found a problem, because there is requirement, that some of the tasks from different jobs should be scheduled one after another, if they ...
1
vote
1
answer
1k
views
OR-Tools library, CP-SAT Solver. With a large number of workers (num_search_workers), model calculation does not stop after calling stop_search
I'm solving a standard job shop scheduling problem. The launch occurs through an airflow in docker container.
Here are the machine parameters:
CPU: Intel Xeon Gold 6230
RAM: more than 300 GB
When ...
1
vote
1
answer
78
views
python-constraint not solving the n-queens puzzle
I'm using the python-constraint library to try to solve the n-queens problem
(n queens are placed on an n-by-n board and they must be arranged in such a way that they don't menace each other)
My ...
1
vote
1
answer
931
views
OR-TOOLS Job Shop Scheduling - splitting longer tasks and keeping them together between shifts
Using OR-TOOLS CP-SAT I found a problem with intruding tasks between other tasks. In my model there are machines working on 1,2,3 shifts and not working on weekends.
#intervals for non-working time ...
1
vote
1
answer
37
views
How to catch `solve` failure in Picat?
I have a predicate that contains a solve call. It throws *** error(failed,main/0) when it has no solution. Is it possible to catch this error? Reading through the example file exs.pi I thought the ...
0
votes
1
answer
100
views
Is it possible for "alwaysIn" (state functions) select from set of values?
State functions looks like the best option for modeling my situation.
The image as it is now
Now interval variable X might be in range of state functin from 'vmin' to 'vmax'.
But in my situation any ...
0
votes
2
answers
99
views
System solution in [0,1]
I have a system of equation like bellow:
"L3 + L4 + S5 + S12 + L1 + D4 + L8 + S3 + L7 + D8 + D5 + L5 == 1",
"L4 + D9 + S5 + L1 + D16 + L8 + L6 + S8 + L7 + D8 == 1",
"L4 + L1 + ...
0
votes
0
answers
103
views
python-constraint - schedule maker program does not follow constraints when sum is 0 or 2?
I am trying to create a program that create a schedule automatically based on 6 stores needs and 34 employee's availabilities. I am using python-constraint model to model the problem.
I wrote 2 ...
0
votes
1
answer
77
views
Error with DOCplex CP objective function expression
I am trying to replicate a CPLEX ILOG objective function in DOcplex but keep running into some errors. I am not too sure on how the type_of_next function() works with indexing, making it difficult for ...
0
votes
1
answer
73
views
How to integrate OptaPlanner
I'm working on a node.js project for a timetable platform where professors can input preferences. Need help a tool (ex. integrating optaplanner ) to solve complex constraint programming issues ...
0
votes
1
answer
180
views
MIP (mixed integer problem) Build Constraint with OR
I have an MIP where I want to assign at least two variables (binary) from the same location.
How to implement the or in this case. I want something like this:
x1 + x2 + x3 + x4 >= 2 or
x5 + x6 + x7 ...
0
votes
1
answer
174
views
Performance Issue with CPMpy's Cumulative Constraint
I'm facing a performance issue using cpmpy's cumulative constraint with the ortools solver. Despite a reasonable number of tasks, performance degrades unexpectedly. Is this a bug, or is there a better ...