# Questions tagged [constraint-programming]

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

70 questions
Filter by
Sorted by
Tagged with
66 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 ...
125 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? ...
86 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 ...
255 views

73 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 ...
203 views

### Constraint programming resources

I am looking for resources to learn constraint programming. I will divide the resources I am looking for in three types: Modeling Is there resources (books, articles, courses, etc.) that are ...
126 views

### Mixed integer programming vs Constraint programming

I see that certain studies are comparing MIP and constraint programming (CP) performances. And generally, they claim that CP outperforms MIP. But I believe that it is not completely true. Because ...
67 views

343 views

### Cumulative Constraint OR-Tools

I'm trying to solve an rcpsp model. I can't find documentation for the AddCumulative function of OR-Tools. How should this function be used? I want to write this ...
151 views

### Precedence Constraint in OR-Tools

I'm trying to write this constraint in C++ and add it to my model (addLessOrEqual): $$\text{start}_{i}+\text{duration}_{i}\le\text{start}_{j}$$ for an $(i,j)$ arc ...
92 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$ ...
316 views

I'm trying to solve an RCPSPDc model (maximizing the net present value instead of a makespan). The objective function is: $\sum\limits_{j \in \text{Tasks}} e^{-\theta\cdot s_{j}}\cdot p_{j}$, where $... 0answers 60 views ### Which Constraint solver is extensible to CSP algorithms? I am novice to constraint programming and I need to implement the following algorithms. Backtacking Conflict-based backjumping AC partial lookahead MAC Forward checking Forward checking + dom ... 1answer 148 views ### RCPSP minizinc model I'm working on a resource‐constrained project scheduling problem (RCPSP) in Minizinc but I have problems with the running times when the dataset is big (like 400 jobs, 2 resources, 1,000 precedences, ... 3answers 431 views ### Interval variables in MIP In Constraint Programming it is possible to use interval variables to represent intervals of time during which something happens (see here), usable in scheduling problems, for example. Is there ... 3answers 470 views ### Constraint programming using solver: how to state the time limit of search? Could someone give additional explanations about the TimeLimit of CPLEX for CPO? I am using CPLEX to solve a problem of assignment and scheduling in which each task needs to be assigned to a worker, ... 1answer 408 views ### Constraint Programming OR-Tools finding Matrix Combinations As a similar post of mine Find all Combinations of a Matrix I am trying to find matrix combinations with entries$>0$meaning for a matrix \begin{bmatrix} 0 & 1 & 3 \\ 5 & 2 & 1 \\ ... 1answer 122 views ### Precedence constraints using binary variables - DOCPLEX I would like to establish a precedence constraint to ensure the precedence relation of tasks. I have a set of tasks available, but required tasks are not always the same. It means, the tasks executed ... 1answer 386 views ### TSP problem: traveller does not visit all nodes - Google OR-tools Context: I am dealing with a kind of scheduling problem, in which I have a set of tasks and machines. All tasks must be assigned to machines (not necessary all of them). In addition to that, I must ... 1answer 173 views ### Minizinc: How to use a predicate in an assert statement? Trying to use minizinc builtins to do some basic validation of data inputs but I get a type error ... 0answers 36 views ### How to handle constraints in docplex to states the relation between two variables? I am using docplex.cp and I need to state the following constraint: $$\sum_{c}(X_p{_w}_{cj}+X_{p+1}{_{w'}}_{cj+1})\leqslant T_w{_{w'}}_{,jj+1} + 1$$ Knowing that the binary variables are:$X_p{_w}...
How do I turn my convex constraints (described below) into constraints that are DCP so that I can solve them in CVXPy? Is there some cheat sheet'' of standard tricks? I'm trying to implement the ...