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
1answer
171 views

How to mathematically formulate the optimization problem?

I have a system with $S$ service points. There are also $U$ users in the system. The service points as well as users need to be grouped in $G$ non overlapped groups. Therefore, one user/service point ...
4
votes
1answer
89 views

How to treat a system of bilinear constraints

A model contains constraints of the following form $R(k) \leq X(k) G(k)$ where $X(k)$ binary and $G(k)$, $R(k)$ non-negative variables. The index $k$ runs from $1$ to $50$. I linearise the equations ...
12
votes
6answers
855 views

Where can I find documentation on good practices for efficient formulations of a problem?

I am sort of new to mathematical optimization and have to build some fairly complicated models for my thesis. I was wondering where I could find literature to help me develop more efficient versions ...
2
votes
1answer
49 views

Constraints that set values to binary variables depending on other binaries

I am trying to write a mathematical problem that involves some conditions based on binary variables. More specifically, I have a set of three binary variables $d_1$, $d_2$, $d_3$ and depending on ...
2
votes
2answers
75 views

Modelling precedence relations

I have two tasks $i$ and $k$ with durations $d_i$ and $d_k$, where $d_i$ and $d_k$ are nonnegative variables. I would like to model that $i$ may precede $k$ or $k$ may precede $i$ and that they may ...
4
votes
1answer
171 views

Assignment problem with batching costs

I am studying an assignment problem with batching costs, and I would like to know if there is a standard name or algorithm for this problem. I know this problem can be formulated as mixed-integer ...
1
vote
1answer
121 views

Non-linear optimization local or global solution

In an NLP, I have a constraint that I would like to formulate in a convex manner preferably without introducing binary variables and/or big M formulations if possible. The actual problem is non-convex ...
2
votes
1answer
58 views

How does the RCPSP's precedence constraint work?

In [1] the authors define the RCPSP (resource-constrained project scheduling problem) as follows: minimize $$ \sum_{t} t x_{n t} $$ subject to $$ \begin{array}{c} \sum_{t} x_{j t}=1, \quad j \in J, \\ ...
0
votes
2answers
250 views

How to model y = floor(x)?

I went through the answers to this question: Modeling floor function exactly, but I still do not get how to model y = floor(x). Is that question answered and I just ...
3
votes
1answer
145 views

Oscillations with (online) mixed-integer optimization problem

I have the following mixed-integer optimization problem: \begin{aligned} \max_{x,y} \quad & \sum_i x_i - \|wx\|_2 \\ \text{s.t.} \quad & \sum_i x_i \leq A \\ \quad & x \leq x_{\max} y \\ ...
-4
votes
0answers
40 views

What will be an efficient heuristic approach for this optimization problem

I am looking for a heuristic approach to this optimization problem. How to mathematically formulate the optimization problem? RobPratt suggested an mathematical formulation for this problem which is ...
4
votes
2answers
184 views

Mixed-integer optimization with bilinear constraint

So I have an optimization problem of the following form: \begin{aligned} \max_{x,y} \quad & \sum_i x_i \\ \text{s.t.} \quad & \sum_i x_iy_i \leq a \\ \quad & x_{\min} \leq x \leq x_{\max} ...
2
votes
3answers
118 views

Linearizing a Max Function in the constraint - not working

I have a minimization function which is in its simplest form looks like below. I am including the index of the variables. ...
3
votes
1answer
152 views

Linearizing a quadratic function with more variables or not in Gurobi?

Suppose I want to set the price $0 \le p_t \le p_{max} $ and based on the price, demand is determined $D_t(p_t)=a-bp_t$. Inventory level at each time is denoted by $I_t$ and it is determined by $I_t= ...
2
votes
1answer
64 views

Impose binary constraint on integer matrix with CVXPY

So I have the following matrix: \begin{equation} P_{i,j}= \begin{bmatrix} x_0 & x_1 & x_2 \\ y_0 & y_1 & y_2 \\ z_0 & z_1 & z_2 \end{bmatrix} \end{equation} where ...
3
votes
1answer
61 views

Clustering problem involving multidepots and customers requiring commodities located exclusively in an specific depot

I'm trying to solve a clustering problem that's similiar to a VRP Pickup and Delivery problem with multiple depots and customers. Each customer demands a commodity that is exclusively found on one ...
2
votes
1answer
237 views

How can I convexify (allowed some approximation) the objective function?

I have a known matrix, $H$ of size $U\times B$. The optimization variable is $D$ of same size, which is binary Now I have $$S_u=\frac{\sum\limits_{b=1}^{B} D_{u,b}H_{u,b}}{\sum\limits_{b=1}^{B}H_{u,b}-...
1
vote
0answers
65 views

Strange Result from GurobiPy

I am trying to understand why GurobiPy gives me a strange result for a simple linear programming model coded as below? Why is the optimality gap is 0%? Please let me know if you spot any errors in the ...
6
votes
2answers
157 views

Index of element in MILP vector decision variable that equals 1

Consider a decision variable in a MILP constrained: $$\sum_i p_i = 1$$ $$p_i\ \in \{0, 1\}$$ Obviously one element in $p$ is 1 and all others are 0. How can I set a decision variable to the index i of ...
1
vote
1answer
185 views

Linearize x different of y in ILP

I am surprised I couldn't find an already written answer for my question in the internet. I want to linearize $x$ different of $y$ for two nonegative integer decision variables. I am not considering ...
0
votes
1answer
70 views

Mixed Integer Programming - How to model the dependency of two variables in an objective function

I have two variables $a$ and $b$, in which $a$ is the amount of goods and $b$ is the amount of boxes of the given sizes. So $b$ (box size + number) is dependent on a (goods quantity). If $a$ is ...
0
votes
0answers
75 views

Mixed Integer Programming - Model Formulation for A Resource Allocation Problem

There are a number of orders, which needs to be shipped. For each order, there may be 1 to 3 route options. The problem here is to find out the best allocation (combination) of orders among these ...
1
vote
1answer
118 views

MILP constrained by the minimum number of satisfied constraints

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$. $$ \...
2
votes
1answer
43 views

How to define a stationary point of the MINLP problem?

As we all know, KKT point and stationary point are well defined when the optimization variables are continuous in the problem. Now, I want to know whether there exist some special points except for ...
4
votes
3answers
123 views

Optimization formulation has slow performance

I am formulating and solving a scheduling problem. The problem consists of scheduling items on a single machine, where the only time element is the transition from item $i$ to item $j$. For example, ...
3
votes
1answer
46 views

How to assign task, resources to trips

In a scheduling problem I want to assign the resources to tasks, each task has earliest start date, latest start date and duration. Also each resource has fixed number of available hours in a day. The ...
3
votes
0answers
39 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 ...
12
votes
3answers
1k views

How to model a mixed-integer linear programming formulation in Python using Gurobi?

I can remember that I spent some time in understanding how to formulate my first model. So I aimed at presenting a complete model here, wishing to save some time for students or researchers needing it....
0
votes
1answer
103 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 ...
1
vote
1answer
87 views

How to transform this problem with logarithmic objective function into an approximated convex optimization problem?

I have an objective function as follows $\underset{x_{m,n}}{\max}\hspace{1mm}\hspace{1mm}\sum_{m=1}^{M}\log_2\left(\frac{\sum_{n=1}^{N}(1-x_{m,n})\omega_{m,n}+z}{\sum_{n=1}^{N}x_{m,n}\omega_{m,n}}\...
0
votes
1answer
76 views

How to linearise this nonlinear constraint?

I have a constraint in the form $\sum_{n=1}^{N}x_{m,n}\omega_{m,n}\ge (t_u-1)\beta_u, \forall u, u=1,2,\cdots, U$ where $x_{m,n}$ is binary variable $t_u$ and $\beta_u$ are continuous optimization ...
0
votes
0answers
74 views

MILP formulation for “if (a>=b) then c=1, 0 otherwise”

I need to build a MILP (Mixed integer linear programming) constraint form this if-else statement. In my formulation a and b are two continuous variables and c is boolean. if (a >= b) then c = 1, 0 ...
1
vote
1answer
86 views

How can I linearise this nonlinear proportional relation constraint?

My optimisation problem has a constraint in the form \begin{equation} \begin{array}{*{35}{l}} \text{}\hspace{16.5mm}\text{ C4:} \hspace{2mm}\sum_{u=1}^U d_{u,1}L_{u}:\sum_{u=1}^U d_{u,2}L_{u}:\cdots:\...
5
votes
3answers
1k views

How does a solver generally know whether a solution is optimal?

I was wondering how does the solver for a MILP determine whether a solution is optimal. I am having a hard time to believe that the solver actually tries all solutions, since in some cases I have over ...
0
votes
1answer
43 views

How can we understand which solution approach is suitable for our mathematical problem?

I'm looking for a solution approach for my MIP model, but I couldn't find any specific books about this issue whose solution approach is suitable for my model. There are a lot of exact, heuristic or ...
3
votes
2answers
147 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 ...
1
vote
1answer
108 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 ...
5
votes
2answers
616 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 ...
2
votes
2answers
288 views

Cutting Stock Problem : Mixed Integer Programming

I am asked to solve the following problem: The problem: You were asked to repair a farm house with sheets of plywood. You were given thirty sheets of plywood. (each size = 10ft x 10ft) The house ...
-3
votes
1answer
99 views

is this a mistake or not in this tutorial?

Please consider https://stoprog.org/what-stochastic-programming and look at "A SIMPLE INTEGER RECOURSE MODEL" at "Stochastic Integer Programming" section. Should not $b_i$ be $...
3
votes
0answers
55 views

Solving a nonlinear model with constraints of exponential functions and continuous variable multiplications

I have a nonlinearly-constrained model and wonder if a nonlinear solver like Ipopt or Knitro can solve the problem. Briefly, my objective function is linear. I have the following variables with their ...
5
votes
0answers
54 views

Reference request — fishery yield optimization

I'm looking for references to do a review of research on managing fisheries in industry. I've seen adaptions of population growth models which include some harvesting constant or function and was ...
3
votes
0answers
32 views

PuLP Python: How to linearize an inequality involving an integer variable

I am working on a Copper payables problem where the objective function is to maximise the sum of copper payable over a time period, T. The total amount of payable tonnes i.e. what the customer will ...
1
vote
1answer
60 views

How define variable in CPLEX and What is diffrence between decision variables and variable in CPLEX

I want to code a problem by CPLEX, in this problem I have variables and decision variables, how define them? In this picture you can see the variables: which we have: I use these codes for variables:...
2
votes
1answer
59 views

Generating a different optimal solution from CPLEX for each run

I recently chanced upon the idea of solution diversity through the setting of random seeds within CPLEX. However, the documentation page on the settings does not shed any light with regard to the ...
2
votes
1answer
106 views

How can I have minimum amount of resources wasted in this resource allocation problem?

I have a demand, $d$ I also have supply from 1000 sources. The supplies from those $N$ (for example, $N=1000$) sources are given by $s_1,s_2,s_3,\cdots,s_N$. So,the total supply is : $s_1+s_2+\cdots+...
1
vote
1answer
78 views

Coding the OR problem with cplex

I am new to using OPL. I wrote a CPLEX code for the vaccine distribution from a paper, it doesn't get an error, but it hasn't given the answer. I don't know its problem; please help me; I attached the ...
4
votes
3answers
148 views

How can I find the optimal assignments for this MILP problem heuristically?

I have an assignment problem as follows $\begin{equation} \begin{array}{*{35}{l}} \underset{d_{u,c}}{\max}\hspace{1mm}\hspace{1mm}\sum_{u=1}^{U}\sum_{c=1}^{C}d_{u,c}\omega_{u,c}\\ \text{}\text{...
4
votes
2answers
210 views

Two-Objective Optimization in CPLEX

Until now, I used CPLEX to solve single-objective optimization problems only, but now I need to solve a two-objective mixed-integer linear optimization problem and I noticed that CPLEX 12.6.9 (unlike ...
6
votes
1answer
1k views

What are good reference books for introduction to operations research?

The reference books should cover the wide range of problem-solving techniques and methods.

1
2 3 4 5
8