# An Adaptive Linear Programming Algorithm with Parameter Learning
## 2 How Does the ALP Work?
### The Adaptive Linear Programming (ALP) Algorithm
\[\text{NF}_{\text{i}}\)\({}_{\text{j}}\)\({}^{\prime\prime}\) = NF\({}_{\text{j}}\)\(\left(X_{i}^{0}\right)+\sum_{\text{p}=1}^{n}\left(x_{\text{ip}}-x_{\text{ip}}^{0} \right)\left(\frac{\partial\text{NF}_{\text{j}}}{\partial x_{\text{ip}}} \right)_{0}+\frac{1}{2}\sum_{\text{p}=1}^{n}\left(x_{\text{ip}}-x_{\text{ip}}^ {0}\right)^{2}\left(\frac{\partial^{2}\text{NF}_{\text{j}}}{\partial x_{\text {ip}}}\right)_{0}\) (10)  
Figure 4: The approximation and solution using ALP in two iterations when RMC = 0.4. Subfigure (**a**) is Iteration i and Subfigure (**b**) is Iteration i + 1.  
Figure 5: The two-step linear approximation methods using the ALP. Subfigure (**a**) illustrates the situation when the second-order paraboloid of the original nonlinear constraint NF\({}_{\text{j}}\) has intersection with Plane x\({}_{1}\)x\({}_{2}\), whereas Subfigure (**b**) illustrates the situation when the second-order paraboloid has no intersection with Plane x\({}_{1}\)x\({}_{2}\) hence the first-order tangent is used to approximate NF\({}_{\text{j}}\).  
From Equation (10), for the \(\mathrm{p^{th}}\) dimension, the quadratic to be solved to obtain \(\left(\mathrm{x_{ip}-x_{ip}^{0}}\right)\) is:  
\[\mathrm{NF_{j}}\left(\mathrm{x_{i}^{0}}\right)+\left(\mathrm{x_{ip}-x_{ip}^{0}} \right)\left(\frac{\partial\mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}}\right)_{0} +\frac{1}{2}\left(\mathrm{x_{ip}-x_{ip}^{0}}\right)^{2}\left(\frac{\partial^{2} \mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}^{2}}\right)_{0}=0 \tag{11}\]  
If Equation (11) has real roots, Figure 5a, by solving Equation (11) and selecting the root between Equations (12) and (13) with the smaller absolute value for each dimension, we obtain the intersection that is closer to the paraboloid in each dimension, such as \(\mathrm{B^{*}}\) and \(\mathrm{C^{*}}\). \[\left(\frac{\partial\mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}}\right)_{0}^{*}= \frac{-\mathrm{NF_{j}}\left(\mathrm{x_{i}^{0}}\right)\left(\frac{\partial^{2} \mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}^{2}}\right)_{0}}{-\left(\frac{ \partial\mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}}\right)_{0}-\sqrt{\left( \frac{\partial\mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}}\right)_{0}^{2}-2 \mathrm{NF_{j}}\left(\mathrm{x_{i}^{0}}\right)\left(\frac{\partial^{2} \mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}^{2}}\right)_{0}}} \tag{12}\]  
\[\left(\frac{\partial\mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}}\right)_{0}^{*}= \frac{-\mathrm{NF_{j}}\left(\mathrm{x_{i}^{0}}\right)\left(\frac{\partial^{2} \mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}^{2}}\right)_{0}}{-\left(\frac{ \partial\mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}}\right)_{0}+\sqrt{\left( \frac{\partial\mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}}\right)_{0}^{2}-2 \mathrm{NF_{j}}\left(\mathrm{x_{i}^{0}}\right)\left(\frac{\partial^{2} \mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}^{2}}\right)_{0}}} \tag{13}\]  
If Equation (11) has no real roots, Figure 5b, \(\mathrm{NF_{i}}\) does not intersect Plane \(\mathrm{x}\), then the first-order derivative at \(\mathrm{X_{i}^{0}}\) is used, Equation (14). \[\left(\frac{\partial\mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}}\right)_{0}^{*}= \left(\frac{\partial\mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}}\right)_{0} \tag{14}\]  
Based on the intersections in each dimension, such as \(\mathrm{B^{*}}\) and \(\mathrm{C^{*}}\), we obtain \(\mathrm{LF_{i}}\). \[\mathrm{LF_{i,j}}=\sum_{\mathrm{p=1}}^{n}\mathrm{x_{ip}}\left(\frac{\partial \mathrm{NF_{j}}}{\partial\mathrm{x_{ip}}}\right)_{0}^{*}-\left(\sum_{\mathrm{p=1 }}^{n}\mathrm{x_{ip}^{0}}\left(\frac{\partial\mathrm{NF_{j}}}{\partial \mathrm{x_{ip}}}\right)_{0}^{*}-\mathrm{NF_{j}}\left(\mathrm{X_{i}^{0}}\right)\right) \tag{15}\]  
Algorithm 1 summarizes the constraint accumulation algorithm.