Questions tagged [constraint-programming]

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

174 questions
Filter by
Sorted by
Tagged with
57 views

Constrained optimization with heuristic algorithm in actual production

In a real production problem, if you decide to use a heuristic algorithm (such as GA), what are the mainstream methods to deal with constraints in constraint optimization? I mean, I knew that there ...
63 views

choose constraint from IIS to build penalty function

Suppose I have a single objective optimization model whose constraints are all composed of linear equations and linear inequalities, and now that it is proven to be infeasible in a calculation using ...
817 views

How to avoid similar solutions?

I have a problem like this $x_1 +x_2 +x_3 =10$ let's assume $0 \leq x_i \leq 10$ It is obvious that this problem has more than one solution For example : Solution 1 : $x_1 =0 , x_2= 1 , x_3 =9$ ...
• 1,378
131 views

Priority based demand fulfilment in Linear Constraint

Say I have 3 sources. D1, D2, D3. their capacity is 100, 200, 400. I want to create some constraints such that First D1 is depleted then D2 and then D3. But the catch is you cant use min or max ...
1 vote
57 views

DOCPLEX Job Shop Scheduling In With Downtime

I am scheduling tasks (audits) to machines (auditors) with machine skills and planned downtime as considerations. I am using the docplex package in Python and ...
107 views

How do I convert Integer Programming to Constraint programming?

/********************************************* OPL 12.10.0.0 Model Author: Shahrukh Creation Date: 10-Apr-2024 at 11:55:50 PM The podrace tournament involves n competitors (where n is even) who all ...
61 views

Solving a multi depot multi vehicle capacitated routing problem using global constraints

I have built the model, but at this point, I am not sure how do I ensure that each fighter starts from the assigned depot and comes back to that depot. here is my code. The ...
104 views

Need Help for building two constraints in MIP model

Really need help for building two constraints with MIP model, I have written the required information and variable information on the diagram below. The way I think of it now is to use two ...
1 vote
122 views

Constraint Programming Interview

I'm new in CP. Want to start preparing for my upcoming interviews. What are the questions and topics should I study in CP to get my myself confident?
48 views

Circular queue modeling

Let $P$ be a set of discretely interruptible processes/tasks; $T_i \in \mathbb{N}$ be the running time of process $i \in P$; And $\tau \in \mathbb{N}$ be the maximum amount of time a process can use ...
109 views

Differentiability of solution of optimization problem with respect to constraint (properties, conditions etc)

Assume you have the following simple constrained optimization problem: $$$$\begin{split} &\min_x f(x) \\ & s.t \quad g(x) = c \end{split}$$$$ where $f,g$ are both ...
• 23
1 vote
55 views

Tents and trees constraints

I am trying to express the constraints for the 'Tents and trees' puzzle in minizinc but I am a bit stuck... I can express that each tent must be attached to at least one tree That a tree must be ...
1 vote
64 views

Problems for which constraint programming is the state-of-the-art approach

What are examples of problems for which the state-of-the-art approach is constraint programming? Considering either heuristic or exact approaches. I'm looking for specific problems, not just a class ...
• 2,623
219 views

How to combine MIP solver with a CP one?

I am working on the scheduling problem in the class of parallel resource scheduling models. When I have studied some papers regarding that, I see the method that combines an MIP with a CP. The ...
• 8,960
1 vote
186 views

Job Scheduling with Energy Consumption using Linear Programming

I'm looking for some advice for an optimization problem regarding scheduling jobs in a datacenter. So I have a list of jobs and each job has a required time for finishing and a number of cores it has ...
63 views

• 119
819 views

Doubles Round Robin Sorting Algorithm

Background: I have a group of 6 guys that get together and play pickleball every week. We play 2v2 and 2 players sit each game. We play 2 sets of 6 games each week (12 total games) - in each set, ...
1 vote
211 views

Does the cvxpy replace the max function by MIP formulation under the hood?

Does the cvxpy replace the max function, which is convex, by MIP formulation under the hood when shows up in the constraints (for example, $\max(x,y)\le z$) or in the objective function? In gurobipy, ...
506 views

If/then constraint formulation

Let's assume we have event $i=1,2,\cdots,k$, denoted as $\text{event}_i$. We know for a fact that $\text{event}_i$ is smaller then $\text{event}_{i+1}$ i.e., $\text{event}_i \leq \text{event}_{i+1}$. ...