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

268 questions
Filter by
Sorted by
Tagged with
103 views

### Best way to add dummy to transportation problem? Zero cost will be always chosen first?

I know that an unbalanced transportation problem could be made a balanced transportation problem by adding a dummy node which equals the difference between demand and supply. In literature, dummy ...
32 views

### Probabilistic model

Given that the demand for a commodity typically occurs every day from 7:00am to 2:00pm after which this commodity is no longer demanded and can only be disposed of at a cost to the seller. Given that ...
128 views

### How can I strengthen a family of constraints in the presence of a clique constraint?

Suppose $x_i$ are binary variables, $y_j$ are arbitrary variables, $a_j$ and $b$ are constants, and I have the following linear constraints: \begin{align} x_i + \sum_j a_j y_j &\le b &&\...
104 views

### Problems modeling a constraint in network design problem

I'm working on a network design problem where the objective is to minimise the network design cost. Given a graph G = (V, E) and a set of point-to-point demands K, the task is to route the demands and ...
109 views

### How to partition a graph with optimal number of groups?

I have a graph with $N=12$ nodes. Some nodes may not have any edge between them. every edge has a weight. How to find the optimal partitioning of the graph so that total weight in the system is ...
372 views

### Column generation for TSP

For teaching purposes, I would like to solve the Travelling Salesman Problem with a column generation approach. In the academic literature, an approach is proposed (for example here), where columns ...
48 views

### Model definition in pyomo to solve online optimization problem

I am trying to model the attached online optmization problem in pyomo. Eventually, I am going to use the octeract solver to find the matrix soluions of W and G. I would like to ask advice about ...
231 views

### Effect of 'unused' variables on the result and runtime of optimization algorithms

I have a general question about the effect of 'unused' variables on the result and runtime of optimization algorithms. I try to explain my question by giving an example. Let's say I have 2 type of ...
152 views

### How to model this multi-commodity flow problem with a twist?

Problem description I am working on a variation of the multicommodity flow problem on a graph $G=(V,E)$. I have requests $r_{uv}$ for pairs of nodes $(u,v), u\in V, v\in V$, which means that $r_{uv}$ ...
64 views

### Obtaining linear relaxation objective value from MILP model coded in Pyomo

I would like to seek some advice on modeling the following: I am currently using Pyomo to generate my MILP model in Pyomo. It seems that it is not possible to cast the integer and binary variables to ...
121 views

### Setting up Branching Priority for GUROBI in Pyomo

I am currently experimenting with GUROBI and would appreciate some kind advice on the following: In Pyomo: Setting variable branching priorities, there was a response to doing so for CPLEX, hence I ...
63 views

### Finding the minimum of a group of timings

I would like to seek some modeling advice on the following: Say for instance I have 5 nodes representing workstations of the operation of 5 jobs, and that I have less than 5 vehicles. Say I have two ...
393 views

276 views

### OR-TOOLS : delivery node with multiple possible pickup nodes

I am using ortools to model a VRP with pickup and delivery constraints, where pickups can be done at different nodes. For example, if node A has a demand, it must be picked at node B or C. Here is how ...
150 views

### Does dispersion really matter?

Context: Given a counting process $\{N(t),\,t\ge 0\}$ which tracks the number of events (arrivals) by time $t$, the index of dispersion (for counts) is the variance-to-mean ratio of the cumulative ...
46 views

### Can I define constraints in Pyomo as a list?

I would like to define the following constraint in Pyomo $$W^\top{\bf 1}\le\hat w=\begin{bmatrix}\hat{w}_1&\hat{w}_2&\ldots&\hat{w}_N\end{bmatrix}^\top$$ where $W$ is a $2\times4$ matrix. ...
23 views

### Correct way to define constraints in Pyomo

Can I know if the constraint below can be defined as follows in Pyomo for convex optimization. W and G are arrays of dimension M x N. ...
75 views

### IP model for k-rooted spanning forest

I am looking for an IP model for finding a $k$-rooted minimum spanning forest on an undirected graph $G$. Given a set of roots $R$ and a set of nodes $N$ $(R\cap N=\emptyset)$, I would find a forest ...
312 views

### How can I express this max-min in CPLEX?

Initially, I had the below objective function $\max \sum_{u=1}^{U}\sum_{c=1}^{C}x_{u,c}d_{u,c}$ where $x_{u,c}$ are optimization variables I modelled this in CPLEX as ...
71 views

### How to linearize a max min objective function?

Let us suppose that I have a $\max \min$ objective function that only depends on one set of variables: $\underset{x}\max \underset{y}\min dy$ Associated with the linear set of constraints and right ...
I have an MILP where we have $$t_k = \sum_i P_i\cdot C_{ik} : P_i\ \in \{0,1\}, C_{ik} \in I^+$$ and our model is constrained by the number of times $t_k$ is bigger than a certain value $T_k$. $$\... 0answers 29 views ### How to use NEOS without using Pyomo I am new to modelling language and specifically NEOS server. I aim to solve MINLP using Baron, through the NEOS server. So, far I have been able to write model file, data file and command file as ... 0answers 40 views ### How to formulate a storage component? Let’s say I have a drink for several customers, and I know their demand. Besides, I also have a storage tank for the drink during times when demand exceeds supply. The storage tank's size is not yet ... 0answers 54 views ### How to model non-zero minimum constraint? I found following way to model a minimum constraint but in my case I need a non-zero minimum value. So in this figure, if any value of x_i is 0 then answer is 0 (assume x_i >=0) but I need non-zero ... 1answer 63 views ### Bounding box fusion with constraints I have N bounding boxes that I want to fuse/merge given some constraints. Each bounding box has a label. Goal: The main goal is to minimize ... 1answer 107 views ### Assignment problem with variable tasks to be done I'm dealing with a kind of assignment problem, in which I have a set of tasks t to be executed by machines w, but these tasks depend on the variatns v of components m being selected, which is ... 0answers 60 views ### Excluding non-preferable solutions from a MILP I have a model which delivers the following results (other combinations are also possible, all Xs have 50 as an upper bound): Case I X1 = 50.0 X2 = 13.750 X3 = 50.0 X4 = 50.0 Case II (obtained ... 2answers 428 views ### Modeling a constraint such that a set of binary decision variables do not equate to 1 simultaneously I would like to seek some advice on modeling the following logical condition: I would like to ensure that a group of binary variables do not equate to 1 simultaneously, i.e., \omega_{1}=1, \omega_{2}=... 2answers 220 views ### A relaxed version of job shop scheduling I am working on a formulation for a problem that seems similar to the bin packing problem. My problem variables include items that are to be placed in bins, special events that are conditionally ... 1answer 113 views ### Why some decision variables don't get values in Cplex? I use this code in the cplex and don't know why some decision variables don't get value, I attach my code below. I don't know my model is wrong or my code? I haven't error in the code but have some ... 2answers 632 views ### How to transform this logical if-then constraint? Consider the binary variables x, y, z \in \{0,1\}. I'd like to formulate the two if-then constraints:$$ x + y \geq 2 \implies z = 0, \tag{1}  x + y \leq 1 \implies z = 1. \tag{2} $$Constraint ... 1answer 108 views ### Constraint programming and scheduling issues I have a constraint problem that I need to resolve, but I did not how know to model the problem: I have 11 employees, I will name them from a to k: \{a,b,c,d,e,f,g,h,i,j,k\}. I have a small ... 1answer 95 views ### Solving general minimum cost flow problems using only one demand and one supply node This is a practice in using reduction. Suppose I have a solver that only allows input to a MCF that specifies only one demand and one supply node. How could I use this solver to solve general MCF ... 0answers 36 views ### Hardness Reduction for assigning Users to Servers Suppose there are x servers, and y users. The y users are to be assigned to the x servers similar to classic scheduling problems. The cost of using servers is given by c(|x|) which is an ... 1answer 81 views ### Which is better to minimize w.r.t a lower bound or an upper bound of an objective function? Suppose there is a optimization problem that aims at minimizing an objective function X but we can't develop a mathematical model for minimizing X. However, there are two objective functions Y ... 0answers 102 views ### Production planning for a video game economy I'm a software developer who likes to play a video game that has a complex economy. I realized that the type of problem I'm trying to solve mimics real life operations research problems, and I am ... 0answers 41 views ### The different behavior of the solvers to dial with MINLP problem I have tried to solve an optimization problem (an MINLP) to minimize the number of items which need to be stored. The objective function is as follows:$$\min \quad z = \sum_{i=1}^{n} \, \color{blue} {...
Consider several Integer (0/1) ILP variables, i.e., Boolean variables, $x_i$'s. Consider an ILP constraint $x_1 + x_2 + x_3 \geq 1$ and another constraint $x_4 + x_5 + x_6 \geq 1$. I would like to ...