Design and Implementation of a Reduced-Space SQP Solver with Column Reordering for Large-Scale Process Optimization
Abstract
1. Introduction
- (1)
- For large-scale nonlinear optimization in process industries, a solver algorithm based on a column-reordering space-decomposition strategy is designed. It reconstructs the reduced QP subproblem, projecting the high-dimensional optimization problem onto a low-dimensional subspace for solution, thereby significantly reducing computational complexity.
- (2)
- Implemented in C++ with a top-down design, an RSQP solver is developed in a modular manner, partitioned into functional modules such as program invocation, input checking, preliminary preprocessing, and iterative solving, with clear interfaces that improve maintainability and extensibility.
- (3)
- In implementing the RSQP algorithm, we make full use of efficient sparse-matrix storage and computation methods to further improve computational efficiency and memory utilization for large-scale problems, enhancing the algorithm’s engineering applicability in high-dimensional sparse settings.
- (4)
- Through small- and large-scale case studies with diverse characteristics, as well as an industrial application test, we systematically evaluate performance across different problem sizes and structures, providing a practical solution for large-scale nonlinear optimization in process industries.
2. Theoretical Foundations
2.1. Mathematical Model of the Optimization Problem
2.2. Necessary and Sufficient Conditions
2.3. SQP Algorithm
3. Proposed Method
3.1. Algorithmic Principles and Workflow
3.2. Column-Reordering-Based Space Decomposition
3.3. Sparse-Matrix Processing Techniques
3.4. Solver Algorithm Framework Design
- (1)
- Program Invocation Module
- (2)
- Input Validation Module
- (3)
- Preprocessing Module
- (4)
- Iterative Solving Module
- (5)
- Output Module
- (6)
- Flexible Invocation Module
4. Experimental Analysis and Validation
4.1. Small-Scale Case Studies: Computation and Analysis
4.2. Variable-Dimension Case Studies and Analysis
4.3. Single-Stage Three-Pass Reverse Osmosis Process Model
4.4. Operation Optimization Based on Minimizing Daily Operating Costs
5. Summary
- (1)
- Theory. We review NLP fundamentals and optimality conditions; present the core mechanics of SQP (quadratic approximation, constraint linearization, and QP subproblem formulation/solution); and introduce RSQP, which employs a column-reordering-based space decomposition to project the high-dimensional problem into a low-dimensional subspace, solving a reduced QP and markedly lowering computational cost.
- (2)
- Solver development. For high-dimensional/low-degrees-of-freedom problems in process industries, we integrate sparse-matrix storage/computation. A top-down modular architecture implements the column-reordering space-decomposition module. The numeric core is built in C++ with STL, Armadillo, and SuiteSparse, and exposes extensible interfaces for user-defined functions, improving usability and maintainability.
- (3)
- Numerical tests. On small-scale benchmarks (including non-convex/exponential cases) and variable-dimension tests, RSQP attains accuracy/stability comparable to commercial software; objective trajectories align closely. In variable-size tests, RSQP breaks dimensional limits, achieving notable speedups and ~65% memory reduction versus Fmincon; when variables increase from 64 k to 128 k, runtime rises by ~4.128× with iteration counts essentially stable. Under dynamic degrees of freedom, autonomous basis transformation cuts iterations by >50% and solves stably up to 6 k dimensions. Near-industrial tests show runtime growth at only ~⅓ of the theoretical rate, supporting applicability to 10 k-scale optimization.
- (4)
- Engineering application. For a high-salinity wastewater RO unit (single-stage, three-pass), we construct a rigorous mechanistic/economic model and formulate a large-scale NLP via a finite-difference simultaneous-equations approach, then optimize daily operating cost with RSQP. Two typical scenarios reduce product-water cost by 4.98% and 1.46% while satisfying all quality and equipment constraints, confirming feasibility and effectiveness in process-simulation settings.
- (1)
- Broader comparisons. Conduct systematic evaluations against advanced SQP variants (e.g., interior-point SQP, filter SQP, stochastic SQP) on a unified platform, quantifying accuracy, efficiency, and robustness to ill-conditioning to delineate strengths and scope.
- (2)
- Performance and robustness. For million-variable problems, integrate GPU parallelism and distributed memory; embed trust-region and interior-point strategies; and develop adaptive regularization for stable Hessian updates on non-smooth/ill-conditioned models.
- (3)
- Cross-domain validation. Extend beyond high-salinity wastewater to petrochemical processes (e.g., FCC and ethylene pyrolysis) to validate generality on ultra-large-scale, strongly nonlinear problems and enhance engineering impact.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Appendix A. Basic Principles of RSQP
Appendix B. Sparse Storage Formats and Implementation Details
- (1)
- Data Structure for Dense Matrices

- (2)
- Sparse Matrix Data Structure



- (3)
- Vector Data Structures
- (4)
- Stack and Queue
- (5)
- Hash Tables and Maps
Appendix C. Complete Tables and Case Study Details
| 1 | 3 | 0.0564161 | 0.4 | 1 | 0.196 | 1.3 | |
| 2 | 5 | 0.118883 | 0.05764 | 1 | 0.0799 | 0.804 | |
| 3 | 7 | 0.123875 | 0.002727 | 1 | 0.00506 | 0.372 | |
| 4 | 9 | 0.123893 | 1.255 × 10−5 | 1 | 1.86 × 10−5 | 0.031 | |
| 5 | 11 | 0.123893 | 2.298 × 10−10 | 1 | 2.74 × 10−10 | 0.745 | modified |
| 1 | 3 | −0.24576 | 0.288 | 1 | 0.17 | 0.296 | |
| 2 | 5 | −0.266937 | 0.01574 | 1 | −0.0135 | 0.238 | |
| 3 | 7 | −0.250586 | 0.03064 | 1 | 0.0165 | 0.437 | |
| 4 | 9 | −0.2501 | 0.001733 | 1 | 0.000528 | 0.029 | modified |
| 5 | 11 | −0.25 | 0.0001623 | 1 | 0.0001 | 0.0342 | modified |
| 6 | 13 | −0.25 | 1.158 × 10−7 | 1 | 8.08 × 10−8 | 0.00154 | modified |
| 1 | 9 | 4373.12 | 1.421 × 10−14 | 0.0156 | −3.68 × 104 | 869 | |
| 2 | 13 | 280.551 | 9.415 × 10−14 | 0.25 | 1.08 × 104 | 110 | |
| 3 | 15 | 4.53044 | 1.776 × 10−14 | 1 | −4.84 | 8.63 | |
| 4 | 17 | 3.51233 | 8.882 × 10−16 | 1 | −0.904 | 4.97 | |
| 5 | 19 | 0.858637 | 0 | 1 | −1.47 | 3.35 | |
| 6 | 21 | 0.256953 | 8.882 × 10−16 | 1 | −0.394 | 1.12 | |
| 7 | 23 | 0.031691 | 0 | 1 | −0.113 | 0.425 | |
| 8 | 25 | 0.000770494 | 0 | 1 | −0.00829 | 0.0915 | |
| 9 | 27 | 3.73693 × 10−7 | 8.882 × 10−16 | 1 | −3.13 × 10−5 | 0.0149 | |
| 10 | 29 | 3.73693 × 10−7 | 0 | 1 | 5.53 × 10−20 | 0.00134 |
| 1 | 3 | −36.0762 | 20 | 1 | −9.59 | 10.2 | |
| 2 | 5 | −30.2524 | 26.33 | 1 | 7.02 | 8.77 | |
| 3 | 7 | −30.2359 | 3.376 | 1 | 0.635 | 0.898 | |
| 4 | 9 | −30.0021 | 0.5897 | 1 | 0.252 | 0.872 | |
| 5 | 11 | −30.002 | 0.01717 | 1 | 0.00391 | 0.207 | |
| 6 | 13 | −30 | 0.00412 | 1 | 0.00205 | 0.0821 | |
| 7 | 15 | −30 | 7.403 × 10−6 | 1 | 3.64 × 10−6 | 0.00314 | modified |
| 8 | 17 | −30 | 6.147 × 10−8 | 1 | 3.07 × 10−8 | 0.000296 | modified |
| 1 | 3 | 0.0482947 | 0.485 | 1 | 0.168 | 7.65 | |
| 2 | 5 | 0.0438279 | 0.198 | 1 | −0.00157 | 0.015 | |
| 3 | 7 | 0.0538201 | 0.005112 | 1 | 0.00982 | 0.0355 | |
| 4 | 9 | 0.0538249 | 0.002234 | 1 | 5.7 × 10−5 | 0.000772 | modified |
| 5 | 11 | 0.0539497 | 1.859 × 10−6 | 1 | 0.000125 | 0.000398 | modified |
| 6 | 13 | 0.0539498 | 1.839 × 10−13 | 1 | 1.1 × 10−7 | 1.46 × 10−6 | modified |
| 1 | 3 | 1.56945 | 4.4 | 1 | −2.37 | 1.83 | |
| 2 | 9 | 0.280009 | 13.65 | 0.0625 | −12.3 | 2.04 | modified |
| 3 | 14 | 0.494598 | 12.24 | 0.125 | 1.96 | 2.65 | |
| 4 | 20 | 0.673138 | 11.62 | 0.0625 | 3.08 | 1.49 | modified |
| 5 | 27 | 0.814987 | 11.32 | 0.0312 | 4.76 | 2.77 | modified |
| 6 | 34 | 1.0287 | 11.09 | 0.0312 | 7.24 | 5.03 | modified |
| 7 | 46 | 0.741412 | 11.32 | 0.000977 | −270 | 10.4 | |
| 8 | 48 | 0.607985 | 11.32 | 1 | −0.127 | 1.56 | modified |
| 9 | 56 | 0.57058 | 0.07103 | 0.0156 | −2.36 | 1.51 | |
| 10 | 64 | 0.535476 | 0.07549 | 0.0156 | −2.21 | 1.46 | |
| 11 | 72 | 0.502532 | 0.07954 | 0.0156 | −2.07 | 1.42 | |
| 12 | 79 | 0.441678 | 0.09669 | 0.0312 | −1.88 | 1.33 | |
| 13 | 86 | 0.388194 | 0.1109 | 0.0312 | −1.66 | 1.25 | |
| 14 | 92 | 0.297211 | 0.1646 | 0.0625 | −1.36 | 1.09 | |
| 15 | 98 | 0.227552 | 0.2008 | 0.0625 | −1.04 | 0.954 | |
| 16 | 104 | 0.174219 | 0.2238 | 0.0625 | −0.796 | 0.835 | |
| 17 | 109 | 0.0979985 | 0.3047 | 0.125 | −0.523 | 0.626 | |
| 18 | 114 | 0.0551241 | 0.3279 | 0.125 | −0.294 | 0.47 | |
| 19 | 118 | 0.013781 | 0.3837 | 0.25 | −0.11 | 0.235 | |
| 20 | 121 | 0 | 0.3297 | 0.5 | 0 | 0 | |
| 21 | 123 | 0 | 0.3297 | 1 | 0 | 0 | |
| 22 | 125 | 0 | 0 | 1 | 0 | 0 |
Appendix D. The Process and Economic Models of the Single-Stage Three-Pass RO Unit

- (1)
- chemical dosing cost (OCCH);
- (2)
- raw-water intake energy cost (OCIP);
- (3)
- RO unit operating energy cost (OCEN);
- (4)
- membrane replacement cost (OCME);
- (5)
- maintenance cost (OCMN);
- (6)
- labor cost (OCLB).
References
- Gui, W.; Wang, C.; Xie, Y.; Song, S.; Meng, Q.; Ding, J. The necessary way to realize great leap forward development of process industries. China Sci. Found. 2015, 29, 337–342. [Google Scholar]
- Gui, W.; Zeng, Z.; Chen, X.; Xie, Y.; Sun, Y. Knowledge-driven process industry smart manufacturing. Sci. China Inf. Sci. 2020, 50, 1345–1360. [Google Scholar] [CrossRef]
- Yang, Y. A Combination of Interior Point Method and SQP Method. Master’s Thesis, Beijing Jiaotong University, Beijing, China, 2014. [Google Scholar]
- Liu, P. Control Variable Parameterization-Based Optimal Control Problems Computational Methods Research. Ph.D. Thesis, Zhejiang University, Hangzhou, China, 2017. [Google Scholar]
- Wilson, R.B. A Simplicial Method for Convex Programming; Harvard University: Cambridge, MA, USA, 1963. [Google Scholar]
- Han, S.P. Superlinearly convergent variable metric algorithms for general nonlinear programming problems. Math. Program. 1976, 11, 263–282. [Google Scholar] [CrossRef]
- Han, S.P. A globally convergent method for nonlinear programming. J. Optim. Theory Appl. 1977, 22, 297–309. [Google Scholar] [CrossRef]
- Powell, M.J.D. A fast method for solving nonlinear optimization problems. In Proceedings of the 1977 Conference on Advances in Optimization and Control, Würzburg, Germany, 5–9 September 1977; University of Dundee: Dundee, UK, 1978; pp. 145–160. [Google Scholar]
- Powell, M.J.D. Algorithms for nonlinear constraints that use Lagrangian functions. Math. Program. 1978, 14, 224–248. [Google Scholar] [CrossRef]
- Powell, M.J.D. The convergence of variable metric methods for nonlinearly constrained optimization calculations. Nonlinear Program. 1978, 3, 27–64. [Google Scholar]
- Nocedal, J.; Wright, S.J. Sequential Quadratic Programming. In Numerical Optimization; Springer: New York, NY, USA, 1989; pp. 529–562. [Google Scholar]
- Gill, P.E.; Murray, W.; Saunders, M.A.; Wright, M.H. Sparse matrix methods in optimization. SIAM J. Sci. Statist. Comput. 1984, 5, 562–589. [Google Scholar] [CrossRef]
- Gill, P.E.; Murray, W.; Saunders, M.A.; Wright, M.H. Some Theoretical Properties of an Augmented Lagrangian Merit Function. In Advances in Optimization and Parallel Computing; Pardalos, P.M., Ed.; Stanford University: Stanford, CA, USA, 1992; pp. 101–128. [Google Scholar]
- Gill, P.E.; Murray, W.; Poncele’on, D.B.; Saunders, M.A. Solving Reduced KKT Systems in Barrier Methods for Linear Programming; Watson, G.A., Griffiths, D., Eds.; Longman Scientific & Technical: Harlow, UK, 1994; Volume 303, pp. 89–104. [Google Scholar]
- Jian, J. A subfeasible direction method combining SQP technology with generalized projection. J. Appl. Math. Ser. A 1996, 1, 65–74. [Google Scholar]
- Tits, A.L.; Wächter, A.; Bakhtiari, S.; Urban, T.J.; Lawrence, C.T. A primal-dual interior-point method for nonlinear programming with strong global and local convergence properties. SIAM J. Optim. 2003, 14, 173–199. [Google Scholar] [CrossRef]
- Jiang, A.; Guo, Z.; Chen, S.; Zheng, X.; Qi, D.; Fang, X.; Qian, J. Operation optimization of distillation column based on reduced SQP algorithm and hybrid derivative method. J. Chem. Ind. Eng. 2006, 57, 1378–1384. [Google Scholar]
- Jiang, A.; Shao, Z.; Qian, J. Optimization of reaction parameters based on rSQP and hybrid automatic differentiation algorithm. J. Zhejiang Univ. Eng. Sci. 2004, 38, 1606–1610. [Google Scholar]
- Dowling, A.W.; Biegler, L.T. A framework for efficient large scale equation-oriented flowsheet optimization. Comput. Chem. Eng. 2015, 72, 185–197. [Google Scholar] [CrossRef]
- Curtis, F.E.; O’Neill, M.J.; Robinson, D.P. Worst-case complexity of an SQP method for nonlinear equality constrained stochas-tic optimization. Math. Program. 2024, 205, 431–483. [Google Scholar] [CrossRef]
- Uihlein, A.; Wollner, W. Stabilized SQP methods in Hilbert spaces. arXiv 2024, arXiv:2312.14801. [Google Scholar] [CrossRef]
- Ma, Y.; Gao, X.; Liu, C.; Li, J. Improved SQP and SLSQP algorithms for feasible path-based process optimisation. Comput. Chem. Eng. 2024, 188, 108751. [Google Scholar] [CrossRef]
- Leyffer, S.; Vanaret, C.; Gould, N. A Unified Funnel Restoration SQP Algorithm; Optimization Online: Argonne, IL, USA, 2024. [Google Scholar]
- Fang, L.; Vondele, S.; Meyers, J. An SQP-based multiple shooting algorithm for large-scale PDE-constrained optimal control problems. J. Comput. Phys. 2023, 477, 111927. [Google Scholar] [CrossRef]
- Jiang, A.; Cheng, W.; Wang, J.; Xing, C.; Ding, Q.; Jiang, Z. Operational optimizations of full-flowsheet spiral-wound seawater reverse osmosis system. CIESC J. 2014, 65, 1333–1343. [Google Scholar]
- Jiang, A.; Cheng, W.; Jiang, Z.; Lin, Y. A strategy of membrane cleaning and replacing schedule for spiral-wound SWRO system. CIESC J. 2015, 66, 4092–4100. [Google Scholar]
- Zhang, Q. Study on integrated optimal control strategy of reverse osmosis desalination system. Master’s Thesis, Hangzhou Dianzi University, Hangzhou, China, 2019. [Google Scholar]
- Xie, F. Modeling and optimization of zero discharge system for high-salinity wastewater from coal-fired power plants. Master’s Thesis, Hangzhou Dianzi University, Hangzhou, China, 2024. [Google Scholar]
- Cao, W. Cost evaluation based on energy and membrane consumption for sea water reverse osmosis system. Water Supply Drain. 2020, 56, 73–79. [Google Scholar]
- Jiang, A. Large-Scale Reduced-Space SQP Algorithms and Their Application to Process Systems Optimization. Ph.D. Thesis, Zhejiang University, Hangzhou, China, 2005. [Google Scholar]
- Wang, K. Research on Reduced-Space Theory and Algorithms for Large-Scale Nonlinear Optimization of Process Systems. Ph.D. Thesis, Zhejiang University, Hangzhou, China, 2008. [Google Scholar]



















| Case | Number of Variables | Degrees of Freedom | RSQP | FMINCON SQP | |||
|---|---|---|---|---|---|---|---|
| Iterations | Time (s) | Basis Transformations | Iterations | Time (s) | |||
| 1 | 1000 | 1 | 8 | 0.229 | 1 | 3 | 25.263 |
| 2000 | 1 | 9 | 0.411 | 1 | 2 | 178.334 | |
| 4000 | 1 | 9 | 1 | 1 | # | # | |
| 8000 | 1 | 10 | 2.816 | 1 | # | # | |
| 16,000 | 1 | 10 | 8.448 | 1 | # | # | |
| 32,000 | 1 | 10 | 26.191 | 1 | # | # | |
| 64,000 | 1 | 11 | 101.722 | 1 | # | # | |
| 128,000 | 1 | 12 | 419.936 | 1 | # | # | |
| 2 | 1000 | 500 | 15 | 4.496 | 0 | 2 | 10.42 |
| 2000 | 1000 | 17 | 25.991 | 0 | 2 | 77.961 | |
| 4000 | 2000 | 6 | 15.032 | 1 | 2 | 989.919 | |
| 6000 | 3000 | 6 | 41.749 | 1 | # | # | |
| 3 | 4000 | 2 | 6 | 0.711 | 1 | # | # |
| 8000 | 2 | 6 | 1.725 | 1 | # | # | |
| 16,000 | 2 | 6 | 4.362 | 1 | # | # | |
| 20,000 | 2 | 6 | 6.189 | 1 | # | # | |
| 50,000 | 2 | 6 | 27.988 | 1 | # | # | |
| Typical Condition | Feed Temperature/°C | Feed Concentration (kg/m3) | Feed Flow Rate (m3/h) | Operating Pressure (bar) | Booster Pump Pressure (bar) |
|---|---|---|---|---|---|
| Case 1 | 10 | 23.3 | 28.8 | 36.87 | 35 |
| Case 2 | 15 | 21.8 | 25 | 36.87 | 36 |
| Parameter | Value |
|---|---|
| Maximum element feed pressure | 82.53 bar |
| Maximum element pressure drop | 1.03 bar |
| Maximum interstage booster pump pressure | 40 bar |
| Maximum element feed flow | 13.6 m3/h |
| Maximum element permeate flow | 1.04 m3/h |
| Minimum element channel flow | 2.3 m3/h |
| Maximum element recovery | 15% |
| Feed surface velocity | 0.35 m/s |
| Minimum feed surface velocity | 0.038 m/s |
| Maximum element concentration polarization | 1.5 |
| Comparison Metric | Case 1 | Case 2 |
|---|---|---|
| Iteration count | 19 | 19 |
| Function evaluation count | 57 | 59 |
| Basis change count | 1 | 1 |
| Gradient evaluation count | 28 | 29 |
| Constraint residual | 3.919 × 10−8 | 9.5771 × 10−9 |
| Time (seconds) | 20.331 | 23.412 |
| RO System Parameters | Case 1 | Case 2 | ||
|---|---|---|---|---|
| Before Optimization | After Optimization | Before Optimization | After Optimization | |
| Feed Pressure (bar) | 36.8700 | 40.3070 | 36.8700 | 35.7844 |
| Feed Flow Rate (m3/h) | 28.8000 | 32.9261 | 25.0000 | 32.4267 |
| Booster Pump Pressure (bar) | 35.0000 | 15.1809 | 36.0000 | 15.3830 |
| Permeate Flow Rate (m3/h) | 22.1629 | 21.0000 | 20.0000 | 21.0000 |
| Permeate Concentration (mg/L) | 594.3214 | 800.0000 | 901.4206 | 700.3871 |
| Water Recovery Rate (%) | 76.9545 | 72.9167 | 80.0000 | 84.0000 |
| Salt Rejection Rate (%) | 97.4493 | 96.5666 | 95.8650 | 96.7872 |
| Operating Cost (CNY/day) | 2264.5585 | 2151.8265 | 2088.4695 | 2058.0259 |
| Cost Item | Case 1 | Case 2 | ||||
|---|---|---|---|---|---|---|
| Before Optimization (CNY) | After Optimization (CNY) | Change (CNY) | Before Optimization (CNY) | After Optimization (CNY) | Change (CNY) | |
| 102.5965 | 106.9436 | +4.3471 | 89.0595 | 105.1964 | +16.1369 | |
| 68.1035 | 70.9891 | +2.8856 | 59.1176 | 69.8293 | +10.7117 | |
| 972.6862 | 854.5628 | −118.1234 | 822.5446 | 763.6691 | −58.8755 | |
| 186.0822 | 186.0822 | 0 | 186.0822 | 186.0822 | 0 | |
| 35.0900 | 33.2489 | −1.8411 | 31.6656 | 33.2489 | +1.5833 | |
| 900.0000 | 900.0000 | 0 | 900.0000 | 900.0000 | 0 | |
| Total | 2264.5585 | 2151.8265 | −112.732 | 2088.4695 | 2058.0259 | −30.4436 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhao, C.; Liu, A.; Jiang, A.; Zheng, X.; Wang, H.; Zhao, R. Design and Implementation of a Reduced-Space SQP Solver with Column Reordering for Large-Scale Process Optimization. Algorithms 2025, 18, 699. https://doi.org/10.3390/a18110699
Zhao C, Liu A, Jiang A, Zheng X, Wang H, Zhao R. Design and Implementation of a Reduced-Space SQP Solver with Column Reordering for Large-Scale Process Optimization. Algorithms. 2025; 18(11):699. https://doi.org/10.3390/a18110699
Chicago/Turabian StyleZhao, Chuanlei, Ao Liu, Aipeng Jiang, Xiaoqing Zheng, Haokun Wang, and Rui Zhao. 2025. "Design and Implementation of a Reduced-Space SQP Solver with Column Reordering for Large-Scale Process Optimization" Algorithms 18, no. 11: 699. https://doi.org/10.3390/a18110699
APA StyleZhao, C., Liu, A., Jiang, A., Zheng, X., Wang, H., & Zhao, R. (2025). Design and Implementation of a Reduced-Space SQP Solver with Column Reordering for Large-Scale Process Optimization. Algorithms, 18(11), 699. https://doi.org/10.3390/a18110699

