5.6.1. Modeling for Mixed Integer Quadratically Constrained Programming¶
A Mixed Integer Quadratically constrained program (referred to as MIQCP for simplicity) can be represented as follows:
- where
\(x \in \mathbb{R}^{n}\) is the decision variable,
\(l^c \in \mathbb{R}^{n}\) and \(u^c \in \mathbb{R}^{n}\) are the lower and upper bounds of \(x\),
\(c^f \in \mathbb{R}\) is the constant term in the objective function,
\(c \in \mathbb{R}^{n}\) is the linear coefficient in the objective function,
\(Q_0 \in \mathbb{R}^{n\times n}\) is the quadratic coefficient matrix in the objective function,
\(\{a_i \in \mathbb{R}^{n}\mid i=1,2,\cdots,m\}\) are the linear coefficient vectors of the constraints,
\(\{Q_i \in \mathbb{R}^{n\times n}\mid i=1,2,\cdots,m\}\) are the quadratic coefficient matrices of the constraints,
\(l^r \in \mathbb{R}^{m}\) and \(u^r \in \mathbb{R}^{m}\) are the lower and upper bounds of the constraints,
\(x_k \in I\) are integer variables.
Note
Currently MindOpt supports solving convex Mixed Integer Quadratically Constrained Programs. Specifically:
The objective quadratic matrix \(Q_0\) must be positive semi-definite.
Each quadratic constraint must define a convex feasible region. MindOpt automatically recognizes convexity in the following cases:
For constraints of the form \(x^\top Q_i x + a_i^\top x \leq u_i^r\), the matrix \(Q_i\) must be positive semi-definite.
For constraints of the form \(x^\top Q_i x + a_i^\top x \geq l_i^r\), the matrix \(Q_i\) must be negative semi-definite.
For constraints of the form \(x^\top Q_i x + a_i^\top x \leq y^2\), the matrix \(Q_i\) must be positive semi-definite, and y is nongative variable (a second order cone constraints, if \(Q_i = I\) indentity matrix)
For constraints of the form \(x^\top Q_i x + a_i^\top x \leq yz\), the matrix \(Q_i\) must be positive semi-definite, and y and z are nongative variables (a roated Second Order Cone constraints, if \(Q_i = I\) indentity matrix)
We follow the steps below to use MindOpt :
Create an optimization model;
Input the optimization problem and set algorithm parameters;
Solve the optimization problem and retrieve the optimal solutions.
Note
MindOpt only stores the non-zero elements in the constraint matrices A and \(Q\). Therefore, we only need to input the positions and the values of the non-zero elements during the modeling process.
5.6.1.1. Example of Mixed Integer Quadratically Constrained Programming¶
In the following, we consider two example of Mixed Integer Quadratically Constrained Programming problem:
5.6.1.1.1. MIQCP Example I¶
5.6.1.1.2. MIQCP Example II¶
We will provide example codes illustrating how MindOpt models and solves the above MIQCP problem in different programming languages.