# Questions tagged [mixed-integer-programming]

For questions about mathematical optimization problems involving both continuous and binary or general integer variables.

961 questions
Filter by
Sorted by
Tagged with
1 vote
60 views

### bi-objective mixed integer linear programming (MILP) problem

I have a bi-objective mixed integer linear programming (MILP) problem, which contains two specially sub-objective functions. The first linear objective function, only contains integer variables, while ...
260 views

### Reformulate bilinear binary constraint

I'm a solving a model that has the following constraint: $$c_{p,n} = \sum_{s\in S}\sum_{i \in \{1,2,3\} } x_{p,s,i-1} x_{n,s,i}, \forall (p,n) \in C$$ where both the $c$ and $x$ variables are binary,...
• 233
64 views

### How to restrict the amount of consecutive assignments

I'm working on a scheduling/rostering problem. In this scenario the shifts are predefined with a starting and ending date and time. The problem basically assigns people to shifts with a binary ...
148 views

### Reformulate this constraint optimization problem such that I do not have to divide 2 variables?

I have a constraint optimization problem as follows: I need to assign $m$ tasks to $n$ days, with $n \geq m$. Each day can host 0 to $m$ tasks. Each task either belongs to type $A$ or $B$. I want to ...
• 19
66 views

### Gurobi-Python, unmet demand of customers

I would like to capture the unmet demand by modeling the following constraint with two decision variables. where $QU_{wc}$ is the unmet demand and $QW_{wc}$ the shipped amount of products. I model the ...
• 81
184 views

### Converting a piecewise function to a linear equation as a constraint

The value of one of the variable of my model (alpha_1) is given by a piecewise function. Each element of the piecewise depends on the value of some other binary decision variables (X1, x2, x3). I'd ...
• 67
169 views

### Modelling with Gurobi-Python a Supply Chain Problem

I would like to write the following simple model in GurobiPy, which is part of many terms that's belongs to the objective function, I assumed that I have three suppliers are selected and three ...
• 81
67 views

### Maximization problem with preferences on variables

Consider the following trivial, theoretical model: $$\max x+2y+3z \qquad s.t.$$ $$x \leq b_x$$ $$y \leq b_y$$ $$z \leq b_z$$ $$x+y+z = 1$$ $$x,y,z \in \{0, 1\}$$ and $b_x$, $b_y$ and $b_z$ ...
• 937
75 views

### How to rewrite a constraint with sum of convex and concave components to satisfy DCP rule?

suppose that decision variable is X with N dimensions, and one type of the constraint is ...
233 views

### Solver for quadratically constrained mixed-integer linear programs

I have an optimization problem with vectors $x$, $y$, and $z$, where $x$ is an integer vector. My objective function is linear (i.e. $\|y\|_1$), but one of my constraints is quadratic ($x^Ty \leq z$). ...
• 213
1 vote
132 views

### How can mixed integer linear programming be used to optimize portfolio allocations?

I’m curious if MILP can be used to optimize portfolio allocations and what inputs, outputs, variables, constraints and objectives are relevant. For example, is a stock’s average price and variance of ...
• 519
98 views

### Meaning difference between SUMMATION and not in the MIP model

I'm asking you a question because I was confused about MIP while reading the paper. This paper is about dual crane optimization. In the MIP model of the paper, equations (7) and (8) are used to model ...
• 1
1 vote
37 views

### Budgeted uncertainty on the RHS

Suppose we consider budgeted uncertainty (Bertsimas and Sim, 2002) for the following scenario. We have a binary decision variable $x_{i,j}$, where $i \in I$ and $j \in J$ (two sets). We then have the ...
• 392
238 views

### Linearizing a disjunctive expression into MILP

I want to linearize the following disjunctive form. $$\left[\begin{gathered}w_{1}\\x \geq a\end{gathered}\right] \vee \left[\begin{gathered}w_{2}\\x \geq b\end{gathered}\right]$$ where $w_1$ and $w_2$...
• 8,642
175 views

### Modelling a decision variable as an index of a (fixed) set

I'm trying to model the following MINLP problem in Pyomo. We are trying to minimize a nonlinear objective function $f$ in $x_i \in \lbrace{0, 1, 2\rbrace}$ for $i= 1, 2, \dots, N$ and subject to a ...
• 1,043
73 views

### Mixed Integer programming - Problem modelling coincidence restriction in scheduling match problem

I am trying to model and solve a problem for maximize audience of matches that must be scheduled in different slots (I am using python PulP library). Below I explain the problem and the model process ...
• 19
1 vote
146 views

### Mixed Integer Programming - How to model objective function with variables that depends on the solution? [duplicate]

I am modelling an optimization problem that is described as follows: I would like to maximize audience for scheduling matches. There are n eligible teams and n/2 different slots. Teams will only play ...
• 19
291 views

### Implementing a MINLP problem in Pyomo: giving an infeasible solution

I'm trying to implement a MINLP problem which is described in a previous post here: How do we formulate a problem where the decision variable has an index that is also a decision variable? The only ...
• 1,043
64 views

### Creating a simple class in python for doing simulation of MDP

I am currently learning Python and doing object-oriented programming. I am trying to create a simulation for MDP. My problem statement is: "I have four stages of process. Each stage has two ...
537 views

### Of what size should I expect to be able to solve an integer linear program with Pyomo?

So I am solving a purely integer linear optimization problem with Pyomo on a single computer (core i-5, 12 GB RAM). The problem has around 10000 variables and 300 constraints. For doing this, I am ...
• 199
129 views

• 2,211
255 views

### How to partition a giant tour into feasible routes?

In vehicle routing problems, the route first cluster second approach starts by computing a "giant" TSP tour (which typically does not satisfy all constraints of the problem), and then ...
• 13.2k
81 views

### Branching the product of binary and continuous variable in Gurobi

I have a binary variable (X) multiplying a continuous variable (Y). I know I can linearize by adding an auxiliary variable (I have that model working), but I now want to do my own branching in the ...
• 517
125 views

### How to linearize or fix this disciplined convex programming error?

How can I linearize this constraint $$d_{u,c}\sigma \le \|{\bf f}_{u,c}\|^2\le Td_{u,c}$$ $\sigma$ is a very small number based on scale of $f$ $T>0$, ${\bf f}_{u,c}$ is optimization variable, a ...
• 2,211
495 views

### Is this constraint with an indicator function nonlinear?

We have two variables $x\geq0$ and $y\in\mathbb{Z}^{0+}$. We have this constraint in our model $$x = \sum_{i = 0}c_i \mathbb{1}_{\{y=i\}}$$ where $c_i$ is a parameter and $\mathbb{1}_{A} = 1$ if $A$ ...
1 vote
78 views

### MILP: Substituting products with additive logarithms

I would like to linearize a product, for example $a*b$. if I solve my solution in log space, I can formulate it as $a+b$ and when my final output is returned, remember to convert back to original ...
• 519
1 vote
143 views

### How to model this constraint? [duplicate]

I have a system with $C$ machine and $U$ users. The decision variables are $d_{u,c}$ and ${\bf f}_{u,c}$ with $c=1,2,\cdots,C$ and $u=1,2,\cdots,U$, where $$d_{u,c}\in\{0,1\}$$ {\bf f}_{u,c}\in\...
• 2,211
147 views

### How to remove a callback that was previously registered in Julia?

I'm coding in Julia, how can I do the same as "Remove(Cplex.Callback)" function does in C++ ?
• 173
311 views

### How can I extract the .lp or .mps version of this (Rubik's cube example)

https://cw.fel.cvut.cz/b192/_media/courses/ko/ilp_rubik.pdf In pages 5-6 this example solves a cube with Gurobi. I don't have Gurobi but I'd like to get .lp or .mps version for my own testing?
• 119
71 views

### Articulating categorical soft constraints in MILP

I'm curious how is the best way to articulate a soft, categorical constraint for MILP solvers. In example, say that there are two sizes of t-shirts, small and large. Likewise, people have ideal t-...
• 519
214 views

### Cover cuts for knapsack constraint with integer variables

It is known for knapsack type constraint $\sum_{i \in N} a_i x_i \leq b , x \in \{0,1\}$, we can generate the so called cover cuts that have the sum of coefficient in a set C greater than b. The cover ...
• 113
245 views

### XPRESS variables as indices for mixed integer linear programming

Can XPRESS variables not be used as indices to retrieve other XPRESS variables. In Python, for example, say that I have a list of XPRESS variables, each which can take on values (0->24). I'd like ...
• 519
206 views

### How to model not-met demand to next period?

I am trying to include to my model a demand shift. That is, I am having a fixed demand for each period (t), but because of capacity constraints I am not able to serve the whole demand for each period. ...
• 79
828 views

### How many variables and constraints can modern mixed integer programming solvers handle?

I originally asked a question here and they suggested that I crosspost it to the OR stack exchange, so that is what I am doing (hopefully correctly?). Here is the question I asked there: "I know ...
234 views

### Summation of Binary Variables Pushing a Binary Variable

I'm modeling a problem where I have a set of binary decision variables $x_{ij}$ that has a value of 1 if the person $i$ is allocated to day $j$ or 0 otherwise. I have another set of binary decision ...
• 53
113 views

### How to mathematically model this multi-objective optimization problem?

I have a system of $M$ machines and $U$ users. Each machine has a capacity in terms of number of resources. Let, machine $m$ has $\zeta_m$ resources. Each user has a service demand $d_u$ and there is ...
• 2,211
128 views

### Expressing $\{0,1\}$ assignment across a matrix in MILP?

I have a MILP (Xpress) constraint, which is doing what I want it to, but I'm struggling to translate it into a LaTeX friendly mathematical expression. The below code enforces that in the matrix $V$, ...
• 519
1 vote