<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://tomwiki.com/index.php?action=history&amp;feed=atom&amp;title=SNOPT_Description_of_the_SQP_method</id>
	<title>SNOPT Description of the SQP method - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://tomwiki.com/index.php?action=history&amp;feed=atom&amp;title=SNOPT_Description_of_the_SQP_method"/>
	<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=SNOPT_Description_of_the_SQP_method&amp;action=history"/>
	<updated>2026-11-02T02:01:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>http://tomwiki.com/index.php?title=SNOPT_Description_of_the_SQP_method&amp;diff=2840&amp;oldid=prev</id>
		<title>Bjorn: /* Constraints  and slack variables */</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=SNOPT_Description_of_the_SQP_method&amp;diff=2840&amp;oldid=prev"/>
		<updated>2013-08-14T14:39:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Constraints  and slack variables&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:39, 14 August 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The upper and lower bounds on the &amp;#039;&amp;#039;m &amp;#039;&amp;#039;components of &amp;#039;&amp;#039;f &amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;)  and &amp;#039;&amp;#039;AL x &amp;#039;&amp;#039;are said to define the &amp;#039;&amp;#039;general constraints&amp;#039;&amp;#039; of the problem.  SNOPT  converts the general constraints to  equalities by introducing a set of &amp;#039;&amp;#039;slack variables&amp;#039;&amp;#039;. For example, the linear constraint &amp;lt;math&amp;gt;5 \le 2x_1 + 3x_2 \le&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The upper and lower bounds on the &amp;#039;&amp;#039;m &amp;#039;&amp;#039;components of &amp;#039;&amp;#039;f &amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;)  and &amp;#039;&amp;#039;AL x &amp;#039;&amp;#039;are said to define the &amp;#039;&amp;#039;general constraints&amp;#039;&amp;#039; of the problem.  SNOPT  converts the general constraints to  equalities by introducing a set of &amp;#039;&amp;#039;slack variables&amp;#039;&amp;#039;. For example, the linear constraint &amp;lt;math&amp;gt;5 \le 2x_1 + 3x_2 \le&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+\infty&amp;lt;/math&amp;gt; is replaced by &amp;lt;math&amp;gt;2x_1 + 3x_2 - s_1 = 0&amp;lt;/math&amp;gt; together with the bounded slack &amp;lt;math&amp;gt;5\le s_1 \le +\infty&amp;lt;/math&amp;gt;. SparseNP can therefore be written in the equivalent form&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+\infty&amp;lt;/math&amp;gt; is replaced by &amp;lt;math&amp;gt;2x_1 + 3x_2 - s_1 = 0&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;\,&lt;/ins&gt;&amp;lt;/math&amp;gt; together with the bounded slack &amp;lt;math&amp;gt;5\le s_1 \le +\infty&amp;lt;/math&amp;gt;. SparseNP can therefore be written in the equivalent form&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=SNOPT_Description_of_the_SQP_method&amp;diff=2378&amp;oldid=prev</id>
		<title>Elias at 14:33, 9 December 2011</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=SNOPT_Description_of_the_SQP_method&amp;diff=2378&amp;oldid=prev"/>
		<updated>2011-12-09T14:33:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:33, 9 December 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l61&quot;&gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;\min_{x,s} \quad q(x) \quad&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;\min_{x,s} \quad q(x) \quad&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;\text{subject to} \quad Ax - s = b, \quad l \le \left(\begin{array}{c}&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{&lt;/del&gt;x \\ s&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}&lt;/del&gt;\end{array}\right) \le u,&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;\text{subject to} \quad Ax - s = b, \quad l \le \left(\begin{array}{c}x \\ s\end{array}\right) \le u,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l85&quot;&gt;Line 85:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 85:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;f(x,s,\pi) = f_0(x) - \pi^T (f(x) - s_N) + &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;\textonehalf&lt;/del&gt;(f(x) - S_N)^TD(f(x)-S_N)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;f(x,s,\pi) = f_0(x) - \pi^T (f(x) - s_N) + (f(x) - S_N)^TD(f(x)-S_N)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l115&quot;&gt;Line 115:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 115:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;\text{subject to} \quad l \le \left(\begin{array}{c}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;\text{subject to} \quad l \le \left(\begin{array}{c}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;x\\A_Lx - v + w&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;x\\A_Lx - v + w&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;\end{array}\right) \le u, \quad v \ge 0, \quad w \ge 0,&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;\end{array}\right) \le u, \quad v \ge 0, \quad w \ge 0,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l138&quot;&gt;Line 138:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 138:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;where &amp;#039;&amp;#039;&amp;amp;gamma;&amp;#039;&amp;#039; is a nonnegative parameter (the &amp;#039;&amp;#039;elastic weight &amp;#039;&amp;#039;), and &amp;lt;math&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;\Obj&lt;/del&gt;(x) + \gamma e^T(v + w)&amp;lt;/math&amp;gt; is called a &amp;#039;&amp;#039;composite objective&amp;#039;&amp;#039; (the &amp;lt;math&amp;gt;\ell_1&amp;lt;/math&amp;gt; penalty function for the nonlinear constraints).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;where &amp;#039;&amp;#039;&amp;amp;gamma;&amp;#039;&amp;#039; is a nonnegative parameter (the &amp;#039;&amp;#039;elastic weight &amp;#039;&amp;#039;), and &amp;lt;math&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;f_0&lt;/ins&gt;(x) + \gamma e^T(v + w)&amp;lt;/math&amp;gt; is called a &amp;#039;&amp;#039;composite objective&amp;#039;&amp;#039; (the &amp;lt;math&amp;gt;\ell_1&amp;lt;/math&amp;gt; penalty function for the nonlinear constraints).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The value of &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; may increase automatically by multiples of 10 if the optimal &amp;#039;&amp;#039;v &amp;#039;&amp;#039;and &amp;#039;&amp;#039;w &amp;#039;&amp;#039;continue to be nonzero. If &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; is sufficiently large, this is equivalent to minimizing the sum of the nonlinear constraint violations subject to the linear constraints and bounds. A similar &amp;lt;math&amp;gt;\ell_1&amp;lt;/math&amp;gt; formulation of SparseNP is fundamental to the &amp;lt;math&amp;gt;\ell_1&amp;lt;/math&amp;gt; QP algorithm of Fletcher. See also Conn.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The value of &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; may increase automatically by multiples of 10 if the optimal &amp;#039;&amp;#039;v &amp;#039;&amp;#039;and &amp;#039;&amp;#039;w &amp;#039;&amp;#039;continue to be nonzero. If &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; is sufficiently large, this is equivalent to minimizing the sum of the nonlinear constraint violations subject to the linear constraints and bounds. A similar &amp;lt;math&amp;gt;\ell_1&amp;lt;/math&amp;gt; formulation of SparseNP is fundamental to the &amp;lt;math&amp;gt;\ell_1&amp;lt;/math&amp;gt; QP algorithm of Fletcher. See also Conn.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The initial  value of &amp;#039;&amp;#039;&amp;amp;gamma; &amp;#039;&amp;#039;is controlled by the optional parameters Elastic mode and Elastic weight.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The initial  value of &amp;#039;&amp;#039;&amp;amp;gamma; &amp;#039;&amp;#039;is controlled by the optional parameters Elastic mode and Elastic weight.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Elias</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=SNOPT_Description_of_the_SQP_method&amp;diff=1160&amp;oldid=prev</id>
		<title>Elias: Created page with &quot;{{Part Of Manual|title=the SNOPT Manual|link=SNOPT}} Here we summarize the main features of the SQP algorithm used in SNOPT and introduce some terminology used in the d...&quot;</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=SNOPT_Description_of_the_SQP_method&amp;diff=1160&amp;oldid=prev"/>
		<updated>2011-10-13T13:02:15Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Part Of Manual|title=the SNOPT Manual|link=&lt;a href=&quot;/index.php?title=SNOPT&quot; title=&quot;SNOPT&quot;&gt;SNOPT&lt;/a&gt;}} Here we summarize the main features of the SQP algorithm used in SNOPT and introduce some terminology used in the d...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Part Of Manual|title=the SNOPT Manual|link=[[SNOPT|SNOPT]]}}&lt;br /&gt;
Here we summarize the main features of the SQP algorithm used in SNOPT and introduce some terminology used in the description of the subroutine and its arguments. The SQP algorithm is fully described by Gill, Murray and Saunders.&lt;br /&gt;
&lt;br /&gt;
==Constraints  and slack variables==&lt;br /&gt;
&lt;br /&gt;
The upper and lower bounds on the &amp;#039;&amp;#039;m &amp;#039;&amp;#039;components of &amp;#039;&amp;#039;f &amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;)  and &amp;#039;&amp;#039;AL x &amp;#039;&amp;#039;are said to define the &amp;#039;&amp;#039;general constraints&amp;#039;&amp;#039; of the problem.  SNOPT  converts the general constraints to  equalities by introducing a set of &amp;#039;&amp;#039;slack variables&amp;#039;&amp;#039;. For example, the linear constraint &amp;lt;math&amp;gt;5 \le 2x_1 + 3x_2 \le&lt;br /&gt;
+\infty&amp;lt;/math&amp;gt; is replaced by &amp;lt;math&amp;gt;2x_1 + 3x_2 - s_1 = 0&amp;lt;/math&amp;gt; together with the bounded slack &amp;lt;math&amp;gt;5\le s_1 \le +\infty&amp;lt;/math&amp;gt;. SparseNP can therefore be written in the equivalent form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\min_{x,s} \quad f_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\text{subject to} \quad &lt;br /&gt;
\left(\begin{array}{c}&lt;br /&gt;
f(x)\\&lt;br /&gt;
A_Lx&lt;br /&gt;
\end{array}\right) - s = 0,&lt;br /&gt;
l \le \left(\begin{array}{c}&lt;br /&gt;
x\\&lt;br /&gt;
s&lt;br /&gt;
\end{array}\right)&lt;br /&gt;
\le u.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The general constraints become the equalities &amp;#039;&amp;#039;f &amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;) &amp;#039;&amp;#039;- s&amp;lt;sub&amp;gt;N&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; = 0 and &amp;#039;&amp;#039;A&amp;lt;sub&amp;gt;L&amp;lt;/sub&amp;gt;x - s&amp;lt;sub&amp;gt;L&amp;lt;/sub&amp;gt; &amp;#039;&amp;#039;= 0, where &amp;#039;&amp;#039;s&amp;lt;sub&amp;gt;L&amp;lt;/sub&amp;gt;   &amp;#039;&amp;#039;and &amp;#039;&amp;#039;s&amp;lt;sub&amp;gt;N&amp;lt;/sub&amp;gt;   &amp;#039;&amp;#039;are known as the &amp;#039;&amp;#039;linear &amp;#039;&amp;#039;and &amp;#039;&amp;#039;nonlinear &amp;#039;&amp;#039;slacks.&lt;br /&gt;
&lt;br /&gt;
==Major iterations==&lt;br /&gt;
&lt;br /&gt;
The basic structure of the SQP algorithm involves &amp;#039;&amp;#039;major &amp;#039;&amp;#039;and &amp;#039;&amp;#039;minor  &amp;#039;&amp;#039;iterations. The major iterations generate a sequence of iterates &amp;#039;&amp;#039;{x&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt;} &amp;#039;&amp;#039;that satisfy the linear constraints and converge to a point that satisfies the first-order&lt;br /&gt;
&lt;br /&gt;
conditions for optimality.  At each iterate a QP subproblem is used to generate a search direction towards the next iterate &amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;k+1&amp;lt;/sub&amp;gt; .  The constraints of the subproblem are formed from the linear constraints &amp;#039;&amp;#039;A&amp;lt;sub&amp;gt;L&amp;lt;/sub&amp;gt;x - s&amp;lt;sub&amp;gt;L&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; = 0 and the nonlinear constraint linearization&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
f(x_k) + f&amp;#039;(x_k)(x - x_k) - s_N = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;f&amp;#039;&amp;#039;&amp;#039;(&amp;#039;&amp;#039;xk &amp;#039;&amp;#039;) denotes the &amp;#039;&amp;#039;Jacobian matrix&amp;#039;&amp;#039;, whose elements are the first derivatives of &amp;#039;&amp;#039;f &amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;) evaluated at &amp;#039;&amp;#039;x&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt; &amp;#039;&amp;#039;. The QP constraints therefore comprise the &amp;#039;&amp;#039;m &amp;#039;&amp;#039;linear constraints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ccc}&lt;br /&gt;
f&amp;#039;(x_k)x - s_N &amp;amp; = &amp;amp; f(x_k) + f(x_k)&amp;#039;x_k,\\&lt;br /&gt;
A_LX - s_L &amp;amp; = &amp;amp; 0,&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;x &amp;#039;&amp;#039;and &amp;#039;&amp;#039;s &amp;#039;&amp;#039;are bounded above and below by &amp;#039;&amp;#039;u &amp;#039;&amp;#039;and &amp;#039;&amp;#039;l &amp;#039;&amp;#039;as before. If the &amp;#039;&amp;#039;m × n &amp;#039;&amp;#039;matrix  &amp;#039;&amp;#039;A &amp;#039;&amp;#039;and &amp;#039;&amp;#039;m&amp;#039;&amp;#039;-vector &amp;#039;&amp;#039;b &amp;#039;&amp;#039;are defined as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A = \left(\begin{array}{c}&lt;br /&gt;
f&amp;#039;(x_k)\\&lt;br /&gt;
A_L&lt;br /&gt;
\end{array}\right) \quad and \quad b = \left(\begin{array}{c}&lt;br /&gt;
-f(x_k)+f&amp;#039;(x_k)x_k\\&lt;br /&gt;
0&lt;br /&gt;
\end{array}\right),&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the QP subproblem can be written as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\min_{x,s} \quad q(x) \quad&lt;br /&gt;
\text{subject to} \quad Ax - s = b, \quad l \le \left(\begin{array}{c}{x \\ s}\end{array}\right) \le u,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;q&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;) is a quadratic approximation to a modified Lagrangian function.&lt;br /&gt;
&lt;br /&gt;
==Minor iterations==&lt;br /&gt;
&lt;br /&gt;
Solving the QP subproblem is itself an iterative procedure. The iterations of the QP solver are the &amp;#039;&amp;#039;minor &amp;#039;&amp;#039;iterations of the SQP method. At each minor iteration, the constraints &amp;#039;&amp;#039;Ax - s &amp;#039;&amp;#039;= &amp;#039;&amp;#039;b &amp;#039;&amp;#039;are (conceptually) partitioned into the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Bx_B + Sx_S + Nx_N = b,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the &amp;#039;&amp;#039;basis matrix B&amp;#039;&amp;#039; is square and nonsingular. The elements of &amp;#039;&amp;#039;x&amp;lt;sub&amp;gt;B&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;x&amp;lt;sub&amp;gt;S&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;x&amp;lt;sub&amp;gt;N&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; are called the &amp;#039;&amp;#039;basic&amp;#039;&amp;#039;, &amp;#039;&amp;#039;superbasic &amp;#039;&amp;#039;and &amp;#039;&amp;#039;nonbasic &amp;#039;&amp;#039;variables respectively; they are a permutation of the elements of &amp;#039;&amp;#039;x &amp;#039;&amp;#039;and &amp;#039;&amp;#039;s&amp;#039;&amp;#039;.  At a QP solution, the basic and superbasic variables will lie somewhere between their bounds, while the nonbasic variables will normally be equal to one of their bounds. At each iteration, &amp;#039;&amp;#039;x&amp;lt;sub&amp;gt;S&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; is regarded as a set of independent variables that are free to move in any desired direction, namely one that  will  improve  the value of the QP objective  (or the sum of infeasibilities). The basic variables are then adjusted in order to ensure that (&amp;#039;&amp;#039;x, s&amp;#039;&amp;#039;) continues to satisfy &amp;#039;&amp;#039;Ax - s &amp;#039;&amp;#039;= &amp;#039;&amp;#039;b&amp;#039;&amp;#039;. The number of superbasic variables (&amp;#039;&amp;#039;n&amp;lt;sub&amp;gt;S&amp;lt;/sub&amp;gt; &amp;#039;&amp;#039;, say) therefore indicates the number of degrees of freedom remaining after the constraints have been satisfied. In broad terms, &amp;#039;&amp;#039;n&amp;lt;sub&amp;gt;S&amp;lt;/sub&amp;gt;  &amp;#039;&amp;#039;is a measure of &amp;#039;&amp;#039;how nonlinear &amp;#039;&amp;#039;the problem is. In particular, &amp;#039;&amp;#039;n&amp;lt;sub&amp;gt;S&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; will always be zero for LP problems.&lt;br /&gt;
&lt;br /&gt;
If it appears that no improvement can be made with the current definition of &amp;#039;&amp;#039;B&amp;#039;&amp;#039;, &amp;#039;&amp;#039;S&amp;#039;&amp;#039; and &amp;#039;&amp;#039;N &amp;#039;&amp;#039;, a nonbasic variable is selected to be added to &amp;#039;&amp;#039;S&amp;#039;&amp;#039;, and the process is repeated with the value of &amp;#039;&amp;#039;n&amp;lt;sub&amp;gt;S&amp;lt;/sub&amp;gt;  &amp;#039;&amp;#039;increased by one. At all stages, if a basic or superbasic variables encounters one of its bounds, the variables is made nonbasic and the value of &amp;#039;&amp;#039;n&amp;lt;sub&amp;gt;S&amp;lt;/sub&amp;gt; &amp;#039;&amp;#039; is decreased by one.&lt;br /&gt;
&lt;br /&gt;
Associated with each of the &amp;#039;&amp;#039;m&amp;#039;&amp;#039; equality constraints &amp;#039;&amp;#039;Ax - s &amp;#039;&amp;#039;= &amp;#039;&amp;#039;b &amp;#039;&amp;#039;are the &amp;#039;&amp;#039;dual variables p&amp;#039;&amp;#039;. Similarly, each variable in (&amp;#039;&amp;#039;x, s&amp;#039;&amp;#039;) has an associated &amp;#039;&amp;#039;reduced gradient d&amp;lt;sub&amp;gt;j&amp;lt;/Sub&amp;gt; &amp;#039;&amp;#039;. The reduced gradients for the variables &amp;#039;&amp;#039;x &amp;#039;&amp;#039;are the quantities &amp;#039;&amp;#039;g-A&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;&amp;amp;pi;&amp;#039;&amp;#039;, where &amp;#039;&amp;#039;g &amp;#039;&amp;#039;is the gradient of the QP objective, and the reduced gradients for the slacks are the dual variables &amp;#039;&amp;#039;p&amp;#039;&amp;#039;. The QP subproblem is optimal if &amp;#039;&amp;#039;d&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;  = &amp;#039;&amp;#039;0 for all nonbasic variables at their lower bounds, &amp;#039;&amp;#039;d&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;  = &amp;#039;&amp;#039;0 for all nonbasic variables at their upper bounds, and &amp;#039;&amp;#039;d&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;  &amp;#039;&amp;#039;= 0 for other variables, including superbasics. In practice, an &amp;#039;&amp;#039;approximate&amp;#039;&amp;#039; QP solution &amp;lt;math&amp;gt;(\hat{x}_k, \hat{t}_k, \hat{\pi}_k)&amp;lt;/math&amp;gt; is found by relaxing these conditions.&lt;br /&gt;
&lt;br /&gt;
==The  merit  function==&lt;br /&gt;
&lt;br /&gt;
After a QP subproblem  has been solved, new estimates of the SparseNP solution are computed using a line search on the augmented Lagrangian merit function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
f(x,s,\pi) = f_0(x) - \pi^T (f(x) - s_N) + \textonehalf(f(x) - S_N)^TD(f(x)-S_N)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;D &amp;#039;&amp;#039;is a diagonal matrix of penalty parameters (&amp;#039;&amp;#039;D&amp;lt;sub&amp;gt;ii&amp;lt;/sub&amp;gt;  &amp;gt;= &amp;#039;&amp;#039;0). If (&amp;#039;&amp;#039;x&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt;, s&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt; , p&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;) denotes the current solution estimate and &amp;lt;math&amp;gt;(\hat{x}_k, \hat{t}_k, \hat{pi}_k)&amp;lt;/math&amp;gt; denotes the QP solution, the line search determines a step &amp;lt;math&amp;gt;\alpha_k (0 &amp;lt; \alpha_k \le 1)&amp;lt;/math&amp;gt; such that the new point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left(\begin{array}{c}&lt;br /&gt;
x_{k+1}\\s_{k+1}\\\pi_{k+1}&lt;br /&gt;
\end{array}\right)&lt;br /&gt;
= \left(\begin{array}{c}&lt;br /&gt;
x_k\\s_k\\\pi_k&lt;br /&gt;
\end{array}\right) + \alpha_k \left(\begin{array}{c}&lt;br /&gt;
\hat{x}_k-x_k\\\hat{s}_k-s_k\\\hat{\pi}_k-\pi_k&lt;br /&gt;
\end{array}\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gives a &amp;#039;&amp;#039;sufficient decrease  &amp;#039;&amp;#039;in the merit function.  When necessary, the penalties in &amp;#039;&amp;#039;D &amp;#039;&amp;#039;are increased by the minimum-norm perturbation that ensures descent for &amp;#039;&amp;#039;M &amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
As in NPSOL, &amp;#039;&amp;#039;s&amp;lt;sub&amp;gt;N&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; is adjusted to minimize the merit function as a function of &amp;#039;&amp;#039;s&amp;#039;&amp;#039; prior to the solution of the QP subproblem.&lt;br /&gt;
&lt;br /&gt;
==Treatment of constraint infeasibilities==&lt;br /&gt;
&lt;br /&gt;
SNOPT  makes explicit allowance for infeasible constraints.  First, infeasible &amp;#039;&amp;#039;linear&amp;#039;&amp;#039; constraints are detected by solving the linear program (FLP)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\min_{x,v,w} \quad e^T(v + w)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\text{subject to} \quad l \le \left(\begin{array}{c}&lt;br /&gt;
x\\A_Lx - v + w}&lt;br /&gt;
\end{array}\right) \le u, \quad v \ge 0, \quad w \ge 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;e &amp;#039;&amp;#039;is a vector of ones, and the nonlinear constraint bounds are temporarily excluded from &amp;#039;&amp;#039;l &amp;#039;&amp;#039;and &amp;#039;&amp;#039;u&amp;#039;&amp;#039;.  This is equivalent to minimizing the sum of the general linear constraint violations subject to the bounds on &amp;#039;&amp;#039;x&amp;#039;&amp;#039;.  (The sum is the &amp;#039;&amp;#039;£&amp;#039;&amp;#039;1 -norm of the linear constraint violations. In the linear programming literature, the approach is called &amp;#039;&amp;#039;elastic programming&amp;#039;&amp;#039;.)&lt;br /&gt;
&lt;br /&gt;
The linear constraints are infeasible if the optimal solution of FLP has &amp;#039;&amp;#039;v &amp;#039;&amp;#039;&amp;amp;ne; 0 or &amp;#039;&amp;#039;w &amp;#039;&amp;#039;&amp;amp;ne; 0. SNOPT then terminates without computing the nonlinear functions.&lt;br /&gt;
&lt;br /&gt;
Otherwise, all subsequent iterates satisfy the linear constraints. (Such a strategy allows linear constraints to be used to define a region in which the functions can be safely evaluated.) SNOPT proceeds to solve SparseNP as given, using search directions obtained from the sequence of QP subproblems.&lt;br /&gt;
&lt;br /&gt;
If a QP subproblem proves to be infeasible or unbounded (or if the dual variables &amp;#039;&amp;#039;&amp;amp;pi; &amp;#039;&amp;#039;for the nonlinear constraints become large), SNOPT enters &amp;quot;elastic&amp;quot; mode and thereafter solves the problem (NP(&amp;amp;gamma;))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\min_{x,v,w} \quad f_0(x) + \gamma e^T(v + w)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\text{subject to} \quad l \le \left(\begin{array}{c}&lt;br /&gt;
x\\f(x) - v + w \\A_Lx&lt;br /&gt;
\end{array}\right)&lt;br /&gt;
\le u \quad v \ge 0, \quad w \ge 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;&amp;amp;gamma;&amp;#039;&amp;#039; is a nonnegative parameter (the &amp;#039;&amp;#039;elastic weight &amp;#039;&amp;#039;), and &amp;lt;math&amp;gt;\Obj(x) + \gamma e^T(v + w)&amp;lt;/math&amp;gt; is called a &amp;#039;&amp;#039;composite objective&amp;#039;&amp;#039; (the &amp;lt;math&amp;gt;\ell_1&amp;lt;/math&amp;gt; penalty function for the nonlinear constraints).&lt;br /&gt;
&lt;br /&gt;
The value of &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; may increase automatically by multiples of 10 if the optimal &amp;#039;&amp;#039;v &amp;#039;&amp;#039;and &amp;#039;&amp;#039;w &amp;#039;&amp;#039;continue to be nonzero. If &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; is sufficiently large, this is equivalent to minimizing the sum of the nonlinear constraint violations subject to the linear constraints and bounds. A similar &amp;lt;math&amp;gt;\ell_1&amp;lt;/math&amp;gt; formulation of SparseNP is fundamental to the &amp;lt;math&amp;gt;\ell_1&amp;lt;/math&amp;gt; QP algorithm of Fletcher. See also Conn.&lt;br /&gt;
&lt;br /&gt;
The initial  value of &amp;#039;&amp;#039;&amp;amp;gamma; &amp;#039;&amp;#039;is controlled by the optional parameters Elastic mode and Elastic weight.&lt;/div&gt;</summary>
		<author><name>Elias</name></author>
	</entry>
</feed>