# 混合整数二次规划

混合整数二次规划（MIQP）是一种优化方法，它在满足线性约束的条件下最小化二次目标函数，其中部分变量必须取整数值，而其余变量保持连续。它介于连续二次规划（QP）与整数线性规划（MILP）之间：它继承了QP的二次目标函数和整数规划的整数性限制，在运筹学、工程学和机器学习中广泛使用，凡决策同时涉及连续量和离散选择（如开/关变量或选择变量）之处，都能见到它的身影。<sup>[1](https://optimization-online.org/wp-content/uploads/2014/07/4446.pdf)</sup><sup> • </sup><sup>[2](https://plato.asu.edu/APM523/cpl_miqp.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 标准形式 | \( \min \; \tfrac{1}{2} x^{T} \cdot Q \cdot x + c^{T} \cdot x \)，约束为 \( A \cdot x \le b \)，其中 \( x \in \mathbb{Z}^{p} \times \mathbb{R}^{n-p} \)<sup>[1](https://optimization-online.org/wp-content/uploads/2014/07/4446.pdf)</sup><sup> • </sup><sup>[2](https://plato.asu.edu/APM523/cpl_miqp.pdf)</sup> |
| 凸性判定 | 一个QP是凸的，当且仅当 \( Q \) 为半正定矩阵<sup>[2](https://plato.asu.edu/APM523/cpl_miqp.pdf)</sup> |
| 复杂度 | 即使目标函数为凸，问题也是NP难的，因为它包含MILP作为特例；连续QP情形（\( p = 0 \)）一般也是NP难的<sup>[2](https://plato.asu.edu/APM523/cpl_miqp.pdf)</sup> |
| 主要求解引擎 | 凸MIQP用带QP松弛的分支定界法；非凸MIQP用带凸松弛的空间分支定界法<sup>[2](https://plato.asu.edu/APM523/cpl_miqp.pdf)</sup><sup> • </sup><sup>[3](https://ar5iv.labs.arxiv.org/html/2010.04822)</sup> |
| 商业求解器 | CPLEX在8.0版（2002年）通过分支定界加入了凸MIQP功能，在12.6版（2013年）加入全局非凸MIQP功能；Gurobi在外逼近法与QCP松弛分支定界之间进行选择<sup>[2](https://plato.asu.edu/APM523/cpl_miqp.pdf)</sup><sup> • </sup><sup>[4](https://arxiv.org/pdf/2303.04216v3.pdf)</sup> |
| 典型嵌入式规模 | 一个时域为10的混合MPC问题有40个变量，其中10个为二进制变量，以及160个线性不等式<sup>[5](https://iris.imtlucca.it/retrieve/handle/20.500.11771/20183/21662/1-s2.0-S2405896318327265-main.pdf)</sup> |
| 近期启发式方法 | 一种Frank-Wolfe原始启发式在MIQP基准上达到平均4.06%的最优性间隙，并在104个算例上证明了最优性<sup>[6](https://link.springer.com/article/10.1007/s12532-026-00340-3)</sup> |

## 工作原理

MIQP是在多面体集合中的点上优化二次函数的问题，其中部分分量为整数、其余为连续，写作 \( \min \; x^{T} \cdot H \cdot x + c^{T} \cdot x \)，约束为 \( A \cdot x \le b \) 且 \( x \in \mathbb{Z}^{p} \times \mathbb{R}^{n-p} \)。<sup>[1](https://optimization-online.org/wp-content/uploads/2014/07/4446.pdf)</sup> CPLEX团队将目标函数写作 \( \min \; \tfrac{1}{2} x^{T} \cdot Q \cdot x + c^{T} \cdot x \)，而一个QP是凸的，当且仅当 \( Q \) 为半正定矩阵。<sup>[2](https://plato.asu.edu/APM523/cpl_miqp.pdf)</sup>

整数性要求使问题在性质上发生了变化。MIQP是NP难的，这一点显而易见，因为它包含MILP作为特例；但与MILP不同的是，它的复杂度并不局限于整数性：连续QP这一特例（\( p = 0 \)）一般也是NP难的。<sup>[2](https://plato.asu.edu/APM523/cpl_miqp.pdf)</sup> 全整数情形即整数二次规划（IQP），众所周知是NP难的；IQP和MIQP的判定版本是NP完全的，其证明方式是证明可行实例存在多项式大小的解。<sup>[1](https://optimization-online.org/wp-content/uploads/2014/07/4446.pdf)</sup> 在实践中，这意味着最坏情况下的求解时间随问题规模指数增长，具有特殊结构的问题除外。<sup>[7](https://www.diva-portal.org/smash/get/diva2:316748/FULLTEXT01.pdf)</sup> 极端情况下，杰罗斯洛在七十年代证明了，二次约束问题（MIQCP）的一个变体——某些变量没有显式有限界——是不可判定的。<sup>[8](https://sburer.github.io/papers/030-miqcpsurvey.pdf)</sup> 已知的一个正面结果是：当 \( n = 2 \) 时，IQP可在多项式时间内求解；然而，这并不能自动推广到更高维，除二变量情形之外的其他固定维数情形是否容易求解，仍不清楚。<sup>[1](https://optimization-online.org/wp-content/uploads/2014/07/4446.pdf)</sup>

## 求解方法

凸MIQP主要用MILP技术求解，方法要么是将经典分支定界框架中的线性规划求解器替换为QP求解器，要么是将MILP作为子问题求解。<sup>[2](https://plato.asu.edu/APM523/cpl_miqp.pdf)</sup> 在分支定界中，原问题被作为一系列较小的QP子问题按树状顺序求解，每一层固定一个新的整数变量；QP松弛给出下界，整数可行点给出上界，改进的下界减少了必须求解的QP问题数量。<sup>[9](https://epubs.siam.org/doi/10.1137/S1052623494268455)</sup><sup> • </sup><sup>[7](https://www.diva-portal.org/smash/get/diva2:316748/FULLTEXT01.pdf)</sup>

非凸MIQP需要全局优化技术，主要是空间分支定界。<sup>[2](https://plato.asu.edu/APM523/cpl_miqp.pdf)</sup><sup> • </sup><sup>[3](https://ar5iv.labs.arxiv.org/html/2010.04822)</sup> 这些算法的效率主要取决于定界步骤中所用松弛的质量，这些松弛分为三类：来自可因子化规划和重表述-线性化技术（RLT）的多面体松弛、半定规划（SDP）松弛，以及来自可分离规划、d.c.规划和二次凸重表述的凸二次松弛。<sup>[3](https://ar5iv.labs.arxiv.org/html/2010.04822)</sup> 对于变量乘积，McCormick松弛引入 \( z = x \cdot y \)，并在 \( x \) 和 \( y \) 的界所限定的范围内取凸包，该凸包是由四个线性不等式描述的多面体，随界的缩小而收紧；空间分支定界随后递归地分割定义域，并添加有效不等式以收紧每个子问题的凸化。<sup>[10](https://link.springer.com/article/10.1007/s10589-023-00543-7)</sup> 对于含二进制 \( y_i \) 的项 \( x_{i}^{2} / y_{i} \)，透视割将该项表示为无穷多个超平面 \( \varphi_{i} \ge 2 \bar{x}_{i} \cdot x_{i} - \bar{x}_{i}^{2} \cdot y_{i} \) 在 \( \bar{x}_{i} \in [a_{i}, b_{i}] \) 上的上确界；在这一提升与凸化方案中，使用来自SDP松弛的 \( \rho^{*} \) 被证明是求解到最优的最有效方式，将其与二次凸重表述结合可进一步减小对偶间隙。<sup>[11](https://ar5iv.labs.arxiv.org/html/1507.05708)</sup>

## 起源

割平面法——向凸问题迭代地添加新的线性约束——可追溯到小J. E. 凯利1960年发表在《工业与应用数学学会会刊》上的论文。<sup>[12](https://doi.org/10.1137/0108053)</sup> 贝姆波拉德和奈克于2018年在《IFAC-PapersOnLine》上介绍了一种用于嵌入式混合模型预测控制的数值稳健的MIQP求解器。<sup>[13](https://doi.org/10.1016/j.ifacol.2018.11.068)</sup>

## 变体

主要的区分是凸MIQP与非凸MIQP，取决于 \( Q \) 是否为半正定。<sup>[2](https://plato.asu.edu/APM523/cpl_miqp.pdf)</sup> 当所有变量均为0-1变量，或更一般地，当所有乘积都发生在0-1变量与有界变量之间时，会出现一种中间情形；此类问题可重表述为凸MIQP。<sup>[2](https://plato.asu.edu/APM523/cpl_miqp.pdf)</sup> 当二次约束与二次目标函数同时出现时，问题为MIQCP；若所有二次约束矩阵为零，则保留其二次目标函数，从而退化为MIQP，仅当目标函数也是线性时才进一步退化为MILP，且它是NP难的。<sup>[8](https://sburer.github.io/papers/030-miqcpsurvey.pdf)</sup> MIQP还按整数类型划分，二进制变量在控制和选择应用中很常见，也可使用一般整数。<sup>[1](https://optimization-online.org/wp-content/uploads/2014/07/4446.pdf)</sup><sup> • </sup><sup>[5](https://iris.imtlucca.it/retrieve/handle/20.500.11771/20183/21662/1-s2.0-S2405896318327265-main.pdf)</sup>

## 应用

**投资组合优化。** 自马科维茨1959年的工作以来，投资组合管理者经常使用二次规划方法构建大规模投资组合，选择财富比例以最小化投资组合风险——决策变量的二次函数——同时满足包括目标预期收益在内的线性约束。<sup>[14](https://www.mit.edu/~dbertsim/papers/Finance/Portfolio%20construction%20through%20mixed%20integer%20programming.pdf)</sup>

**混合模型预测控制。** 当MPC被扩展以允许二进制控制信号时，普通的QP求解器必须替换为同时优化二进制变量的MIQP求解器，这种方法有时称为混合整数预测控制。<sup>[7](https://www.diva-portal.org/smash/get/diva2:316748/FULLTEXT01.pdf)</sup> 嵌入式问题规模很小：对于时域 \( N = 10 \)，MIQP有 \( n = 40 \) 个变量、\( p = 10 \) 个二进制变量和 \( m = 160 \) 个线性不等式，专用求解器可实时运行。<sup>[5](https://iris.imtlucca.it/retrieve/handle/20.500.11771/20183/21662/1-s2.0-S2405896318327265-main.pdf)</sup>

**稀疏回归。** 最佳子集选择用计数非零系数的基数约束来表述，是NP难的，R语言中的leaps等经典算法在超过约 \( p = 30 \) 时无法扩展。混合整数优化方法可在数分钟内求解 \( n \) 达数千、\( p \) 达数百的问题并证明最优性，并可在数分钟内为 \( n \) 达数百、\( p \) 达数千的问题找到接近最优的解。<sup>[15](https://arxiv.org/pdf/1507.03133v1.pdf)</sup>

**过程系统。** MIQCQP的应用包括过程网络中的质量调和以及金融中的投资组合优化。<sup>[16](https://oar.princeton.edu/bitstream/88435/pr13v9z/1/OptimizationMixedIntegerQuadraticSignomial.pdf)</sup>

**近期算法进展。** 量子启发式哈密顿下降（QIHD）是一族在JAX中实现的基于GPU的算法，能够在数秒内处理数百万个非零元素；在大规模MIQP问题上的基准测试表明，在时间预算有限时，它始终优于基于CPU的Gurobi求解器。<sup>[17](https://www.cs.umd.edu/~xwu/papers/QIHD_ScaleOPT.pdf)</sup> 一个面向参数化MIQP的学习优化框架使用神经网络学习从问题参数到最优整数解的映射，并用可微QP层计算连续变量，已在混合整数模型预测控制基准上得到演示。<sup>[18](https://proceedings.mlr.press/v331/le26a.html)</sup>

## 局限与替代方法

最坏情况下的求解时间随问题规模指数增长，因此求解器性能取决于界的质量而非原始速度：弱松弛会在QP松弛与整数最优解之间留下很大间隙，非凸目标函数还需要使用空间分支定界的全局方法。<sup>[7](https://www.diva-portal.org/smash/get/diva2:316748/FULLTEXT01.pdf)</sup><sup> • </sup><sup>[2](https://plato.asu.edu/APM523/cpl_miqp.pdf)</sup> 一种缓解方法是将问题重表述为箱约束二次规划，从而得到原问题某一子类的全局最优解。<sup>[19](https://www.aimsciences.org/article/doi/10.3934/jimo.2011.7.1027)</sup>

对于稀疏回归，基于MIO的最佳子集方法与凸松弛lasso相竞争。两者都不能在所有情形下占优：最佳子集选择在高信噪比情形下通常表现更好，lasso在低信噪比情形下更好，而在扩展模拟中，松弛lasso是总体赢家。<sup>[20](https://www.stat.cmu.edu/~ryantibs/papers/bestsubset.pdf)</sup>

## References

1. [Mixed-integer Quadratic Programming is in NP](https://optimization-online.org/wp-content/uploads/2014/07/4446.pdf)
2. [Solving Mixed-Integer Quadratic Programming problems with IBM-CPLEX: a progress report](https://plato.asu.edu/APM523/cpl_miqp.pdf)
3. [Spectral relaxations and branching strategies for global optimization of mixed-integer quadratic programs](https://ar5iv.labs.arxiv.org/html/2010.04822)
4. [arXiv 2303.04216v3 (Gurobi strategy for mixed-integer problems)](https://arxiv.org/pdf/2303.04216v3.pdf)
5. [A numerically robust mixed-integer quadratic programming solver for embedded hybrid MPC (IFAC; merged author copy at https://cse.lab.imtlucca.it/~bemporad/publications/papers/nmpc18-miqpnnls.pdf)](https://iris.imtlucca.it/retrieve/handle/20.500.11771/20183/21662/1-s2.0-S2405896318327265-main.pdf)
6. [A Frank-Wolfe-based primal heuristic for quadratic mixed-integer optimization (Mathematical Programming Computation)](https://link.springer.com/article/10.1007/s12532-026-00340-3)
7. [A Preprocessing Algorithm for MIQP solvers with Applications to MPC, Report no. 2607](https://www.diva-portal.org/smash/get/diva2:316748/FULLTEXT01.pdf)
8. [A survey of mixed integer quadratically constrained problems (MIQCP)](https://sburer.github.io/papers/030-miqcpsurvey.pdf)
9. [Numerical Experience with Lower Bounds for MIQP Branch-And-Bound](https://epubs.siam.org/doi/10.1137/S1052623494268455)
10. [Enhancements of discretization approaches for non-convex mixed-integer quadratically constrained quadratic programming: Part I](https://link.springer.com/article/10.1007/s10589-023-00543-7)
11. [Lift-and-convexification reformulation for MIQP (perspective cuts)](https://ar5iv.labs.arxiv.org/html/1507.05708)
12. [J. E. Kelley, Jr. (1960). The Cutting-Plane Method for Solving Convex Programs. Journal of the Society for Industrial and Applied Mathematics.](https://doi.org/10.1137/0108053)
13. [Alberto Bemporad, Vihangkumar V. Naik (2018). A Numerically Robust Mixed-Integer Quadratic Programming Solver for Embedded Hybrid Model Predictive Control. IFAC-PapersOnLine.](https://doi.org/10.1016/j.ifacol.2018.11.068)
14. [Portfolio Construction Through Mixed-Integer Programming at Grantham, Mayo, Van Otterloo and Company](https://www.mit.edu/~dbertsim/papers/Finance/Portfolio%20construction%20through%20mixed%20integer%20programming.pdf)
15. [Best Subset Selection via a Modern Optimization Lens](https://arxiv.org/pdf/1507.03133v1.pdf)
16. [Global optimization of mixed-integer models with quadratic and signomial terms](https://oar.princeton.edu/bitstream/88435/pr13v9z/1/OptimizationMixedIntegerQuadraticSignomial.pdf)
17. [Quantum-Inspired Hamiltonian Descent for Mixed-Integer Quadratic Programming (QIHD)](https://www.cs.umd.edu/~xwu/papers/QIHD_ScaleOPT.pdf)
18. [A Hybrid Learning-to-Optimize Framework for Mixed-Integer Quadratic Programming (PMLR)](https://proceedings.mlr.press/v331/le26a.html)
19. [Nonconvex quadratic reformulations and solvable conditions for mixed integer quadratic programming problems](https://www.aimsciences.org/article/doi/10.3934/jimo.2011.7.1027)
20. [Best subset selection, forward stepwise, and the lasso](https://www.stat.cmu.edu/~ryantibs/papers/bestsubset.pdf)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/mixed-integer-quadratic-programming

English original: https://www.edgepedia.org/mixed-integer-quadratic-programming
