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

Modelling the last arrival time of allocation decision

I am trying to allocate multiple products to satisfy a demand point over a time horizon. I would like to get the last arrival time as a variable to write further constraints. I decided to edit my ...
whitepanda's user avatar
1 vote
1 answer
76 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
130 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
  • 33
0 votes
0 answers
31 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
69 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? Like I am sure there ...
uni_lad's user avatar
  • 39
2 votes
1 answer
68 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
-3 votes
0 answers
30 views

Scenario-based optimization management of product during production disruption

...
Chitranjan Singh Thakur's user avatar
2 votes
1 answer
91 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
103 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
303 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
74 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,382
1 vote
2 answers
154 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
221 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
75 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
83 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
129 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
  • 163
2 votes
0 answers
57 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
108 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
97 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 vote
2 answers
76 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 ...
Hani Jamshidian's user avatar
2 votes
3 answers
817 views

Modeling: How to force customers visit their NEAREST facility

Let set $I$ denote the facility location set, $N$ denote the customer set, and $d_{ni}, \forall n\in N, i \in I $ is the distance between customer $n$ and facility $i$. The problem is to locate ...
Runfeng Yu's user avatar
2 votes
1 answer
207 views

Compute overlapping time

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 ...
Christopher Expósito Izquierdo's user avatar
1 vote
1 answer
35 views

SET game: how to generate decks of 12 cards with 6 hidden sets?

This question was initially the second part of another question and justifies a new post. The context is a game called Set: In the game, certain combinations of three cards are said to make up a &...
Kuifje's user avatar
  • 12.9k
2 votes
4 answers
114 views

How to fill the days in sequence?

I have a scheduling problem. 20 hours of work load should be assigned to different days (max 4 days are available and the capacity of ech day is 8 hours max) $\sum_i h_i = 20$ $0 \leq h_i \leq 8$ The ...
Optimization team's user avatar
2 votes
1 answer
145 views

SET game: how to generate all sets with a MIP?

I am playing around with the game called Set: In the game, certain combinations of three cards are said to make up a "set". For each one of the four categories of features — color, number, ...
SetPlayer's user avatar
0 votes
0 answers
76 views

Optimize revenue function with log part

I am working on an optimization problem where I aim to maximize revenue. My current model has the following objective function: $$ Sales(P_i) * log(P_i - const_i))$$ where $P_i$ represents the price ...
MarcM's user avatar
  • 163
2 votes
1 answer
95 views

Representing a Multi-Level Categorical Variable using Big-M Method in Linear programming

I'm working with a statistical linear model where I have a variable, ( N ), representing the percentage of charging of a battery. Based on ( N ), I derive another variable, ...
MarcM's user avatar
  • 163
6 votes
1 answer
230 views

Large Language Models for Translating Natural Language to Mathematical Models - Suitable Venues?

I'm currently working on a paper that investigates the capabilities of Large Language Models (like OpenAI's GPT variants) to understand and write mathematical models based solely on natural language ...
Mehdi's user avatar
  • 683
1 vote
3 answers
90 views

Breaking symmetry

Suppose resources r1 and r2 are both able to perform jobs j1 and j2. The duration of the jobs being done is d. I would like to model the following rule: Within a time horizon H, perform j1 on r2 only ...
Clement's user avatar
  • 2,180
7 votes
3 answers
730 views

Binary logical constraint dependent on indices

I don't know if I can ask this here, but I've been pulling my hair out trying to think of how to represent this in constraints. I have two sets of binary variables: $X_t$ and $Y_{it}$. So, I want to ...
orpanter's user avatar
  • 507
3 votes
2 answers
116 views

Coefficient Scaling for MIP

I have a coefficient matrix for an MIP with a less than ideal range of magnitudes. For example, consider this constraint: $$\sum_{ij} {\rm cost}_{ij} \cdot x_{ij} \leq \rm Budget$$ $$x_{ij} \in \{0, 1\...
gomory-chvatal's user avatar
1 vote
3 answers
201 views

MIP constraints with chronological ordering

I am using a MIP formulation to decide which dates and locations (i.e. stops) should be chosen for a route that maximizes the total revenue over all chosen stops. My decision variable $X$ is the ...
3Li's user avatar
  • 35
3 votes
1 answer
102 views

using milp for a linear complementarity problem

I have to minimize $c^Tx$ subject to $Ax = b$, $x_iw_i = 0$ for all $i$, with $x$ non negative continuous and $w$ binary. What model should I use to solve this problem?
fischer justin's user avatar
2 votes
1 answer
347 views

CPLEX violating constraints (CPLEX - version 12.10 - C++)

I'm a researcher and I have a problem with CPLEX. The .lp file containing the model includes the following constraint: 1000000000 x(1,12,0) + T(1,0) - T(12,0) <= 999999992 where x and T are ...
Juliana Dantas's user avatar
3 votes
1 answer
89 views

Modify objective function for equal solution distribution

I have the following question. I have a LP with the objective function. $\max\sum_{i\in I}^{}\sum_{p\in P}^{}sales_{ip}$ Here, the number of sales over all individuals $i$ is to be maximized for all ...
lukdooxb1's user avatar
7 votes
1 answer
612 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 $\...
nflgreaternba's user avatar
2 votes
1 answer
127 views

Conditional constraints in MILPs

I want to understand how to represent iff constraints in MILPs. For example, I want to represent the following as the constraints of a MILP $$ c = \begin{cases} 1 &\text{if } d \geq e \\ 0 & \...
Anonymous Bunny's user avatar
-1 votes
1 answer
78 views

How do I translate the following constraint for gurobi py?

I successfully worked on the problem with following model in Excel, but I have a problem translating it into Python. This is the proposed way to code the problem form the book: ...
Wangcincay's user avatar
2 votes
2 answers
128 views

Transportation Problem

I want to create a transportation model. I have identified importing and exporting countries with their estimated demand and supply. The cost of transportation per one uni is already calculated for ...
user avatar
0 votes
1 answer
181 views

LP - How to model binary variable that indicates a switch

I have the following question / concern. I have a modeling problem with the decision variable $d_{ptm}$ which indicates whether product $p$ was serviced by machine $m$ in period $t$. It takes the ...
marvelfab12's user avatar
1 vote
2 answers
91 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 ...
A.Omidi's user avatar
  • 8,382
3 votes
2 answers
284 views

Modeling a continuous variable which can't take values between a and b

Consider two binary variables $p_1$ and $p_2$. Suppose, $x$ is a continuous variable that should not take values between $a$ and $b$. Here is my try: $$ p_1 =1 \mbox{ if } x \le a \\ p_1 =0 \mbox{ if }...
user11940's user avatar
4 votes
1 answer
85 views

Nurse Rostering constraints - LP

I am fairly new to linear programming since I came across this topic at university this semester. We mainly focus on nurse rostering. In the lecture, we created a very basic rostering model with an ...
nflgreaternba's user avatar
3 votes
2 answers
386 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
171 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
  • 23
0 votes
2 answers
108 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
94 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
82 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
875 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
  • 177
1 vote
2 answers
160 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
  • 33

1
2 3 4 5
11