Skip to main content

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 vote
2 answers
151 views

My Professor couldn't complete the model for this optimization problem. how do i model this problem?

(Edit: there was a slight translation error, to be clear, we tried this since the start with Binary variables (IP), even then we couldn't crack it) I'm an undergraduate in Industrial Engineering and ...
Eduardo Gehrs's user avatar
2 votes
1 answer
121 views

Avoid double counting in objective function for a maintenance scheduling problem

I have a problem to do with machine maintenance scheduling which I have formulated as a MIP where I have a binary variable $x_{ijt}$ which is 1 if the maintenance job j is scheduled on the same ...
Demitri's user avatar
  • 33
0 votes
1 answer
72 views

PULP: Optimization Assignment of Bicycle production per month

Q1. If bicycles of types A and H are produced, then bicycles of type C can be produced with 20% shorter working hours, while selling profit of bicycles type H can be 20% higher. Q2: If bicycles of ...
Ankit Basu's user avatar
0 votes
1 answer
66 views

Inconsistencies in modeling a binary variable that indicates a switch

this is a follow-up question to this post here and to @RobPratt's answer. I have implemented the whole thing, and now it happened that on day 1 the machine did not run and was only used for the first ...
marvelfab12's user avatar
3 votes
1 answer
517 views

Model ```a > 0 implies b = 1```, where a is unbounded above

I want to model if a > 0 then b = 1, where a is an unbounded above continuous variable and ...
J. Dionisio's user avatar
3 votes
1 answer
195 views

How to linearize the following logical constraints?

I am having trouble linearizing the following logical constraints. $x,y,z$ are non negative continuous variables such that $x=y+z$, and $A$ is a positive parameter. I would like to linearize $$ y= \...
NormalFit's user avatar
1 vote
1 answer
37 views

General convention for demand determination

I am currently writing my first paper and therefore relatively new to the Operation Research community. I have a physician scheduling model with novel demands and now I want to test it. Since the ...
ornewbie's user avatar
8 votes
1 answer
1k views

Why do I get a binary solution even when I solve an LP problem with continuous variables?

I have a MILP in the following form maximize $${\bf c}^T{\bf x}$$ subject to $${\bf Ax}\le {\bf b}$$ Matrix ${\bf A}$ is a binary matrix, and very sparse. It is a larger matrix with 300 rows and 1000 ...
KGM's user avatar
  • 2,377
1 vote
1 answer
94 views

Conditional binary programming

I am currently trying to model the relationship that if the binary variables $b_{it}=0$ and $c_{it}=1$, and for the integer non-negative variable $b^{n}_{i(t-1)}=0$, then the new binary variable $a_{...
mingabua's user avatar
1 vote
1 answer
104 views

Unique values constraint in Pulp

Can we directly model following constraint in pulp x != y as following: ...
mufassir's user avatar
  • 211
0 votes
1 answer
84 views

Single Machine Job Scheduling With Release Dates and No Idling Constraint

I'm trying to model a linear job scheduling optimisation problem. There is a single machine and N jobs $J_1, J_2, ..., J_N$. Each job consists of one step with processing time $p_1, p_2, ..., p_N$. ...
Ralph Melish's user avatar
2 votes
2 answers
109 views

Solving a Variant of Bin Packing

We have a set of bins that are partitioned into fixed blocks of size $S = \{S_1, S_2, \ldots S_n\}$, and the items are all of sizes from $S$. An item can be allocated to a bin partition if the size of ...
ephemeral's user avatar
  • 917
0 votes
1 answer
70 views

Issue with Mathematical Model Using PuLP Library

I'm working on a pulp python code for the MS-RCPSP (multi-skilled resource-constrained project scheduling problem), I need to update the code to address a specific scenario: when an activity requires ...
John Donald's user avatar
2 votes
2 answers
123 views

Deriving linear constraints from logical notation

I have the following two logical implications. $x_{it}$ and $y_{it}$ are binary, $N$ is an integer number. $i$ and $k$ are indexes. $$\sum_{k=1}^{t}x_{ik}\ge N~\implies y_{it}=1$$ $$\sum_{k=1}^{t}x_{...
manofthousandnames's user avatar
4 votes
2 answers
304 views

Linear condition between two continuous variables

There are two real variables $x$ and $y$. The conditions are such that: if $y\le 0$, then $x=0$ if $y>0$, then $x=y$ How to write linear equations or inequalities to satisfy both the conditions?
Lorentz's user avatar
  • 41
3 votes
1 answer
79 views

Formulation and modeling of a logistics problem: Combination of bin packing and cutting stock problem?

I'm a Data Scientist with a strong mathematical background but don't know much apart from textbook material about Operations Research. I'm dealing with a logistics problem which I don't know how to ...
QLG's user avatar
  • 33
0 votes
0 answers
51 views

Modeling Approach to Adjust linear Elasticity Effect in Pricing Optimization

I am working on a pricing optimization model for a product where the price depends on the competition as well as our costs. The current formulation of the model is: ...
MarcM's user avatar
  • 133
0 votes
1 answer
104 views

How to model this constraint in a better way?

I have a resource allocation problem. There are $M$ users and $N$ resources (machines). One user can be assigned to multiple resources/machines. But maximum $B$ machines can be activated at a time for ...
KGM's user avatar
  • 2,377
3 votes
1 answer
194 views

Reformulate constraints

I have the following constraints and am wondering whether I can formulate the whole thing more narrowly and with fewer constraints. $x_{itk}$ is binary and $u_{it}, v_{itk}\in [0,1]$. $M$ is a Big-M ...
manofthousandnames's user avatar
0 votes
0 answers
74 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
36 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
64 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,377
0 votes
0 answers
27 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
326 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
87 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
87 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,377
0 votes
0 answers
56 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
35 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
124 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
  • 97
4 votes
1 answer
138 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.5k
0 votes
1 answer
88 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
180 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
33 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
185 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
116 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
66 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
229 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
116 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
72 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
72 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
87 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
2 answers
153 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
44 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,691
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,960
1 vote
1 answer
216 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
219 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
118 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
224 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
326 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
2 3 4 5
12