# 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.

537 questions
Filter by
Sorted by
Tagged with
1 vote
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 ...
1 vote
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 ...
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 ...
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 ...
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 ...
68 views

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 ...
30 views

...
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/...
1 vote
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 ...
1 vote
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 ...
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}$. ...
1 vote
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 ...
1 vote
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 ...
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....
1 vote
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: ...
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 ...
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 ...
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 ...
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 ...
1 vote
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 ...
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 ...
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 ...
1 vote
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 &...
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 ...
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, ...
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 ...
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, ...
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 ...
1 vote
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 ...
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 ...
116 views

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: ...
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 ... 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 ...
1 vote
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 ...
284 views

1 vote
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 ...
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 ...
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 ...