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
3 votes
2 answers
338 views

How to model a binary variable?

I am trying to find a constraint for the following relationship, but am failing a bit at it right now. I want to find a linear constraint that does the following. The binary variable $switch_{ot}$ is ...
mingabua's user avatar
2 votes
1 answer
90 views

Find the minimum number of equipment required for a service period

I'm starting to learn operations research and trying to get my head around this problem that I have. Problem statement: Find the minimum number of equipment needed to run a service schedule. There are ...
Asheesh's user avatar
  • 21
0 votes
2 answers
97 views

Is there a comprehensive list of problems in OR?

I was trying to search for different types of problems in OR and couldn't find a exhaustive list of problems. So far I have, Travelling salesman problem Cutting Stock problem Shortest path problem ...
Meet Saiya's user avatar
0 votes
1 answer
74 views

Mixed Integer Programming - How to model a term in objective function with a constant multiplied by (1-Decision Variable)

I am solving an optimization problem, where I want to minimize the objective function $$Z = \sum_q \left(D_q \text{fare}_q - \sum_{p \ne q} \Delta D^p_q \text{fare}_q \right) (1-Z_q)$$ Each $q$ is an ...
Eslam Mahmoud's user avatar
1 vote
1 answer
59 views

Workforce scheduling MIP formulation

I am working on a large scale workforce scheduling problem with a large number of hard and soft constraints. The soft constraints are modeled as objectives with penalties for violating them. So my ...
ORProfessional's user avatar
5 votes
4 answers
829 views

Rewriting if-then constraints of binary summations

Suppose both $x_{i,j}^{ab}$ and $y_{i,j}^a$ are binaries. Then how can I rewrite the following if-then in linear form? $\sum_b x_{i,j}^{ab} \ge 1 \implies \sum_{i,j} y_{i,j}^a = 0$ I was thinking of ...
linkho's user avatar
  • 163
1 vote
2 answers
146 views

how to satisfy time constraints with meeting points?

I have a specific pickup and delivery problem to work on and am thinking how to incorporate time windows effectively. The problem has some driver with some time window [$a_d, b_d$] which is the start ...
Hemfri's user avatar
  • 11
2 votes
2 answers
206 views

Model Complexity and Constraints in Mathematical Modeling

I have a few questions about mathematical modeling (MILPs mainly). My understanding is that the complexity of a model is primarily determined by the number of decision variables, rather than the ...
Rainbow's user avatar
  • 41
6 votes
0 answers
89 views

MIP formulation for graph planarity test

In this question, it was asked wether a MIP formulation exists to test for a graph's planarity. The inputs are the graph's nodes and edges, and the output would be a certificate which guarantees that ...
Kuifje's user avatar
  • 12.3k
4 votes
1 answer
200 views

MIP Model with relaxed integer constraints takes longer to solve than normal model, why?

I am currently working on my undergrad thesis which is a mathematical optimization problem of the territory design family of problems. I am using the mathematical formulation of the problem to solve ...
EduardoSalazarT's user avatar
1 vote
1 answer
49 views

Assistance in formulating implication constraints for inequalities

I would like to seek some advice on modeling the following logical implications, where $\delta$ is a binary variable, $D_{j}$ and $A_{j}$ are nonnegative discrete variables, and $p_{j}$ are ...
Mike's user avatar
  • 707
1 vote
1 answer
73 views

Traffic lights optimization (part 2)

This is a follow up question of this thread, in which it is asked how to model a circular layout of a given set of cliques of a graph, which represent simultaneous movements at an intersection. @...
Kuifje's user avatar
  • 12.3k
1 vote
2 answers
113 views

Is there a way to obtain coefficient matrix A and RHS b of constraints equation from cplex or guribi in python?

I have a non-linear program, minimizing sum of concave functions subject to linear constraints. Hence I'm using a different solver(in Julia). However, that solver assumes we have constraints in $Ax \...
Meet Saiya's user avatar
4 votes
3 answers
480 views

How can I formulate this 'if-then' constraint problem?

I have five integer variables, and I need to write some constraints on them: $x_0$ , $[x_1, x_2, x_3, x_4 ]$. $1 \leq x_i \leq 3$ if $x_0 =1$ then no constraint on $[x_1, x_2, x_3, x_4 ]$ if $x_0 =...
Optimization team's user avatar
2 votes
1 answer
38 views

A tighter relaxation of the mix logical constraints

Suppose the following logical form there exists. $$Iff: (x_{j,m} \land x_{k,m}) \implies ((C_{j} \leq S_{k}) \lor (C_{k} \leq S_{j}))$$ This is well-known as a no_overlap_constraint in the parallel ...
A.Omidi's user avatar
  • 7,559
1 vote
3 answers
61 views

PuLP ensure first and last choice

I have an assignment problem where I have $N$ locations and $M$ dates for each location, and the goal is to choose $K$ location-date pairs that maximize revenue. There are a number of constraints, for ...
3Li's user avatar
  • 23
7 votes
2 answers
307 views

Traffic lights optimization

I am interested in the following problem dealing with the optimization of traffic lights on the intersection illustrated below: The goal is maximize the duration during which each movement $m\in M=\{...
Kuifje's user avatar
  • 12.3k
1 vote
0 answers
31 views

Auxiliary parameters for two uncertain parameters Robust Optimization

I have the following constraint for robust counterpart formulation, where two uncertain parameters appear at the same time; $\sum{QG_{ij}}$*${\theta}$+$\sum_{}\sum{QD_{ij}}*p $ * ${\theta}$ where; ${...
Abde's user avatar
  • 81
1 vote
2 answers
56 views

Is it possible to route based only upon shortest path?

I have a routing problem and am wondering if it is even possible to only use the $k^{th}$ shortest path? There are a set of people with cars and a set of other people with no cars, each has its own ...
Rainbow's user avatar
  • 41
3 votes
2 answers
635 views

Writing a constraint of an integer programming in a linear form

I modeled an optimization problem in an integer programming format. The main constraint I came up with is now nonconvex. I would like to see if there is another equivalent formulation in which the ...
Red shoes's user avatar
  • 133
3 votes
2 answers
326 views

How to model C1 = C2 implies b1 = b2

Suppose $C_1 \ge 0$, $C_2 \ge 0$ are continuous variables and $b_1$, $b_2$ are binary variables. How could I model the following? $C_1 = C_2 \implies b_1 = b_2$, the opposite does not hold.
Clement's user avatar
  • 2,132
3 votes
2 answers
330 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 ...
TheExerminate's user avatar
2 votes
2 answers
349 views

Representing "and"/"or" relationships into constraints

How do I represent the following constraints in terms of equations? For each i, either (1) holds or (2) holds- $$ x_{1}^i \geq x_{2}^i \quad and \quad x_{3}^i \geq x_{4}^i \quad {(1)} $$ $$ x_{1}^i \...
T_k's user avatar
  • 77
3 votes
3 answers
189 views

Quantifying a measure of standard deviation in MILP

I am trying to set up a MILP for production scheduling. The specific details I'm not sure are important but in general a plant has M machines running N parts, each part requiring W workers. The model ...
Dano's user avatar
  • 33
1 vote
1 answer
64 views

how to minimize the distance to the final points with incomplete information?

Suppose we have a transportation problem similar to pickup and delivery problems. So, we have a set of drivers and a set of passengers. each passenger has predefined origins and destinations. I'd ...
linkho's user avatar
  • 163
0 votes
1 answer
35 views

Array of string in OPL

how to make 2d array of strings in Cplex //indics {string} cluster=...; setof(string) darkstore =...; setof(string)demandpoint =...; //data cluster={chav,sree}; demandpoint=[{tsnami,adholokam,...
Kiran Kumar S's user avatar
4 votes
2 answers
283 views

The linearization of the (Iff-and-only-Iff) expression

I am trying to linearize the following expression without using the Big-M formulation, but I cannot convert it. I am willing to know if there exists an efficient way to do that? $$ Iff \quad (w=1) \...
Mr. Blue's user avatar
1 vote
3 answers
120 views

Optimization solver that satisfies variable values within set membership

Is there a solver that can handle an AMPL model of this sort: ...
wanderinganon's user avatar
0 votes
1 answer
57 views

Maximization problem with preferences on variables

Consider the following trivial, theoretical model: $$ \max x+2y+3z \qquad s.t. $$ $$ x \leq b_x $$ $$ y \leq b_y $$ $$ z \leq b_z $$ $$ x+y+z = 1 $$ $$ x,y,z \in \{0, 1\} $$ and $b_x$, $b_y$ and $b_z$ ...
Libra's user avatar
  • 927
3 votes
2 answers
148 views

How to find the maximizing number of expected delivered units of a probabilistic minimum cost flow problem?

I am a Bitcoin / Lightning Network open source developer and researcher and new here but very active on the sister site. In the context of my research I discovered the field of operations research ...
Rene Pickhardt's user avatar
0 votes
1 answer
75 views

To maintain safe order level from a customer

A telecommunication company (CALLME TEL Co., Ltd) receives and processes customers’ orders. Orange Co., Ltd is an important customer, who mostly places orders every 2 months. Medium quantity of ...
Mark K's user avatar
  • 429
1 vote
1 answer
238 views

multi-commodity flow vs integer programming

A theater center needs to select which shows to broadcast in one of its rooms for a given day. There are three options available: short films that last about 1 hour, movies that last about 2 hours, ...
ebrahimi's user avatar
  • 123
2 votes
3 answers
107 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 ...
mdslt's user avatar
  • 529
6 votes
3 answers
442 views

How do we formulate a problem where the decision variable has an index that is also a decision variable?

I want to maximize the sum of a nonlinear function $f(.)$ w.r.t. $x$ that is convex in $x$: $$\max \sum_{i=1}^N f(x_i), $$where $x_i$ is a continuous variable and $0 \le x_i < 1$ for $i = 1, 2, \...
Steven01123581321's user avatar
3 votes
3 answers
567 views

Modelling if elif else conditions as MIP

I have 4 variables. Xl6, Xs6, Pl6, Ps6. I have a constant C as well. Xl6 and Xs6 are binary whereas Pl6 and Ps6 are integers. Also, all variables can take only positive values. I have to implement ...
mufassir's user avatar
  • 181
2 votes
2 answers
100 views

constraint set for a scheduling problem with machine availability

I have a set of tasks $I$ with processing times $p_i, \forall i \in I$. There exists a set of machines $M$ and each machine has availability time ranges in a given time horizon. For instance, given a ...
ball_jan's user avatar
  • 158
3 votes
1 answer
102 views

Modelling Question

Let $W^C_t$, $W_t$ be binary variables and $p$ an integer variable with $1 \leq p \leq 3$ The variables are related through the following equation: $$W^C_t = \sum_{\theta=1}^{p} W_{t-\theta}$$ I can ...
Clement's user avatar
  • 2,132
3 votes
3 answers
264 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: ...
devOn's user avatar
  • 33
1 vote
1 answer
140 views

variable use of nested blocks in pyomo

I'm using pyomo to model a system consisting of subsystems which themselves consist of subsystems. Therefore, I use nested Blocks. Every block is described in a separate file. I want to be able to ...
Ursxx's user avatar
  • 11
1 vote
1 answer
77 views

How to model this problem with multiple objectives?

This question is related to How to deal this L0 norm of a vector of L2 or L1 norms in objective? I have an optimization variable denoted as ${\bf A\in\mathbb{C}^{100\times 5}}=\begin{bmatrix}{\bf a}_1&...
KGM's user avatar
  • 2,191
6 votes
2 answers
241 views

How to partition a giant tour into feasible routes?

In vehicle routing problems, the route first cluster second approach starts by computing a "giant" TSP tour (which typically does not satisfy all constraints of the problem), and then ...
Kuifje's user avatar
  • 12.3k
5 votes
2 answers
396 views

Is this constraint with an indicator function nonlinear?

We have two variables $x\geq0$ and $y\in\mathbb{Z}^{0+}$. We have this constraint in our model $$x = \sum_{i = 0}c_i \mathbb{1}_{\{y=i\}}$$ where $c_i$ is a parameter and $\mathbb{1}_{A} = 1$ if $A$ ...
user avatar
1 vote
1 answer
137 views

How to model this constraint? [duplicate]

I have a system with $C$ machine and $U$ users. The decision variables are $d_{u,c}$ and ${\bf f}_{u,c}$ with $c=1,2,\cdots,C$ and $u=1,2,\cdots,U$, where $$d_{u,c}\in\{0,1\}$$ $${\bf f}_{u,c}\in\...
KGM's user avatar
  • 2,191
3 votes
1 answer
146 views

Optimization model testing tooling: likes, dislikes, and wishes

We’re [1] in the thick of building out a testing suite for decision models, starting with a focus on route optimization. There are several angles we care about [2] and are considering: unit testing, ...
Ryan O'Neil's user avatar
5 votes
3 answers
383 views

Is this arc routing formulation correct?

Let $G=(V,E)$ be a graph. I would like to identify an eulerian cycle in $G$ with minimum cost, with an integer programing approach: $x_{ij}$ are integer variables that denote the number of times that ...
husson's user avatar
  • 51
4 votes
1 answer
333 views

How can I transform this logical if-then constraint? [duplicate]

I want to know how to transform this logical if-then constraint? If $B=1$,then $A \ge C$, else $A=0$, where $A$ and $B$ are decision variables and $C$ are constants. $B$ is binary variable and $A\ge 0$...
Alan Zhang's user avatar
1 vote
1 answer
162 views

How to write this logical expression with Gurobi + Java, or express it as a big-m formulation

I am trying to write the following expression in Gurobi+Java or Gurobi+python, if it is more practical It could be expressed as a big-M formulation. \begin{equation} \label{const4} \text{D}_{uv} = ...
Hernan19's user avatar
2 votes
2 answers
204 views

How to model not-met demand to next period?

I am trying to include to my model a demand shift. That is, I am having a fixed demand for each period (t), but because of capacity constraints I am not able to serve the whole demand for each period. ...
Laura's user avatar
  • 79
5 votes
1 answer
207 views

Summation of Binary Variables Pushing a Binary Variable

I'm modeling a problem where I have a set of binary decision variables $x_{ij}$ that has a value of 1 if the person $i$ is allocated to day $j$ or 0 otherwise. I have another set of binary decision ...
dhfg's user avatar
  • 53
2 votes
1 answer
108 views

How to mathematically model this multi-objective optimization problem?

I have a system of $M$ machines and $U$ users. Each machine has a capacity in terms of number of resources. Let, machine $m$ has $\zeta_m$ resources. Each user has a service demand $d_u$ and there is ...
KGM's user avatar
  • 2,191

1
2 3 4 5
10