Questions tagged [mixed-integer-programming]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
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 ...
liam shan's user avatar
3 votes
2 answers
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,...
cholo14's user avatar
  • 233
2 votes
2 answers
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 ...
Daniel Baquero's user avatar
-1 votes
2 answers
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 ...
Waldo's user avatar
  • 19
0 votes
0 answers
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 ...
Abde's user avatar
  • 81
0 votes
1 answer
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 ...
Sam's user avatar
  • 67
0 votes
2 answers
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 ...
Abde's user avatar
  • 81
0 votes
1 answer
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$ ...
Libra's user avatar
  • 937
2 votes
0 answers
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 ...
Allen Zhang's user avatar
4 votes
1 answer
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$). ...
Carol Eisen's user avatar
1 vote
0 answers
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 ...
jbuddy_13's user avatar
  • 519
0 votes
1 answer
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 ...
Kim's user avatar
  • 1
1 vote
0 answers
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 ...
Pia MiA's user avatar
  • 392
2 votes
2 answers
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$...
A.Omidi's user avatar
  • 8,642
3 votes
1 answer
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 ...
Steven01123581321's user avatar
-2 votes
1 answer
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 ...
brtin_'s user avatar
  • 19
1 vote
1 answer
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 ...
brtin_'s user avatar
  • 19
2 votes
1 answer
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 ...
Steven01123581321's user avatar
0 votes
0 answers
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 ...
Margi Shah's user avatar
3 votes
1 answer
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 ...
John D's user avatar
  • 199
3 votes
1 answer
129 views

Gamma uncertainty set

I am new to the concept of robust optimization. I am currently trying to use a gamma uncertainty set (Bertsimas and Sim, 2002) for the following scenario. Suppose we have a constraint of the form $\...
Pia MiA's user avatar
  • 392
3 votes
1 answer
62 views

Identifying worst case of realized uncertainty

I have a MILP formulation where one of the parameters in the constraints is unknown but comes from a know uncertainty set (Robust Optimization approach). As far as I researched the first step for ...
Pia MiA's user avatar
  • 392
1 vote
1 answer
73 views

How to mathematically model this vehicle routing with pickup and deliveries problem?

I have this problem right here There are N passengers whose are at places 1,2,...,N respectively. The i-th passenger, who is currently at place i, wants to go to place i+N. There are K buses are ...
duyanhhz's user avatar
3 votes
3 answers
623 views

Modelling if elif else conditions as MIP

I have 4 variables. Xl6, Xs6, Pl6, Ps6. I have a constant C as well. Xl6 and Xs6 are binary whereas Pl6 and Ps6 are integers. Also, all variables can take only positive values. I have to implement ...
mufassir's user avatar
  • 201
2 votes
0 answers
49 views

A 'capacitated' VRP model where the capacity constraint is the time

I am trying to model a capacitated VRP model where the capacity is defined by the time the vehicle is available. What I have: List of vehicles available and the time for which they are available List ...
Shibaprasad's user avatar
2 votes
2 answers
116 views

constraint set for a scheduling problem with machine availability

I have a set of tasks $I$ with processing times $p_i, \forall i \in I$. There exists a set of machines $M$ and each machine has availability time ranges in a given time horizon. For instance, given a ...
ball_jan's user avatar
  • 157
3 votes
1 answer
103 views

Modelling Question

Let $W^C_t$, $W_t$ be binary variables and $p$ an integer variable with $1 \leq p \leq 3$ The variables are related through the following equation: $$W^C_t = \sum_{\theta=1}^{p} W_{t-\theta}$$ I can ...
Clement's user avatar
  • 2,224
-1 votes
2 answers
90 views

How to apply smooth approximation to non-linear complementarity constraints?

$P =$ $ x, if U \geq U^{max} $ $ y, if U^{up} < U < U^{max} $ $ z, if U^{down} < U < U^{up} $ $ \alpha, if U^{min} < U < U^{down} $ $ \beta, if U \leq U^{min} $ Where $P$, and $U$ ...
Ghulam Mohy-ud-din's user avatar
6 votes
2 answers
242 views

Robust optimization for IP formulation

I am researching the robust version of a problem. I have managed to produce an Integer programming formulation which solves the problem with perfect knowledge. From my research on the topic one can ...
Pia MiA's user avatar
  • 392
5 votes
2 answers
137 views

Number of simple cycles on the graph

I would like to know if there is an efficient way to formulate simple cycles on the Graph/Digraph. Let's say, there is a grid-form graph for which each vertex is only connected to a limited number of ...
A.Omidi's user avatar
  • 8,642
1 vote
1 answer
109 views

How to model this problem with multiple objectives?

This question is related to How to deal this L0 norm of a vector of L2 or L1 norms in objective? I have an optimization variable denoted as ${\bf A\in\mathbb{C}^{100\times 5}}=\begin{bmatrix}{\bf a}_1&...
KGM's user avatar
  • 2,211
6 votes
2 answers
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 ...
Kuifje's user avatar
  • 13.2k
2 votes
0 answers
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 ...
orpanter's user avatar
  • 517
3 votes
2 answers
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 ...
KGM's user avatar
  • 2,211
6 votes
2 answers
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$ ...
user avatar
1 vote
1 answer
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 ...
jbuddy_13's user avatar
  • 519
1 vote
1 answer
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\...
KGM's user avatar
  • 2,211
3 votes
1 answer
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++ ?
Brown's user avatar
  • 173
2 votes
3 answers
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?
user9050's user avatar
  • 119
2 votes
1 answer
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-...
jbuddy_13's user avatar
  • 519
6 votes
2 answers
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 ...
CHE's user avatar
  • 113
4 votes
2 answers
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 ...
jbuddy_13's user avatar
  • 519
2 votes
2 answers
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. ...
Laura's user avatar
  • 79
5 votes
1 answer
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 ...
graphtheory123's user avatar
5 votes
1 answer
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 ...
dhfg's user avatar
  • 53
2 votes
1 answer
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 ...
KGM's user avatar
  • 2,211
3 votes
1 answer
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$, ...
jbuddy_13's user avatar
  • 519
1 vote
0 answers
57 views

How to avoid complementarity constraints in continuous nonlinear program?

In my two-stage continuous NLP problem, I have a constraint in second stage: $X_{g,k}$ = $X_{g,0} + a_{g} d_{g} $, if $X_{g,k} \in [X_g^u,X_g^l]$ $X_{g,k} = X_g^u$, if $X_{g,k} \geq X_g^u$ $X_{g,k} ...
Ghulam Mohy-ud-din's user avatar
5 votes
2 answers
272 views

Adding linear penalties for multiple assignments

I have a multiple assignment problem, with an added cost for "repeat assignments". For example, consider the cost matrix: ...
Him's user avatar
  • 153
1 vote
2 answers
177 views

How to express this constraint efficiently?

Let, $\mathcal{C}=\{1,2,\cdots,C\}$, $\mathcal{U}=\{1,2,\cdots,U\}$ $\mathcal{S}_u$ is a subset of $\mathcal{C}$ with $u\in \mathcal{U}$ $d_{u,c}$ is a binary variable with $u=1,2,\cdots,U$ and $c=1,2,...
KGM's user avatar
  • 2,211

1
3 4
5
6 7
20