Questions tagged [constraint-programming]

For questions on modeling satisfaction or optimization problems in languages designed for expressing (often high-level) constraints on decision variables.

Filter by
Sorted by
Tagged with
4
votes
1answer
253 views

Machine Allocation & optimal Utilization using python

Problem statement: Meet the demand which can be met across 2 facilities each having multiple machines where several components are made. The objective is to find the optimal solution to meet the ...
3
votes
2answers
664 views

What are the solvers that give a feasible solution within a given time?

What are the solvers that take the maximal computation time as a parameter and gives the best found feasible solution within this time.
3
votes
1answer
112 views
3
votes
2answers
133 views

Could DOcplex.CP recognize that it solves the graph coloring minimization problem?

I created a graph coloring DOcplex.CP model inspired by this example. However, I do not know the number of colors in advance. The goal is to minimize the number of colors (i.e., get as close as ...
3
votes
2answers
130 views

Limit number of switches in employee scheduling problem

Here is a scheduling problem I need to solve. Given the demand for 2 positions in 1 week with 3 shifts per position, I need to allocate the employees accordingly with some extra operational ...
3
votes
1answer
78 views

Integer decision variables as index

The following problem has only two integer variables; however, they appear in the index of the parameters. Appreciate it if anyone has any efficient idea to transform it into a canonical integer ...
3
votes
1answer
117 views

On what kind of problems a local search may perform better than MIP / CP techniques? [closed]

In combinatorial optimization, on what type of problem a local search may lead to better & quicker solutions than usual mixed-integer programming and constraint programming techniques ? By type ...
3
votes
0answers
43 views

Algorithm for Trainyard Marshall optimization problem

The problem I am trying to solve is the 2014 RAS problem. The link is the following The problem Trains come to the humpyard where each compartment of a train gets humped or disassembled and then each ...
3
votes
0answers
99 views

Power of variable or tools

I'm working with OR Tools in Python and I need to define the objective function an expression of the variables. In particular, the objective function is $$\frac{c_j}{1.7^{s_j}}$$ with $c_j$ ...
2
votes
3answers
266 views

How to model two variables to NOT to belong to the same set partition using Constraint Programming

Assume we have two variables $x,y \in S$ where $S=\{1,2, \dots, 1000\}$. Also, we are given a partition of set $S$ as: $S_1 = \{1,2, \dots, 249\}$ $,S_2 = \{250, \dots, 499\}$ $,S_3 = \{500, \dots, ...
2
votes
1answer
80 views

Looking for a similar optimization problem

I want to know if there is any already defined problem that could give me a hint on how should I approach the following task. There are N tasks that should be accomplished, each task requires ...
2
votes
1answer
83 views

constraint programming and scheduling issues

I have a constraint problem that i need to resolve, but i did not how know to model the problem: I have 11 employees, i will name them from a to k {a,b,c,d,e,f,g,h,i,j,k}. I have a small company that ...
2
votes
1answer
228 views

How to know which constraint in CP-SAT did not meet the feasibility gap

Is there any systematic way to retrieve some information on the constraint that caused infeasibility in Or.Tools CP-SAT? ...
2
votes
1answer
92 views

How to model a set of integer variables getting assigned different values than another set of integer variables

Assume we have variables $x_1, x_2, x_3, x_4$ that each can belong to $\{1,2,...,10\}$. How can we model a constraint that variables $x_1, x_2$ get assigned different values than $x_3, x_4$? Because ...
2
votes
1answer
71 views

Python, Google OR-Tools, OnlyEnforceIf() method

I am trying to solve a basic puzzle by using Google OR-Tools, this is my first try with OR-Tools and I am trying to learn. I completed almost everything and was ready to conclude the program until I ...
2
votes
0answers
67 views

Finding Optimal Route using different Paths

I have a list of paths e.g. path 1 takes you from point A to B. A person needs to complete 5 of such paths. $$Route1 = path1 + ...
2
votes
0answers
143 views

Operation hours optimization for circular schedule

Here is my problem. A store has X = 15 electical devices with the ability to work non-stop, fully charged, up to 8 hours. Their battery charge lasts 2 hours and the operating hours of the store differ ...
1
vote
3answers
238 views

How can I linearize this IF-THEN constraint?

Let $P_{t,u}; t=1,2,\ldots,T, u=1,2,\ldots,U$ be known values $\alpha$ is also a known parameter $X_{t,u}$ an optimization variable I have the following constraint: IF $P_{t,u}\geq\alpha$, THEN $X_{...
1
vote
1answer
56 views

Derived variables of when a decision variable appears?

I am dealing with a multi-travelling passenger problem. $x_{i,j}$ is a binary variable that allocate a passenger $i$ to a vehicle $j$, every vehicle can carry only $n_{pv}$ passenger where $i \in \{1,...
1
vote
0answers
78 views

Question on quadratically constrained quadratic program

If the constrained optimization problem is a quadratically constrained quadratic program of the form \begin{align}\min&\quad x^HQx-a(x+x^H)+b|z^Hx|^2\\\text{s.t.}&\quad\|x\|^2\le1\end{align} ...
1
vote
0answers
60 views

Fixed cost associated to SlackVar(waiting time cost) [CVRPTW]

I'm modeling a CVRPTW with some features: Each type of vehicle has a cost per km and a fixed cost per trip. To calculate these costs, I am using these methods for this: ...
0
votes
2answers
197 views

How can I formulate this specific if-then constraint?

IF $\sum\limits_d X_{i,d}\ge6$ THEN $Y_i = 1$ (strictly) AND IF $\sum\limits_d X_{i,d}<6$ THEN $Y_i = 0$ (strictly) $X$ and $Y$ are binary variables. What I'm actually trying to do is to charge the ...
-1
votes
1answer
96 views

Any references to the ROADEF 2020 Challenge?

The problem description of the challenge is given here. Does anyone has some references to similar problem. I would like to participate but I don't know where to start.

1
2