# Questions tagged [constraint]

For questions related to constraints, i.e. any restriction or relation a set of decision variables has to satisfy.

248 questions
Filter by
Sorted by
Tagged with
3 views

### MIP formulation for a lower semi-continuous function

How can I formulate in mixed linear programming (a set of constraints) the following issue. I have a maximization function on x, g(x). I need to convert a ...
45 views

### Sum only over weekend days

I would like to adjust my constraint so that the x are only ever added for the weekend of a week, i.e. days 6,7 and then 13,14 and 20,21 etc.. That would be my previous formulation, but how can I ...
62 views

1 vote
303 views

### Discrete point inside a polygon formed by set of vertices

I am working on a problem where I have a set of 2D vertices and a test point. I want to chek whether the test point lies inside ...
1 vote
221 views

### How to properly tackle a big model using weak constraints

I'm currently working on a model that has a large number of variables (around 200k), and I don't know what the proper way to handle such a big problem is. One suggestion I got is to use lazy ...
129 views

### Which solvers provide an IIS feature?

I am well aware that commercial solvers CPLEX and GUROBI provide an IIS (irreducible infeasible set) feature. @batwing mentions FICO Xpress in the comment section as well, and @RobPratt mentions SAS. ...
1 vote
74 views

### How to calculate the duration of a task in each shift?

I am solving a job scheduling problem with three shifts, the duration of all shifts are assumed to be known (and might be equal): The tasks can start from any shift We know the duration of each task ...
35 views

### Scheduling next shift such its not within X hours of previous shift

Hey i have this constraint that i am trying to code in python: "scheduling next shift such its not within X hours of previous shift" Given that i have start, end time of each shift and the ...
108 views

### How to select intermediate nodes in a network?

I have a network where nodes are connected as shown in the Figure . Nodes 2 and 4 have a connection to the cloud node. I am writing constraints where at least one node with a connection to the cloud ...
1 vote
149 views

65 views

### Literature for the Big-M constraint method

I've come across the possibility of introducing binary variables in linear programming with the Big-M method here several times now. Here is an example: \begin{align} &(1-x_{i})\le \sum_i y_i\\ &...
181 views

### LP - How to model binary variable that indicates a switch

I have the following question / concern. I have a modeling problem with the decision variable $d_{ptm}$ which indicates whether product $p$ was serviced by machine $m$ in period $t$. It takes the ...
59 views

I have a constraint of the following form \begin{equation} x^{\top}x + y^{\top}y \leq t \end{equation} where x, y are vector variables and t is a scalar variable. I can augment the variables x and y, ...
1 vote
40 views

### How to sum over periods till Period t?

I am trying to set up a constraint that does the following. I a binary variable $p_{it}$ that indicates whether a student $i$ passed the test in $t$. 1 if yes and 0 if no. Now I want to set up a ...
52 views

### Help finding linear constraint - LP

I have the following question. I have two variables $w_{nds}$ and $m_{nd}$. The first variable indicates whether a nurse $n$ works shift $s$ on day $d$. The second one indicates the motivation of ...
1 vote
112 views

371 views

### How to model this binary constraint?

I have an optimization problem that has a variable in the matrix form. The variable is a binary matrix. It has size $M \times N = 10 \times 50$ where $M$ is the number of machines and $N$ is the ...
373 views

1 vote
76 views

### Multiplicity-Constraint in Constraint Programming Solvers

I need to solve a CSP with a constraint imposing upper bounds on the multiplicity of variables in a list. More precisely, I need a constraint of the form ...
96 views

### Meaning difference between SUMMATION and not in the MIP model

I'm asking you a question because I was confused about MIP while reading the paper. This paper is about dual crane optimization. In the MIP model of the paper, equations (7) and (8) are used to model ...
143 views

### Efficient formulation of flexible job-shop scheduling constraints

I am working on a flexible job-shop scheduling problem, where indices are as follows: $i$: Index of operations $j$: Index of jobs $m$: Index of machines $p$: Index of operation sequences on a machine ...
221 views

### how to ensure minimum output of a generator (else zero output) in linear programming?

I want to ensure, that a generator (in my case a heat generator, for example a boiler) first starts to output thermal energy, when a certain minimum output can be realized. Otherwise the output should ...
298 views

### Set null the next set of N values

I'm dealing with a problem I already modelled by using linear programming. The already existing constraints set at 1 groups of contiguous variables (for ex: ...
I am trying to find a suitable paradigm under which my discrete optimisation problem falls into. This looks similar to integer programming, so the goal is to find a binary vector $\bar{x}$. However, ...
Let $g_1(x):=(x_1-1)^2+(x_2-1)^2-2\leq 0, g_2(x):=(x_1-1)^2+(x_2+1)^2-2\leq 0, g_3(x):=-x_1\leq 0$ be given constraints. Show that the Mangasarian-Fromovitz Constraint Qualification (MFCQ) is ...