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
0 answers
86 views

Mixed Integer Linear Programming [closed]

I don't know if this is appropriate and accepted here, so I apologize in advance. I just really need help in a problem that I've been working on for months now. Is someone up to help me create a model ...
Siazam's user avatar
  • 19
-1 votes
0 answers
43 views

Need help with understanding LP and ILP modelling

Hoping someone may be able to point me in the right direction. Im looking more for a "Tutor" to help with my Uni work. I am struggling to grasp LP, ILP and NLP concepts. The only part I seem ...
Jarred Wyatt's user avatar
0 votes
0 answers
61 views

How to constrain variables to fit a normal distribution

Given a time series $s_t$, I would like to define for each $t$ a perturbation $e_t$ such that the set of all $e_t$ "fits" (within some range) a normal distribution with mean $\mu=0$ and a ...
NormalFit's user avatar
0 votes
1 answer
34 views

Add second "constraint" to model a binary variable

in my model I have the binary variable $f_{ij}$ which pushes a time-dependent $j$ integer variable $D_{ij}$ to zero if $f_{ij}$ takes the value 1 and keeps the integer number if $f_{ij}$ equals 0. Yes,...
marvelfab12's user avatar
0 votes
0 answers
57 views

Is it possible to transform MIQP into MILP without introducing new variable?

I have a QP optimization problem in the form $$\min {\bf x}^T{\bf Qx}-{\bf c}^T{\bf x}$$ here $\bf Q$ is a symmetric matrix. $\bf x$ is the optimization variable, and it is binary. Is there a way to ...
KGM's user avatar
  • 2,265
0 votes
0 answers
26 views

R package cannot find PYOMO. How do I point to the correct location of where it's located?

As a quick note this is a re-post from the main StackOverflow. I am trying to use the PYOMO linear programming solver from within an R script. When I type ...
Abed's user avatar
  • 1
4 votes
3 answers
316 views

How to maximize the number of variables with value at least 0?

Given a matrix $A$ and a vector $b$, I would like to find a vector $x$ satisfying the set of linear constraints $A x \leq b$, and subject to that, contains as many variables as possible with ...
Erel Segal-Halevi's user avatar
1 vote
0 answers
83 views

volume-weighted mean equality constraints

I have the following optimization objective function for a dynamic pricing problem: \begin{align*} sum\_profit = \sum_{i \in sales\_point} \Bigg( constant[i] + {elasticity[i]} \cdot (movement[i] + ...
MarcM's user avatar
  • 133
0 votes
1 answer
78 views

How to model this constraint for a QP problem?

I have a system with 100 users. There are 6 resources. At any point of time, only 2 resources are made available and those resources can be shared among the users. Some users may not get any resource, ...
KGM's user avatar
  • 2,265
0 votes
0 answers
53 views

How to initialize a parameter (belonging to the first stage model) in a two stage model, taking its value from second stage model?

I am working on a two stage approach in order to reduce the complexity of a scheduling model which is an NP-hard problem. I have to implement a while loop in order to repeat solving the models in case ...
Baghban's user avatar
  • 131
0 votes
0 answers
33 views

proper notation for union of dictionary

Traditionally, our notation has separated out a set and values associated with said set. We'll say something like the state is a tuple of $(V, f)$, where $V$ is a set of control values and $f$ is a ...
Brannon's user avatar
  • 900
0 votes
2 answers
121 views

Converting a piecewise function to linear equations

I am trying to build a MILP model. In this model, I have a dependent variable (alpha) that its value depends on the value of some other variables (or different combination of some other variables). In ...
Sam's user avatar
  • 87
4 votes
1 answer
136 views

Need help understanding robust optimization formulation

I am reading these notes from Stanford called "Optimization with uncertain data". In section 2.2, Example 2 (page 7), the author mentions the following portfolio problem $(P)$: $$ \max \; t $...
Kuifje's user avatar
  • 13.3k
0 votes
1 answer
86 views

Deploying optimization model to production environment

I have developed an inventory optimization model for my warehouse and I want to know, how to validate this model, perform User acceptance testing and deploy it to production environment?
Vamsi Krishna Kunapareddy's user avatar
1 vote
1 answer
168 views

Lagrangian Relaxation Lower Bound exceeds the Upper bound and the Optimal solution

I'm trying to minimize an MIP model employing a Lagrangian relaxation approach. However, I've encountered an issue where, in certain instances, the lower bound (resulting from the Lagrangian sub-...
NCyeah's user avatar
  • 19
1 vote
0 answers
31 views

Modeling start point constraint for TSP in the Dantzig-Fulkerson-Johnson formulation

I'm trying to use the DFJ formulation to solve TSPLib problems using JuMP and Gurobi. I want to add a constraint to the starting point by fixing either the start or the end to the first node (because ...
skittish's user avatar
3 votes
2 answers
184 views

Can an Operations Research model optimize on a vector's indexes?

Theoretical model Suppose that I have an input vector $E_{t}\in\mathbb R^n$ for $n\in \mathbb N$ Suppose that I want to optimize $\displaystyle\max_{t,x} E_tx$. That is, my decision variables are the ...
JKHA's user avatar
  • 679
1 vote
1 answer
114 views

How to model the following Constraint

I would like to model the following: $B \le \alpha \implies \sum_i W(i) \ge \beta$, where $B$ a continuous variable, $W(i)$ binary variables, $\alpha$ a real constant number, $\beta$ an integer ...
Clement's user avatar
  • 2,252
0 votes
1 answer
63 views

Formulation of a stepwise linear approximation

I am currently trying to solve an MILP in Gurobi. Unfortunately, Gurobi does not support non-linear functions and I would like to do the following. I currently have the following constraint. It ...
nflgreaternba's user avatar
3 votes
2 answers
222 views

Convex equivalent of a constraint

I have a constraint as follows in my MILP model: $$ \sum_{e} (a_1(e) - a_2(e))^2 \leq M $$ Where, $a_1(e)$ and $a_2(e)$ are binary variables. Would you please guide me how can I find the equivalent ...
Mohammad Reza Salehizadeh's user avatar
2 votes
1 answer
63 views

How to Group IDs Based on the Difference of Each ID’s Min and Max Value?

I have a dataset that contains IDs along with their corresponding minimum and maximum values. Here’s a sample of the data: ...
Shibaprasad's user avatar
1 vote
1 answer
109 views

Incorporate fixed effects in pricing decisions with linear models

I have the following model the predict the log of volume: fixed_effect + day_of_week_effect + elasticity * (Price - competitor_price). I want to formulate an optimization problem that maximize my ...
MarcM's user avatar
  • 133
1 vote
1 answer
59 views

Modelling set of binaries as SOS1

H.P. Williams states in his book "Model Building in Mathematical Programming: "An SOS1 is a set of variables (continuous or integer) within which exactly one variable must be non-zero." ...
Clement's user avatar
  • 2,252
0 votes
0 answers
71 views

Removing min operator from max objective

I am reading a paper where the authors made the following statement on page 16: I wonder why dropping the 'min' operator inside a 'max' objective function is a valid operation here. Any explanation ...
Apurba Saha's user avatar
1 vote
1 answer
86 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
119 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
1 vote
0 answers
43 views

How to model membership to a set using MILP?

Consider the following problem. I have two regions $X1=[a,b]$ and $X2=[b,c]$. Notice that they are disjoint except for point $b$. I have a continuous variable $x$ and two binary variables, $y_1,y_2$ ...
k88074's user avatar
  • 1,661
1 vote
0 answers
57 views

Dealing with a problem that contains a specific structure with a standard MILP solver

Suppose we have a specific formulation in which contains a special structure. For example, the formulation has a block diagonal format with some linking constraints. As far as I know, this format ...
A.Omidi's user avatar
  • 8,882
1 vote
1 answer
154 views

Creating a decision variable that is the sum of other variables in PuLP

I'm trying to represent the following problem with PuLP: A car factory needs to maximize profit with an X amount of car models. Each car model has an individual profit and a manufacturing limit, and ...
user avatar
1 vote
3 answers
191 views

Formulating a constraint to select the minimum value of an index

To provide a clear description of my problem, let me outline the scenario. I have a binary variable $\phi_{k,c}$ where $k$ is an index belonging to the set $\{1, 2, 3, ..., 9\}$. As an example, for a ...
Liu Fan's user avatar
  • 11
1 vote
1 answer
117 views

Which of these formulations has the tightest linear relaxation ? (Part 2)

This is a follow up question of this question, in which it was asked to compare the "tightness" of two models: I have a sequence of binary variables $x_i$ and want to enforce consecutive $1$...
abcd's user avatar
  • 55
1 vote
2 answers
222 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
4 votes
1 answer
321 views

Optimization problem with the Harmonic number

I have an optimization problem: \begin{align*} \text{ minimize } \sum_{i=1}^n H(x_i) \\ \text{ subject to } Ax \geq b, x\geq 0, x\in \mathbb{Z}^n \end{align*} where $H(n)$ is the $n$-th Harmonic ...
Erel Segal-Halevi's user avatar
1 vote
1 answer
156 views

Job Scheduling with Energy Consumption using Linear Programming

I'm looking for some advice for an optimization problem regarding scheduling jobs in a datacenter. So I have a list of jobs and each job has a required time for finishing and a number of cores it has ...
wind.leon's user avatar
3 votes
2 answers
150 views

Will adding this constraint help my model?

I am solving a maximization problem with continuous variables $x,z\in \mathbb{R}^+$ and binary variable $\delta \in \{0,1\}$. I am maximizing $x$ subject to side constraints and would like to enforce ...
abcd's user avatar
  • 55
0 votes
0 answers
37 views

Could you model this if -else statement [duplicate]

I need to build a if-else constraint for this statement, where $c_j$ and $x_{ij}$ are decision variables, and $m_i$ is a constant: if $c_j$ = $m_i$ then $x_{ij}$ = 1 else $x_{ij} = 0$. Any help is ...
Vamsi Krishna Kunapareddy's user avatar
0 votes
1 answer
101 views

Travelling salesman problem

This is a CVRP problem and I have difficulty understanding the constraints in the red box. For the sub-eliminator constraint (MTZ), my question is how can we make it on our own? I am sure there is ...
uni_lad's user avatar
  • 39
2 votes
1 answer
80 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
2 votes
1 answer
100 views

Bin packing problem with multiple dates

Data: I have the following items I need to ship, with the input data as below. Each item needs to be shipped by shipDate at the latest, but can be shipped as early as availDate. Each truck has a min/...
J. Doe's user avatar
  • 53
1 vote
1 answer
130 views

Mixed-Integer Programming Model for Scheduling with Dynamic Jobs

I have an optimization problem for deliveries between production lines and a warehouse in a small facility. I need to know how many vehicles and utilities to buy, such that cost and downtime are ...
user18463824's user avatar
1 vote
1 answer
370 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
2 votes
1 answer
79 views

How to define the sequence depending setup time based on a time index formulation

I am working on a scheduling problem in which I have used two different MIP formulations and also based on the time index variable. My problem is in the class $ P_{j} | \ r_{j}, SDST \ | C_{Max} $. ...
A.Omidi's user avatar
  • 8,882
1 vote
2 answers
155 views

Matrix lookup modelling variants

As part of a bigger model I have a matrix of variables $x_{ij} \geq 0$ and a "selector" set of variables $y_j \in \{0,1\}, \sum_j y_j = 1$. From $x_{ij}$ I'd like to get the variables of ...
Christian's user avatar
  • 113
1 vote
2 answers
242 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
0 votes
0 answers
80 views

different constraints for each row

I'm using the IpSolve package to solve a problem to optimize the assignment (minimum distance) between sellers (rows)and customers (columns) using Rstudio. The problem I faced when using lp/lp....
Angel Diaz's user avatar
1 vote
0 answers
87 views

Optimize cherry picking runs

I am trying to optimize a cherry picking procedure on 96-well microplates. The plates are 12X8 (12 columns, 8 rows). We pass a command file that has many lines like this to a robot: ...
Ryan's user avatar
  • 111
2 votes
1 answer
152 views

How to model a penalty for exceeding a threshold in a nonlinear optimization problem using IPOPT?

I'm working on a nonlinear optimization problem where I have a decision variable representing my product's price (P_m) and a constant representing my competitor's price (P_c). I want to introduce a ...
MarcM's user avatar
  • 133
2 votes
0 answers
60 views

System Stability constraints formulation

I am working with a system having a massless 2D plane and on that plane there is a rigid object with some mass placed on it. I want to support the plane with wooden sticks such that the system is ...
Ken Adams's user avatar
2 votes
1 answer
132 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
2 votes
1 answer
100 views

Formulation for choosing how many items to manufacture

I am working on a scheduler for a manufacturing plant. I have currently set it up so the decision variables are set up as binary variables: $x_{m,p,s}$ = 1 if machine m is running part p on shift s ...
Dano's user avatar
  • 55

1
2 3 4 5
12