Skip to main content

Questions tagged [constraint]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
76 views

Combine two constraints into one

I have these two constraints, where the indices are $i$ person, $j$ shift and $t$, the day. $x_{ijt}$ is the shift assignment, $m_{ijt}$ the motivation of the person in a shift (only takes values $m_{...
nflgreaternba's user avatar
1 vote
1 answer
79 views

Schedule monotony constraints

Suppose I have a model for creating a nurse's duty roster. The model has the indices $i$ for the person, $t$ for the day and $s$ for the shift. I have the binary variable $x_{its}$ which indicates ...
manofthousandnames's user avatar
0 votes
0 answers
44 views

Constraint formulation in MILP AGV Scheduling (using CPLEX)

I am currently working on a MILP formulation for optimizing AGV/AMR scheduling. The model aims to optimize task scheduling across multiple missions using a limited set of resources. Parameters such as ...
Rami's user avatar
  • 1
0 votes
1 answer
74 views

Getting rid of Big-M notation

i have the following constraint using the Big-$M$ method and i was wondering if it is possible to formulate these constraints without Big-$M$. These are the constraints in question: $$\sum_{j=1}^{t}z_{...
Karl Seidl's user avatar
3 votes
1 answer
191 views

Reformulate constraints

I have the following constraints and am wondering whether I can formulate the whole thing more narrowly and with fewer constraints. $x_{itk}$ is binary and $u_{it}, v_{itk}\in [0,1]$. $M$ is a Big-M ...
manofthousandnames's user avatar
0 votes
0 answers
30 views

Need help defining constraints regarding start and end time on job shop scheduling AGV

...
Rami's user avatar
  • 1
0 votes
0 answers
102 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 ...
CangWangu's user avatar
0 votes
1 answer
41 views

Distinguishing between soft and hard constraints

I am currently setting up a nurse rostering model. In it, I have several regulatory constraints, such as limits on working days and so on. Apparently these are considered hard constraints. However, I ...
nflgreaternba's user avatar
0 votes
2 answers
86 views

linearizing a constraint involving an absolute function

I would like to know what is the best way to linearize a constraint involving an absolute function. More precisely, imagine I have three binary variables and their relationships is as follows: |x-y| = ...
Sam's user avatar
  • 97
2 votes
1 answer
87 views

Flow conservation constraints for an Open Vehicle Routing Problem

I'm currently reviewing literature on the Open Vehicle Routing Problem (Open VRP), which characterizes scenarios where trucks do not return to the depot after serving the last customer. In this ...
BobHU's user avatar
  • 165
0 votes
1 answer
75 views

Exception from IBM ILOG CPLEX: CPLEX Error 5002: 'q1' is not convex.->

I am currently solving a scheduling optimization problem regarding the fleet management of AGV/AMR. I always get the same error and I don't know where to start to solve it. Here's the code snippet for ...
Rami's user avatar
  • 1
0 votes
0 answers
37 views

Projection of QP problem solved with Gradient Descent

Lets say we have a QP problem as shown below $$\min {\bf x}^T {\bf R}{\bf x}+{\bf c}^T{\bf x}$$ subject to $${\bf A_{eq}x}={\bf e}_{eq}$$ $${\bf Ax}\le {\bf e}$$ $${\bf x}\in \lbrace 0,1\rbrace$$ ${\...
KGM's user avatar
  • 2,297
1 vote
0 answers
17 views

Does Theory of Constraints weigh in on marginal vs conditional bottlenecks?

I have a modelling project using a Kelly network. An observation I have made is that the bottlenecks based on the marginal distributions of service times is not always the same as the bottlenecks ...
Galen's user avatar
  • 141
0 votes
0 answers
19 views

What notion of ordering is the important for identifying bottlenecks in Theory of Constraints?

In many systems the completion of an activity takes an amount of time that is not perfectly predictable. In statistics we would consider these to be random variables. For two measurements of time $t_1$...
Galen's user avatar
  • 141
0 votes
0 answers
29 views

Theory of Contraints Technical Reference

I have dived into Theory of Constraints by reading The Goal, It's Not Luck, Isn't it Obvious, and Critical Chain. I am currently reading Goldratt's Rules of Flow. While I enjoy these short novels, ...
Galen's user avatar
  • 141
1 vote
0 answers
41 views

What reasons would cause lazy constraints to degrade the performances when reoptimizing with a different objective?

We are currently solving a hard MILP problem on optimality. Once it has been solved, several times (from 5 to 10 times), we change one coefficient of the objective function and reoptimize. Thus the ...
JKHA's user avatar
  • 679
0 votes
1 answer
64 views

Scheduling: Connecting the end and the beginning of the planning horizon

I would like to create a rota that repeats every 28 days and adheres to the usual rules. These include the minimum/maximum number of consecutive working days and the break days. I have created a model ...
lukdooxb1's user avatar
2 votes
2 answers
105 views

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

Assume you have the following simple constrained optimization problem: $$ \begin{equation} \begin{split} &\min_x f(x) \\ & s.t \quad g(x) = c \end{split} \end{equation} $$ where $f,g$ are both ...
c zl's user avatar
  • 23
2 votes
1 answer
237 views

How to modify a model to be cyclic?

I have the following question. I have the following physician problem with the indices $I$ (doctor), $T$ (days) and $J$ (shifts). $x_{itj}$ is the decision variable, $d_{tj}$ is the demand and $g$ is ...
manofthousandnames's user avatar
2 votes
2 answers
329 views

How to model weekend constraints in a nurse rostering problem?

I have the following problem. I have a Nurse rostering problem and want to model the following. I have the indices $D$ (days), $I$ (nurse), $S$ (shift). My planning period $D$ is 28 days. Now I want ...
Uni ewr's user avatar
  • 61
3 votes
2 answers
377 views

How to set up a constraint that represents a median?

I'm trying to create an optimization problem where one of my constraints represents a median of another decision variable. Suppose I have decision variables $\bf{y}$ and $z$. My problem will look ...
BSplitter's user avatar
  • 145
1 vote
1 answer
87 views

Problems with Big-M Constraint

I have the following constraints for my roster optimisation problem: \begin{align} &(1-r_{i,t})\le \sum_{j=t-\chi}^{t-1}sc_{i,j}\quad &\forall i\in I, t\in \{1+\chi,\ldots,T\} \end{align} \...
lukdooxb1's user avatar
0 votes
1 answer
120 views

Generalize working days constraints

I have the following constraints. The first ensures that in my shift plan there are always exactly two days off between blocks of working days and only then does the next block begin. It reads as ...
lukdooxb1's user avatar
0 votes
0 answers
48 views

Objective/Cost Function Normalization (MPC)

I am trying to develop an MPC. In this MPC, I predict the temperature and try to bring the sensor value to the desired setpoint temperature. I predict the temperature in the next 180 minutes for the ...
Clankk's user avatar
  • 1
1 vote
2 answers
223 views

Which of these formulations has the tightest linear relaxation?

I have a sequence of binary variables $x_i$ and want to enforce consecutive $1$'s of length at least $3$. I have $2$ formulations: Model $1$ (from here): \begin{align} x_i \le x_{i-1}+x_{i+1} \tag{1}\...
abcd's user avatar
  • 55
-1 votes
1 answer
69 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 an objective function $\underset{x}{\max} g(x)$. I need to convert a continuous linear function $f(x)$...
Di Al's user avatar
  • 11
0 votes
1 answer
79 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 ...
mingabua's user avatar
0 votes
2 answers
76 views

What is the best way to constrain a binary matrix so that at most one row has positive values?

I have a binary variable $x_{i,j}$ for $i\in\{1,\ldots,m\}$ and $j\in\{1,\ldots,n\}$ and the constraint is to have at most one row that has ones. I wrote this as: $$x_{i,j}+x_{i',j'}\leqslant1,\forall ...
Jika's user avatar
  • 101
5 votes
1 answer
98 views

How to identify constraints that are good candidates for being lazy constraints?

I am working on reducing the solving time of the optimization problem I am working on. One of the ideas I am exploring is the usage of Lazy constraints. As solver, I am using Gurobi, so both pre-...
cholo14's user avatar
  • 233
2 votes
1 answer
82 views

Compute time between tasks

I am trying to solve an optimization problem in which there is a set of tasks, $S$, where $s_i$ and $e_i$ are the starting and ending time of task $i \in S$. Each task $i $ must be done within its own ...
Christopher Expósito Izquierdo's user avatar
1 vote
1 answer
122 views

How to linearize the following constraints

Given the following two expressions: $ x - \frac{1}{T}\sum_{i} y_{i}$ $ x - \frac{1}{Q}\sum_{i} \beta_{i} y_{i}$ where $x \in \mathbb{Z}_{+}$, $y \in \mathbb{R}_{+}$, and $T$, $Q$ and $\beta_{i}$ ...
CHE's user avatar
  • 113
0 votes
3 answers
478 views

Starting with HiGHS

I have been messing about with HiGHS and trying to get a hang of its capability. Here is an example of a simple model from their github repo https://github.com/ERGO-Code/HiGHS/blob/master/examples/...
Erin Walter's user avatar
0 votes
1 answer
172 views

Production scheduling

I'm formulating a scheduling problem with the following decision variables: $$X_t \space \text{is power sold to market in time period t} \\ Y_t \space \text{is power used for production in time period ...
fikacoder's user avatar
1 vote
1 answer
385 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 ...
Ken Adams's user avatar
1 vote
2 answers
251 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 ...
Marco's user avatar
  • 11
3 votes
0 answers
202 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. ...
Kuifje's user avatar
  • 13.5k
1 vote
1 answer
82 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 ...
Optimization team's user avatar
0 votes
2 answers
37 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 ...
user12443's user avatar
2 votes
1 answer
135 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 ...
bsha's user avatar
  • 81
1 vote
2 answers
222 views

Linearizing if else conditions in ILP

We are given three binary indicator variables $X_{ij}, Y_{jk}$ and $Z_{jl}$. Write linear constraints such that, a) if $X_{ij}$ is equal to 1, then for that $j$ when $X_{ij} = 1$, exactly one $Y_{jk} =...
ephemeral's user avatar
  • 917
4 votes
2 answers
1k views

Which solvers should I use to solve large, but extremely sparse LP problems with 100-500 thousand variables?

I would like to solve the following type of LP problems: where M and N are very large numbers, they are on the order of a few hundreds of thousands and tens of thousands, respectively. As is clear ...
TobiR's user avatar
  • 143
2 votes
1 answer
77 views

Question About Fritz John Theorem and Slater Constraint Qualification

Background Information I am studying constraint qualifications. Here are two theorems leading to my question: Theorem 1$\space\space\space\space$ [Fritz John Theorem] Suppose that $f, g_1, \dots, g_k$...
Beerus's user avatar
  • 123
1 vote
1 answer
58 views

Is there any literature on constrained nonlinear optimization where constraint returns have to be queried from an oracle?

I am looking at literature considering constrained optimization problems of the form: $\min_{x\in X\subseteq R^n} f(x), \text{ subject to } g_{oracle}(x) \leq 0$ The optimization algorithm doesn't ...
Shourya Bose's user avatar
2 votes
1 answer
213 views

Compute overlapping time

I am trying to solve an optimization problem in which there is a set of tasks, $S$, where $s_i$ and $e_i$ are the starting and ending time of task $i \in S$. Each task $i $ must be done within its ...
Christopher Expósito Izquierdo's user avatar
2 votes
1 answer
155 views

SET game: how to generate all sets with a MIP?

I am playing around with the game called Set: In the game, certain combinations of three cards are said to make up a "set". For each one of the four categories of features — color, number, ...
SetPlayer's user avatar
1 vote
0 answers
26 views

Nesterov Acceleration in Proximal Iteration with Strictly Positive Variable?

I have a cost function of the form $f(x) - \log(x)$, where $f$ is some smooth function mapping $\mathbb{R}^n_+\to\mathbb{R}$and $x$ is restricted to be nonnegative by the problem constraints (and for ...
John Madden's user avatar
1 vote
1 answer
137 views

Constraints to avoid disjointed solutions in a MIP

Given an directed graph $G= (N,E)$, where $N$ is the set of nodes and $E$ is the set of all edges, each associated with a direction. $G$ is a connected graph but not necessarily a complete graph. A ...
CHE's user avatar
  • 113
1 vote
3 answers
235 views

MIP constraints with chronological ordering

I am using a MIP formulation to decide which dates and locations (i.e. stops) should be chosen for a route that maximizes the total revenue over all chosen stops. My decision variable $X$ is the ...
3Li's user avatar
  • 35
7 votes
1 answer
640 views

How can one model a binary variable?

I am looking for the formulation of a constraint that does the following. I want to introduce a new binary variable $\kappa_{it}$ that takes the value 1 if the sum of the other binary variable $\...
nflgreaternba's user avatar
-1 votes
1 answer
83 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\\ &...
marvelfab12's user avatar

1
2 3 4 5 6