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
0
votes
0answers
96 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
64 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
94 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
85 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
194 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
80 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
127 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
71 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
219 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
155 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
79 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
55 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
45 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
83 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
52 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
97 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
199 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
66 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
123 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
59 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
113 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
116 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
227 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
169 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
151 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
76 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
100 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
83 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
48 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 ...
3
votes
1answer
82 views

How to design the objective function of an MILP problem

In an MILP problem, I wonder if it is better to use an objective function that involves as many of the variables of the problem as possible as opposed to an objective function with only a few ...
2
votes
0answers
53 views

Problem classification: optimal weights for Weighted Arithmetic Mean

I want to write an optimisation problem then solve it, to get optimised weights to compute a final score using a weighted arithmetic mean. The problem is as follows. I have an entity (an input vector ...
3
votes
1answer
107 views
4
votes
1answer
93 views

Constraint programming in OPL: intervals covering time slots

I am trying to model the following: There is a shop open from xx AM to yy PM. In each 30 min time slot, there have to be demand[timeSlot] = x employees present. E.g. the shop is open from 08am to ...
5
votes
1answer
145 views

Propagate value through a graph

Here is my question where I am propagating distance through the graph, I was wondering if it is possible to do when the graph has cycles, i.e., traveling the same node multiple time then is it ...
3
votes
1answer
91 views

Controlling the constraint execution sequence in docplex

I have tried to implement my question asked here with the help of Github code link. Below is the linearized version of the MTZ like constraint as per the answer given here. Constraints below assign ...
5
votes
2answers
256 views

How can this relationship be modelled?

I declare an array of binary variables as $y(i), i = 1, ..., N$ I would like to model the following: If $y(i-1) + y(i) = 1$ then $y(k) = 0$ for $k < i$ and $y(m) = 1$ for $m \geq i$ To make ...
4
votes
1answer
133 views

TSP subtour elimination with multiple formulations

Referring to the question here. Given a set $S$, which we need to travel following TSP rules. I was wondering if this sub tour elimination method is good enough or not? Let $b_{i,j}$ denote edge ...
3
votes
2answers
99 views

How can I direct the behaviour of a MILP Solver

I have a model involving constraints of the form $$d(i) = a \cdot W(i) + b \cdot B(i)$$ where $W(i)$ is binary and $d(i), B(i)$ are positive reals. The objective function is $\max\sum B(i)$. While ...
5
votes
1answer
175 views

How to represent multiple elements of the same set correctly?

In a mathematical model, I have a set $J$ of distinct jobs, and a constraint dealing with pairs of elements from the job set. Which of the following is the most accurate way to address two jobs $j$ ...
6
votes
1answer
137 views

TSP subtour elimination by assigning distance traveled

Given a set $S$ which we need to travel following TSP rules. I was wondering if this sub tour elimination method is good enough or not? Let $b_{i,j}$ denote edge from $i$ to $j$ is taken or not and $...
5
votes
1answer
113 views

Delayed column generation in Dantzig-Fulkerson-Johnson formulation

In TSP wiki it is said that delayed column generation method is used to solve Dantzig-Fulkerson-Johnson formulation as it has an exponential number of possible constraints. I wanted to know whether it ...
5
votes
1answer
126 views

TSP on a non-complete graph

I have a non-complete graph $G$ with $V$ vertices and a set $D \subset V$ that needs to be traveled by a vehicle and then return to source at last. Binary variables $b_{i,j}$ represent if the edge $(...
7
votes
0answers
135 views

Modeling traffic in a city

I am trying to model traffic in a city, $(i,j)$ represents a road in a city. There are $H$ vehicles in a city they have some prescheduled set of destinations to visit, $A_{j,h}$ denotes arrival time ...
12
votes
3answers
702 views

On using correct notation in research papers

This question is about using correct notation while writing a research paper. Say I have a directed graph $G$, partitioned into $T$ layers. Denote the set of nodes in layer $t$ by $V_t$. Suppose, I ...
4
votes
3answers
165 views

Problem Clustering and Suggestions for Solving it (Job-Shop?)

I am trying to find the amount that an item may get produced. To produce this item I need casting-molds. A casting-mold can be used multiple times after it becomes available again. For the ...