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
5 votes
1 answer
232 views

Additional resources for this type of problem formulation

I'm working on a problem with the following formulation: \begin{align} \min&\quad\sum_{i \in N} \sum_{j \in J} V_{ij}x_{ij} \\ \text{s.t.}&\quad \sum_j x_{ij} = 1 \quad \forall i \in N\\ &...
0 votes
1 answer
63 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 ...
5 votes
3 answers
3k views

How to represent an integer variable via binary variables?

Suppose we have a model with $N$ integer variables, i.e. $x \in \mathbb{Z}^{N}$ with $L \leq x \leq U$. How can we represent the integer variables via binary variables? Or in other words: how can we ...
1 vote
1 answer
101 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 ...
3 votes
1 answer
62 views

Are there standard symbols to describe discrete event simulations (DES)

I just wonder, whether there is a good reference for the symbols used in a flow chart to describe a DES process. I am looking for something like Kendall notation but with a reference to the symbols. I ...
3 votes
1 answer
120 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 $...
0 votes
1 answer
80 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?
1 vote
1 answer
159 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-...
0 votes
1 answer
108 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 ...
3 votes
2 answers
183 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 ...
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 ...
1 vote
1 answer
113 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 ...
3 votes
1 answer
279 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 ...
0 votes
1 answer
59 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 ...
3 votes
2 answers
213 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 ...
1 vote
3 answers
179 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 ...
2 votes
1 answer
60 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: ...
1 vote
2 answers
89 views

In a routing and scheduling problem with break consideration, How can I determine whether a node is met before a break or after it?

I'm working on a routing and scheduling problem in the home care services context. I consider a break as a dummy patient, so routing and scheduling are also implemented for the break node (with some ...
0 votes
1 answer
100 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 ...
1 vote
1 answer
52 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." ...
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 ...
1 vote
1 answer
84 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} \...
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$ ...
0 votes
0 answers
54 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 ...
1 vote
1 answer
105 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 ...
6 votes
1 answer
116 views

Help modeling grid placement problem

I'm trying to model a grid placement problem to exercise in OR. The problem is defined as: a grid of some dimension (let's say 500x500) N users that need connection. Every user has: a defined ...
3 votes
3 answers
300 views

Scheduling for the shortest days using ILP

I've tried Or-Tools and MILP solvers a couple of different ways on this, but they take a surprisingly long time to realize that the solution they generated fairly quickly is in fact minimal. Is there ...
1 vote
1 answer
153 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 ...
11 votes
1 answer
496 views

Modeling an assignment/scheduling problem to minimize total wait

I have an assignment type problem in which there is a set of students, $S$, and a set of training classes $T$. Each training has a fixed start and end day and can accommodate at most 1 student. In ...
3 votes
1 answer
123 views

Nurse Rostering Code with custom constraints Not Working

Could someone please check this code. I modified constraints as : No. of nurses - 10 Max No. of nurses in Morning/Afternoon/Evening Shifts - 3/4/2 Max no. of shifts in a week per nurse - 5 ...
2 votes
1 answer
125 views

How to model a set of integer variables getting assigned different values than another set of integer variables

Assume we have variables $x_1, x_2, x_3, x_4$ that each can belong to $\{1,2,...,10\}$. How can we model a constraint that variables $x_1, x_2$ get assigned different values than $x_3, x_4$? Because ...
8 votes
1 answer
203 views

Strategy for filling a table only slightly dependant on the number of columns

I'm using the OR-Tools CP-SAT solver to fill a table with integers, with various constraints, as illustrated by the x in the following figure. ...
4 votes
0 answers
106 views

Modelling issue with rcpsp and boolean expressions

I'm trying to solve an RCPSPDc problem in OR-Tools with CP-SAT solver. In my RCPSPDc model (with discount rate) i want to set this objective: $$\max_{s}\sum_{j\in J}\text{profit}_{j}\cdot \frac{1}{(1+...
5 votes
3 answers
473 views

Maximize the minimal distance between true variables in a list

I'm using the OR-Tools CP-SAT solver on a list of $n$ boolean variables $x_i$. I'm trying to maximize the minimal distance between two true variables in this list, as illustrated by the following ...
9 votes
1 answer
287 views

How to tackle large nurse scheduling problem?

I have a nurse-scheduling type of problem with a time span of a year and many employees. Formulation My main variables are: \begin{align}x_{e,t} &= \begin{cases}1 \text{ if employee } e \text{ ...
6 votes
0 answers
89 views

Data Formulation for Mixed-Integer-Programming Models

Until now, I have used the Gurobi, CPLEX and OR-Tools (GCO) interface to formulate mixed-integer-programming models. Recently, I have discovered MiniZinc and want to utilize it to formulate big ...
1 vote
1 answer
115 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$...
1 vote
2 answers
221 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}\...
1 vote
2 answers
102 views

Modeling of a special form of the precedence constraint

There exists a scheduling problem in which some tasks should be processed on some resources. Additionally, each task needs to be assigned to a specific position on each resource. Let the decision ...
4 votes
1 answer
318 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 ...
3 votes
2 answers
148 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 ...
7 votes
2 answers
395 views

Can QUBO solve this inverse Ising problem?

Inverse Ising Problem The inverse ising problem means fitting the coupling $J_{ij}$ and field $h_{i}$ parameters given a sample of configurations of spins. Each spin $s_{i}$ is either +1 or -1. The ...
0 votes
1 answer
104 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 ...
0 votes
0 answers
35 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 ...
2 votes
1 answer
78 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 ...
2 votes
1 answer
99 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/...
7 votes
1 answer
624 views

How can one model a binary variable?

I am looking for the formulation of a constraint that does the following. I want to introduce a new binary variable $\kappa_{it}$ that takes the value 1 if the sum of the other binary variable $\...
1 vote
1 answer
123 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 ...
1 vote
1 answer
356 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 ...
2 votes
1 answer
78 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} $. ...

1
2 3 4 5
12