Questions tagged [modeling]

For questions related to the process of converting a real-world problem into a mathematical model. Can include questions related to linearization, logical constraints, tightness of formulations, and so on.

Filter by
Sorted by
Tagged with
2
votes
2answers
188 views

Piece-wise linear approximation of a constraint

We have a decision variable $0<y<1$ and the following constraint $$z=\frac{y^2-y+1}{y(1-y)},\tag{1}$$ We also have another constraint $$y=f(x),\tag{2}$$ where $f(x)$ is a linear function of $x$. ...
-3
votes
1answer
90 views

Modelling constraint

I have the following problem statement: A company is considering to hire more operators. Starting with four machine operators in May, the company wants to investigate if it pays off to hire more. Each ...
2
votes
1answer
43 views

Master Problem Infeasible after Iterations of Unbounded Sub Problem (Generic Benders Decomposition in non Stochastic MILP)

I am dealing with a large problem of MILP problem and interested to apply Benders Decomposition. I have already check the original problem and it was feasible to run in large number of computation ...
1
vote
1answer
87 views

How to introduce an optional decision variable

I try to model a decision process in which I first need to decide about a binary variable $x$. In case $x=1$, I also need to decide upon variable $y$ and the value of $y$ is not defined otherwise. ...
11
votes
5answers
1k views

Dividing machines into groups of equal sizes so that each group has approximately same productivity

I have set of machines with varying productivity. I want put the machines in different groups so that the groups have approximately equal productivity. Lets say, we have $M$ machines. and we want to ...
1
vote
1answer
93 views

Formulating a coefficient from a table

We have a table of data as follows $$\begin{array}{c|c|c|c|c} & b \leqslant a & a < b \leqslant 2a & 2a < b \leqslant 3a & 3a < b \leqslant 4a \\ \hline i=1 & e & 2d ...
8
votes
1answer
263 views

Modelling stronger binary expression

$\delta_1, \delta_2, ..., \delta_k, W$ are binary variables and the constraint $δ_1 + δ_2 + \ldots + δ_k ≤ W$ holds. Is it better to write $$\delta_1 + \delta_2 + \ldots +\delta_k \leq W$$ or \begin{...
3
votes
1answer
114 views

If-then condition formulation to avoid variable multiplication

I'm trying to formulate the following logic: If $y_i =1$, then $c_i \leq x_i$ If $y_i =0$, then $c_i \leq 0$ Where $y_i$, $c_i$, and $x_i$ are decision variables. The easy way would be to write: $$c_i ...
1
vote
3answers
186 views

optimize days between work shift

For a work shift optimization problem, I've defined a binary variable in PuLP as follows: pulp.LpVariable.dicts('VAR', (range(D), range(N)), 0, 1, 'Binary') where ...
6
votes
0answers
178 views

Airline revenue management re-solving problem

I am considering a bid prices (shadow price of the capacity constraint) problem (from Chen, L. and Homem-de Mello, T. (2009)., page 14) where the acceptable classes for booking requests for ...
6
votes
3answers
1k views

Solving Logic puzzles through optimization

I have the following "logic puzzle" (I think this is considered as a "scheduling problem"): In this problem, there are 5 basketball players - provided some clues about their ...
2
votes
0answers
29 views

How to construct a restriction for a blending problem that has 2 inputs that are blended, and as result we get 2 outputs?

THE PROBLEM A refinery has 10 million barrels of type A crude and 6 million barrels of Type B crude oil. The refinery has 3 plants to produce Gasoline (it makes a profit of 2 USD / barrel) and Naphtha ...
3
votes
0answers
75 views

What is the general name (e.g. facility location problem) for this problem (if any)?

I would like to know if there is a general name for the following problem: We will open several facilities. Each facility has an associated facility type. There exists a given number of facility ...
3
votes
0answers
118 views

Good book to get familiar with the key concepts of Operations Research for a person which didn't enjoy a good math education in university?

I am currently reading research papers on optimization problems in logistics and struggle to understand the math notation. Any good beginner friendly books you would recommend? This is the paper I ...
4
votes
1answer
150 views

How to construct the linear programing representation of a blending problem?

THE PROBLEM A refinery has 10 million barrels of type A crude and 6 million barrels of Type B crude oil. The refinery has 3 plants to produce gasoline (it produces a profit of 2 USD / barrel) and ...
0
votes
1answer
65 views

Conclusion from many-to-many relationship

Raw data as below: on the left, there are teams of musicians. On the right, there are the features of the music the team composed, for style, duration and musical instrument. ...
3
votes
1answer
218 views

What does nonconvex multilinear mean?

I am not a math student so I am sometimes a bit confused when it comes to math lingo. For me non-convex would mean its concave which means functions have local minima in case of a minimization problem....
6
votes
2answers
192 views

Multi-commodity Network Flow: Convert a node-arc solution to an arc-path solution

For a logistics optimization problem I am working on, the most natural expression of the problem is using a node-arc formulation of the MCNF. It is solved using an LP/MIP solver like CPLEX/Gurobi. ...
5
votes
1answer
133 views

How to construct my mixed integer programming problem with constraint of minimum consecutive ones

My target is to formulate a binary sequence with fixed size $N$ = 10, such as $[1, 0, 0, 0 ,1, 1, 0, 1, 0, 0]$. However, I want to constrain this sequence so that when 1 appears, it has to appear at ...
3
votes
3answers
225 views

Scheduling for the shortest days using ILP

I've tried Or-Tools and MILP solvers a couple of different ways on this, but they take a surprisingly long time to realize that the solution they generated fairly quickly is in fact minimal. Is there ...
7
votes
0answers
92 views

Network design problem with rounded capacity constraints

I have a network design problem with complicating capacity constraints which I'm trying to model through a Mixed Integer Programming formulation. The problem is defined on a directed, incomplete graph ...
6
votes
1answer
331 views

Optimize for bonuses within a group (knapsack)

I am trying to create an LP problem which is like the knapsack problem but with groups of items. Let's say there are 10 groups of items each with up to 5 items. Each group has one special item and you ...
2
votes
1answer
46 views

How to model a cumulative resource constraint with same family condition?

Assume that we have 3 tasks to schedule : $x_{a1}, x_{a2}, x_{b3}$. They all use the same cumulative resource : $r_1$. Each activity increases $r_1$ by $1$ at it starts time and decreases $r_1$ by $1$ ...
3
votes
1answer
104 views

Conditional constraint with a strict inequality

It's almost this question: Formulating the conditional constraint But there they have non-strict inequality. I have $x_i$ a boolean decision var and $Q_i$ as a nonnegative integer decision variable ...
5
votes
1answer
306 views

How to optimize on a fixed-cost based on number of results?

I am trying to create an LP problem which is like the knapsack problem but where there is a fixed bonus/penalty based on the number of items chosen. There are 20 items to choose from with some weight ...
2
votes
1answer
171 views

How to linearize the product of two integer variables?

Given two integer variables $L_x \leq x \leq U_x$ and $L_y \leq y \leq U_y$, how can we linearize the product $x \cdot y$?
0
votes
0answers
58 views

Different ways to model node switching (Flow on/off) in network flow problem

I would like to model a network flow problem in which there are some pipelines and valves. I would like to model valves in the problem. The valves let flow run or stop just like the on/off switch. One ...
4
votes
0answers
65 views

Modeling question on continuous variable that dependens on binary variables

Given a model with a binary variable $b_s$ that describes whether taking an item $s$ from a set $S$ or not. Consider that some other constraint in the model depends upon whether all items of the set ...
4
votes
2answers
98 views

Deriving order/rank variable from another decision variable

There is a decision variable $x_i$ which denotes the time when a person is allowed to do his work. The objective function is $\min (x_i - a_i)$ where $a_i$ is the time when the person arrives at the ...
2
votes
1answer
238 views

How to professionally write a constraint, where some variables take certain values of index and some variables should not take some values of index

I am using Pyomo's concrete model to model a MILP mathematical model, coming from multiproduct pipeline scheduling. Some of our continuous variables are: ...
3
votes
3answers
115 views

How to find the point on the exterior of a given set of points?

Suppose we do have a set of points (all on a plane ). How to find the smallest hull containing all these points ? How to find the points (among these given points) that are at the exterior layers of ...
6
votes
1answer
528 views

How can I solve a linear optimization problem with bounds that are a function of the decision

I am using the rDEA package's linear optimization function multi_glpk_solve_LP(which is built on top of the ...
2
votes
1answer
27 views

Given a 3 step process in which all processes require setup, how does the batch size affect the bottleneck?

I came across this textbook problem today, in which we are given three steps as below The question asks, "for what batch size is step 3 (etching) the bottleneck?" Now, I am aware that you ...
3
votes
2answers
126 views

Assistance in formulating binary constraint(s)

I would like to seek some advice on modeling the following logical condition: Given two groups of binary decision variables $A_{i}, i=1...n,$ and $B_{j}, j=1...m$. $A_{i}=1- B_{j}, \forall i, \forall ...
7
votes
3answers
221 views

How to model a non-overlap constraint between 2 groups of tasks?

Let $T$ be a set of tasks. Each task $t \in T$ has a duration $d_t$. Let $T_1 \subset T$ and $T_2 \subset T$ such as $T_1 \cap T_2 = \emptyset $ How can I model the following constraint : all tasks ...
5
votes
1answer
515 views

Boolean constraining another boolean

like the title suggest, I am trying to constraint a boolean with another boolean, if that makes sense. x and y are both booleans, where y=1 when ...
6
votes
3answers
1k views

Traveling Salesman Problem: How to avoid symmetry?

I solved a Traveling Salesman Problem (TSP) by the cutting plane method, i.e. adding violated sub-tour constraints until the LP relaxation is a tour. Now, I am realizing that, in this symmetric TSP, ...
7
votes
1answer
169 views

How to enforce a relation between two variables

I am having trouble formulating the following constraint: I am looking to formulate a constraint that if a facility was opened at some point in time, then $Y[j,t]$ does always have to be $1$ from that ...
7
votes
1answer
263 views

Using the values of variable in the objective function before optimizing

I am facing a problem to multiply a term in objective function. My objective function is : \begin{equation} \min \sum_{t=1}^\top p_{t} \cdot (1+r) \cdot y_{t} \end{equation} where $p$ is the ...
5
votes
2answers
203 views

In a MIP, how to force a decision variable to be zero unless the sum of specific other decision variables is equal to a certain number?

In an MIP, how can I formulate a constraint such that a decision variable is only greater (or equal to) zero if (and only if) the sum of different decision variables is equal to something. I'm working ...
4
votes
2answers
141 views

How to model: If $X\ge\epsilon$ then $X\ge Y$

Let $0\le X\le\bar X$ and $0\le Y\le\bar Y$ be nonnegative continuous variables. Let $\epsilon$ be a small positive number. How can the constraint $X\ge\epsilon\implies X\ge Y$ be modeled?
7
votes
3answers
254 views

How to formulate the constraint If $x = k$, then $y = c$?

Given are two integer variables $L_x \leq x \leq U_x$ and $L_y \leq y \leq U_y$. I'd like to formulate the constraint $$ \text{If} \;\; x = k, \;\; \text{ then } \;\; y = c, $$ where $k$ and $c$ are ...
4
votes
1answer
92 views

Lot-sizing problem variant

I have a the following optimization problem: I have mandates,(e,g. to deliver 100 tonnes of products) that I need to schedule its delivery during the month (day 2: deliver 40 Tonnes, day 15: deliver ...
2
votes
1answer
138 views

How to code this with Cplex?

I have an optimization problem as below. For $g\in G$, let $\mathcal{N}_g$ be the nodes in group $g$, and let binary variable $u_g$ indicate whether group $g$ is used. The problem has this following ...
2
votes
1answer
128 views

Tuning the coefficients of an objective function of LP

I want to solve a problem that results in this general objective function which I want to maximize: $$a\cdot x_1+b\cdot x_2-c\cdot x_3-d\cdot x_4+e\cdot x_5$$ When I write out in full this objective ...
5
votes
1answer
92 views

Use of comparisons in objective function of an ILP

If the objective function of a problem contains a comparison between two linear statements, can the problem still be defined as an Integer Linear Program? For example: $$\text{max} \sum_{\forall i,j} ...
8
votes
2answers
276 views

VRP through constraint programming

I am with a problem that consists of determining whether a VRP instance is feasible, this question is a continuation of an older thread. In order to do it, I was thinking of using Constraint ...
0
votes
0answers
76 views

Products distribution planning model

I have a problem of planning the distribution of products for a month. I have different unique products. A Mandate is provided for each product, and the Mandated quantity for each product is to be ...
3
votes
0answers
113 views

How to approach this Truck Utilisation problem?

The problem statement currently I have is very broad (or you can say very vague at the same time): I have a number of dropping locations (Customer locations) I have the location of the HUB I have a ...
3
votes
1answer
61 views

Nurse Rostering Code with custom constraints Not Working

Could someone please check this code. I modified constraints as : No. of nurses - 10 Max No. of nurses in Morning/Afternoon/Evening Shifts - 3/4/2 Max no. of shifts in a week per nurse - 5 ...

1
2 3 4 5
7