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
-1
votes
0answers
31 views

Calculus problem - How to determine the extremes locus and increasing/decreasing region of the plan [closed]

Determine, without solving the equation, the locus of the extremes of the solution of y: $$ y' = ty - 1 $$ In which region of the plan are they increasing, decreasing ?
0
votes
0answers
30 views

Linearizing max constraint Problem [duplicate]

I want to linearize a max constraint as below: In which x_(i,t),are binary decision variables and T is a constant. How can I linearize this constraint?
6
votes
4answers
707 views

Can this be formulated as one inequality

I have two binary variables $x_1$ and $x_2$ and a non-negative continuous variable $y$. In addition, I have the following two parameters $u>q>0$. I would like to formulate the following ...
2
votes
1answer
56 views

distance specific constraint

I have some points with determined coordinates $(a_i,b_i)$. A vehicle can move between these points based on rectangular distance. In more detail, we consider that the path between points is an ...
1
vote
2answers
140 views

Switching of decision variables to be larger than or equal to a decision variable according to an indicator variable value

I would like to seek some advice on modeling the following: I have two integer decisions variables, $x, x'$, that are either equal or greater than zero and either of them is greater than or equal to a ...
7
votes
4answers
391 views

How to reduce the risk of wrong modelling in OR industry projects?

In my experience many OR Industry projects contains at least one person with background in OR (who is not familiar with the technical background) and at least one person from industry with the ...
1
vote
3answers
190 views

How can I linearize this IF-THEN constraint?

Let $P_{t,u}; t=1,2,\ldots,T, u=1,2,\ldots,U$ be known values $\alpha$ is also a known parameter $X_{t,u}$ an optimization variable I have the following constraint: IF $P_{t,u}\geq\alpha$, THEN $X_{...
3
votes
2answers
180 views

Optimal way of connecting N sensor to M devices in polynomial time?

Let's say I have 3 type of sensors: A, B, C. These sensors can be connected to multiple devices at the same time: let's call them dA, dB and dC. Now, device dA can only accept connections of sensor of ...
4
votes
1answer
124 views

Switching of decision variables to be equal to a certain decision variable according to a binary (indicator) variable

I would like to seek some advice on modeling the following: I have two integer decisions variables, $x, x'$, that are either equal or greater than zero and either of them is to be equated to a third ...
1
vote
1answer
46 views

Formulating indicator constraint set

I am having difficulty formulating the indicator constraints for the following: Consider a set of $A_{n}$ decision variables such that $A_{1},A_{2},⋯,A_{n}<A$. While all of them are integers that ...
2
votes
1answer
47 views

Reformulating to locate the second largest decision variable of a set of decision variables

Consider a set of $A_{vn}$ decision variables such that $A_{v1},A_{v2},\cdots,A_{vn}<A$. While this is the standard formulation finding the maximum value of $A_{vn}$, I would also like to find the ...
4
votes
2answers
125 views

Is there efficient way to deal with division by zero?

I am trying to solve an optimization problem in which there is an objective function in the following form: \begin{equation}f(x, y)=x+\left(\frac{1}{y}\right)\end{equation} Where, $x,y$ are positive ...
6
votes
2answers
67 views

Optimizing MIP Parameters For Various Data Sets

I have a MIP that runs for several different data sets. For each data set the MIP runs multiple times, once for each time period in the data set, and each time period is independent. I've experimented ...
6
votes
1answer
139 views

Strong MIP formulations for a large-scale mixed-integer nonlinear feasibility problem

I'm trying to construct a strong MIP formulation for the following integer nonlinear feasibility problem. Informally: We have a $m \times n$ decision matrix of binary variables Each row of the matrix ...
2
votes
0answers
68 views

Analysis model vs. executable implementation of model?

In my post-graduate research and subsequent career in operational analysis, the difference between following seems to have become clearer with the years: (1) a model of a problem or operations in the ...
3
votes
2answers
118 views

Formulating the conditional constraint

I want to develop a model extension of capacitated location problem. The variables are a binary $x_i$ and a continuous $Q_i$. The following condition must be satisfied: if $x_i = 0$, $Q_i$ must be ...
0
votes
0answers
108 views

Resource constrained LP problem

I am working on Diet Allocation problem. Where we need to provide food piece for protein deficiency. The data is as below: ...
3
votes
3answers
81 views

Possibility of indexing decision variables with 2 indices using a set of tuples in Pyomo

I am currently attempting to solve a network problem that is not fully connected.Thus, I have attempted to do some preprocessing of data so as to form a set of tuples, e.g. $\{(a,b), (c,e),\ldots\}$, ...
4
votes
1answer
97 views

Integer Program for Multiplication of Large Numbers

Given two numbers in binary representation $b_1,b_2$ and let $k_1, k_2$ be the number of digits. What would be an integer program that models the multiplication of these two numbers? The restriction ...
3
votes
1answer
91 views

Can Deep RL be used to find optimal division point in an application?

I need to optimise the end-to-end latency for a multi-service application while distributing it on multiple devices. The application is a series of services interconnected to each other. The goal is ...
6
votes
1answer
89 views

Can I replace the objective function $f$ with $g$ if $g \ge f$?

I am working on a project where the customer requested to change the current objective function $f$ to another function $g$ (both linear). It is easy to prove that $f \le g$ and as both are linear ...
4
votes
1answer
203 views

Indicator function in math programming

I have the following doubt: Being $x$ an integer variable that takes the values $1$, $2$ or $3$. Being $y_1$ a binary variable. Being $y_2$ a binary variable. I want to express the two following ...
6
votes
1answer
83 views

CVRP with vehicles blocking each other

I have a standard CVRPTW (capacitated vehicle routing problem with time windows). The instance is given by a (not complete) graph $G$ with weighted $w$ directed edges $e \in E$, and I have a limited ...
2
votes
1answer
134 views

Formulation of assignment problem as Linear Optimization

In the anti-tumor treatment with radiotherapy, it is possible to irradiate the tumoral mass from different positions with different intensities. For each of these possibilities, however, one has to ...
4
votes
1answer
73 views

Formulation of Machine allocation as an optimization problem

A manufacturing company from Eastern Finland will have to decide on the machines to use in order to produce 2800 units of a given item. Each machine has some given characteristics: a setup cost if it ...
11
votes
1answer
1k views

An approximate answer to the right question or an exact answer to the wrong question

There is a quote from John Tukey in one of his papers on data analysis Far better an approximate answer to the right question, which is often vague, than an exact answer to the wrong question, ...
4
votes
1answer
221 views

Creating an Optimisation Problem to Optimise Water Flow

A water tank needs to be refilled with an electric pump when the water level gets below a certain level. The pump can operate at variable flow rates. Further, there is a time-variant electric billing ...
4
votes
0answers
88 views

Can this problem be modelled with a transformation from a known TSP with profits?

The profitable tour problem (PTP) is defined on a graph $G=(V,E)$ with $|V|=n$, where each vertex $i \in V$ has an associated prize $m_i \geq 0$ and each edge $e \in E$ has an associated cost $c_e \...
6
votes
2answers
156 views

What is the definition for an integer-friendly constraint?

I have seen some papers claiming that their proposed model is integer-friendly. I would like to get more information about what type of constraints we can call integer-friendly. Probably, it can be ...
2
votes
1answer
80 views

shortest path problem,I want to write constraints in closed form

the constraints in the photo ,I need to translate to the closed-form I don't know how can I do this. Can you help? I need to write the mod file and dat file in Cplex for this problem
8
votes
1answer
57 views

Covering problem on a network (?)

I have this problem described in natural language, and I was wondering whether it is relatable to any known problem. I have a directed acyclic graph. Each node can host a "probe". If node $i$ hosts ...
3
votes
0answers
47 views

What are the efficient ways to model this scheduling problem and ways to improve running time

There are $N - \{1 \ldots N\}$ jobs, each with processing time $p_j$, to be scheduled on $M - \{1 \ldots M\}$ machines over span of $D - \{1 \ldots D\}$ days and while working $T - \{1 \ldots E \ldots ...
3
votes
1answer
86 views

What kind of scheduling problem is this?

I am trying to develop algorithm to solve following basic version of the problem. 1) I would like to know what this problem is called in literature so that I can look it up 2) What are efficient ...
2
votes
0answers
60 views

Efficient way to do user rescaling of variable in Gurobi

Is there a better way than the code below to the rescaling of variable in a model after the model has been build with Gurobi? Like some build in function or a direct manipulation of the column object? ...
3
votes
1answer
102 views

Modeling the sum of binary variables

Suppose $x_{1},x_{2}, \cdots ,x_{n}$ are binaries. I would like to model the following: IF $x_{1} + x_{2}+ \cdots +x_{n} \ge 2$ THEN $x_{1} + x_{2} = 2$ IF $x_{1} + x_{2}+ \cdots +x_{n} \ge 3$ ...
1
vote
3answers
200 views

Using big M values for a constraint

I want to enforce $x_{i,j}=x_{k,j}\implies z_i \neq z_k$ where $k = i-1$ so I used \begin{align}z_k + 1 - (x_{i,j} - x_{k,j})) \leq z_i \leq z_k - 1 - (x_{i,j} - x_{k,j})\quad\text{for each $j$}\end{...
3
votes
1answer
80 views

How to define hybrid variables without using additional binary variables?

I am working on a large NLP model with equilibrium equations in which the variables are defined in the following form: $$x_i \in [L_B, U_B] \cup\{0\} \quad \text{where} \quad L_B \ \& \ U_B \in\...
4
votes
1answer
148 views

How to set these constraints in a linear optimization problem (PuLP)?

I am trying to implement an employee (nurse) scheduling problem and seek some advice on how to implement a specific constraint.The problem is as follows: There is a set of employees and days (both ...
4
votes
1answer
91 views

Is working with equations in an MILP more efficient than working with inequaltities?

I have the following model \begin{align}\max&\quad B_{1} + B_{2}\\\text{s.t.}&\quad 0 \leq B_{1} \leq c_{1}\cdot Y_{1} \\&\quad 0 \leq B_{2} \leq c_{2}\cdot Y_{2} \\&\quad \end{align} ...
2
votes
1answer
71 views

How to enforce this specific constraint in PuLP?

I am trying to implement an employee (nurse) scheduling problem and seek some advice on how to implement a specific constraint.The problem is as follows: There is a set of employees and days (both ...
7
votes
2answers
115 views

How can preferences be modelled in MILPs?

Suppose a MILP model includes the following constraint: $ \begin{gather*} B_{1} + B_{2} + B_{3} \le 100 \end{gather*} $, where $B_{1},B_{2},B_{3}$ are nonnegative reals. Suppose that $\begin{...
4
votes
1answer
117 views

Buying shares in increments

I constructed an optimisation model which objective is to find highest return on available stocks. Now want to add a constraint that allows to buy stocks only in $2000 increments, how can I do it? i.e ...
1
vote
1answer
230 views

What is wrong with my linear programming model?

I tried solving this problem Here is my cplex code I have mentioned stored[month] as float+ but in the final result I get negative values. What is wrong with my model?
4
votes
3answers
170 views

Formulate relationship between four binary variables

I have four binary variables $x_{h}$, $x_{h'}$, $y_h$ and $y_{h'}$. I need to have the following relationships satisfied between the variables: 1- If $y_h = 1$ and $y_{h'} = 1$, then exactly one of $...
4
votes
0answers
66 views

Adding redundant inequality to a model

The following relationship is part of my optimization model ($W_k$ denotes a binary variable) $$W_{1} \le \cdots \le W_{k-1} \le W_{k} \le W_{k+1} \le \cdots \le W_{k^{\max}}$$ My question is, do ...
8
votes
2answers
153 views

Modeling Linear Program to decide if an inequality is facet

Suppose you have a set of points $v_1,\ldots,v_n$, which are the vertices of the polytope $P=\operatorname{conv}\{v_1,\ldots,v_n\}$ and a linear inequality $a^\top v \leq b$. What would be a linear ...
4
votes
1answer
84 views

How to convert non-normal probabilistic constraints to deterministic ones for mathematical modelling?

I am working on a chance-constrained optimisation model that takes into account uncertainty. I am aware of how to convert constraints that are of a probabilistic nature into the equivalent ...
2
votes
0answers
102 views

Montoya et al. 2017 benchmark Results

I am testing Montoya et al. 2017 dataset and trying to replicate the Result from this paper The electric vehicle routing problem with capacitated charging stations. I am unable to replicate the exact ...
5
votes
1answer
84 views

How to linearize difference of absolutes?

How to linearize difference of absolutes? $$|a|\ge k|b|$$ where $a,b$ are variables and $k$ is a constant.
2
votes
0answers
52 views

How to solve an LPP with summation

Up until this point I have only solved simple LPP problems with maybe 2 to 3 variables that looked like this, using pen and paper. I need to solve This Problem using Simplex, Dual Simplex, Big M and ...