Sequential quadratic programming [1]} finds a solution to () by iteratively solving quadratic programs that locally approximate the original NLP at the current solution estimate \((\hat{y}, \hat{P})\) . At each iteration, the solution \((\Delta y, \Delta P)\)  of the quadratic subproblem
\(\underset{\Delta y, \Delta P}{\min } \quad &\frac{1}{2}\Delta y^\top M_{yy}\Delta y+\left.\frac{\partial c}{\partial y}\right|_{y=\hat{y}}\Delta y\\\mathrm {s.t.} \: \quad &\begin{bmatrix}f \\g\end{bmatrix}(\hat{y},\hat{P})+\left.\begin{bmatrix}\frac{\partial f}{\partial y} & 0 \\\frac{\partial g}{\partial y} & \frac{\partial g}{\partial P}\end{bmatrix}\right|_{\overset{\scriptstyle y = \hat{y}}{P = \hat{P}}}\begin{bmatrix}\Delta y \\\Delta P\end{bmatrix}= 0,  \\&\bar{h}(\hat{y},\hat{P})+\left.\begin{bmatrix}\frac{\partial \bar{h}}{\partial y} & \frac{\partial \bar{h}}{\partial P}\end{bmatrix}\right|_{\overset{\scriptstyle y = \hat{y}}{P = \hat{P}}}\begin{bmatrix}\Delta y \\\Delta P\end{bmatrix}\le 0,\) 
