<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ascend4.org/index.php?action=history&amp;feed=atom&amp;title=Conditional_modelling</id>
	<title>Conditional modelling - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ascend4.org/index.php?action=history&amp;feed=atom&amp;title=Conditional_modelling"/>
	<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Conditional_modelling&amp;action=history"/>
	<updated>2026-05-03T17:03:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=5671&amp;oldid=prev</id>
		<title>Jpye: /* Other conditional syntax */</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=5671&amp;oldid=prev"/>
		<updated>2016-07-09T04:57:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Other conditional syntax&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 04:57, 9 July 2016&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-l87&quot;&gt;Line 87:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 87:&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;=== Other conditional syntax ===&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;=== Other conditional syntax ===&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;There is also syntax for providing conditional functionality in the &amp;lt;tt&amp;gt;METHODS&amp;lt;/tt&amp;gt; section of a model. See [[SWITCH]], [[IF]] and also see [[Vicente Rico-Ramirez]]&#039; thesis (in our [[publications]] page).&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;There is also syntax for providing conditional functionality in the &amp;lt;tt&amp;gt;METHODS&amp;lt;/tt&amp;gt; section of a model. See [[SWITCH]], [[IF&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]], [[SELECT&lt;/ins&gt;]] and also see [[Vicente Rico-Ramirez]]&#039; thesis (in our [[publications]] page).&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 [[EVENT]] syntax (experimental) supports instantaneous boundary events, as opposed to &amp;#039;region-like&amp;#039; conditional behaviour, but only has relevance for [[dynamic modelling]].&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 [[EVENT]] syntax (experimental) supports instantaneous boundary events, as opposed to &amp;#039;region-like&amp;#039; conditional behaviour, but only has relevance for [[dynamic modelling]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jpye</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=4894&amp;oldid=prev</id>
		<title>Jpye: /* Other conditional syntax */</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=4894&amp;oldid=prev"/>
		<updated>2015-03-24T08:52:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Other conditional syntax&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 08:52, 24 March 2015&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-l88&quot;&gt;Line 88:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 88:&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;There is also syntax for providing conditional functionality in the &amp;lt;tt&amp;gt;METHODS&amp;lt;/tt&amp;gt; section of a model. See [[SWITCH]], [[IF]] and also see [[Vicente Rico-Ramirez]]&amp;#039; thesis (in our [[publications]] page).&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;There is also syntax for providing conditional functionality in the &amp;lt;tt&amp;gt;METHODS&amp;lt;/tt&amp;gt; section of a model. See [[SWITCH]], [[IF]] and also see [[Vicente Rico-Ramirez]]&amp;#039; thesis (in our [[publications]] page).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The [[EVENT]] syntax (experimental) supports instantaneous boundary events, as opposed to &#039;region-like&#039; conditional behaviour, but only has relevance for [[dynamic modelling]].&lt;/ins&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;&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;== Examples ==&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;== Examples ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jpye</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=3626&amp;oldid=prev</id>
		<title>Jpye: /* Slack variables */</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=3626&amp;oldid=prev"/>
		<updated>2012-05-11T23:42:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Slack variables&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 23:42, 11 May 2012&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-l123&quot;&gt;Line 123:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 123:&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;http://www.gams.com/dd/docs/solvers/conopt.pdf&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;http://www.gams.com/dd/docs/solvers/conopt.pdf&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;Slack variables won&#039;t normally work with regular [[NLA]] problems, since there is nothing to drive the slack variables to zero when they are not active.&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;Slack variables won&#039;t normally work with regular [[NLA]] problems, since there is nothing to drive the slack variables to zero when they are not active&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. In those cases, sometimes the [[abs]] function can help to create simple conditional behaviour&lt;/ins&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;&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;== Boundary crossing in dynamic models ==&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;== Boundary crossing in dynamic models ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jpye</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=3625&amp;oldid=prev</id>
		<title>Jpye: /* Slack variables */</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=3625&amp;oldid=prev"/>
		<updated>2012-05-11T23:41:33Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Slack variables&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 23:41, 11 May 2012&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;== Slack variables ==&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;== Slack variables ==&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;Note that in some &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;cases&lt;/del&gt;, it is possible to model conditional expressions without the need for specialised conditional syntax. This approach has been used in the current  thermodynamics library in ASCEND.&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;Note that in some &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;optimisation problems&lt;/ins&gt;, it is possible to model conditional expressions without the need for specialised conditional syntax. This approach has been used in the current  thermodynamics library in ASCEND.&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;For an example, see the model &amp;#039;&amp;#039;&amp;#039;iapws95_2phase&amp;#039;&amp;#039;&amp;#039; in the {{src|models/johnpye/iapws95.a4c}} file in the [[ModelLibrary]].&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;For an example, see the model &amp;#039;&amp;#039;&amp;#039;iapws95_2phase&amp;#039;&amp;#039;&amp;#039; in the {{src|models/johnpye/iapws95.a4c}} file in the [[ModelLibrary]].&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-l122&quot;&gt;Line 122:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 122:&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;http://www.gams.com/dd/docs/solvers/conopt.pdf&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;http://www.gams.com/dd/docs/solvers/conopt.pdf&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Slack variables won&#039;t normally work with regular [[NLA]] problems, since there is nothing to drive the slack variables to zero when they are not active.&lt;/ins&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;&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;== Boundary crossing in dynamic models ==&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;== Boundary crossing in dynamic models ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jpye</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=3618&amp;oldid=prev</id>
		<title>Jpye: /* Slack variables */</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=3618&amp;oldid=prev"/>
		<updated>2012-05-09T16:55:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Slack variables&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 16:55, 9 May 2012&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-l121&quot;&gt;Line 121:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 121:&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;There are some &amp;#039;&amp;#039;very worthwhile&amp;#039;&amp;#039; comments on how to go about using slack variables in the following document (page 17):&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;There are some &amp;#039;&amp;#039;very worthwhile&amp;#039;&amp;#039; comments on how to go about using slack variables in the following document (page 17):&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;http://www.gams.com/solvers/conopt.pdf&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;http://www.gams.com&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/dd/docs&lt;/ins&gt;/solvers/conopt.pdf&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;== Boundary crossing in dynamic models ==&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;== Boundary crossing in dynamic models ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jpye</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=1330&amp;oldid=prev</id>
		<title>Jpye: /* Slack variables */</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=1330&amp;oldid=prev"/>
		<updated>2010-08-15T08:17:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Slack variables&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 08:17, 15 August 2010&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-l121&quot;&gt;Line 121:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 121:&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;There are some &amp;#039;&amp;#039;very worthwhile&amp;#039;&amp;#039; comments on how to go about using slack variables in the following document (page 17):&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;There are some &amp;#039;&amp;#039;very worthwhile&amp;#039;&amp;#039; comments on how to go about using slack variables in the following document (page 17):&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;http://www.gams.com/solvers/conopt.pdf&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;http://www.gams.com/solvers/conopt.pdf&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;== Boundary crossing in dynamic models ==&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;== Boundary crossing in dynamic models ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jpye</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=1329&amp;oldid=prev</id>
		<title>Jpye: /* Future */</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=1329&amp;oldid=prev"/>
		<updated>2010-08-15T08:16:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Future&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 08:16, 15 August 2010&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-l129&quot;&gt;Line 129:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 129:&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;== Future ==&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;== Future ==&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;It is proposed that we implement an open-source alternative optimiser for ACEND so that [[CONOPT]] is not a requirement for conditional modelling. A good candidate appears to be &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;a href=&quot;&lt;/del&gt;https://projects.coin-or.org/Ipopt&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot; class=&quot;external text&quot; title=&quot;https://projects.coin-or.org/Ipopt&quot; rel=&quot;nofollow&quot;&amp;gt;&lt;/del&gt;IPOPT&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/a&amp;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;It is proposed that we implement an open-source alternative optimiser for ACEND so that [[CONOPT]] is not a requirement for conditional modelling. A good candidate appears to be &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/ins&gt;https://projects.coin-or.org/Ipopt IPOPT&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/ins&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;&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;See also [[Integration of Conditional Models]].&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;See also [[Integration of Conditional Models]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jpye</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=1328&amp;oldid=prev</id>
		<title>Jpye at 08:16, 15 August 2010</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=1328&amp;oldid=prev"/>
		<updated>2010-08-15T08:16:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://ascend4.org/index.php?title=Conditional_modelling&amp;amp;diff=1328&amp;amp;oldid=105&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Jpye</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=105&amp;oldid=prev</id>
		<title>UploadBot: Restored page from Google Cache, uploaded by John Pye</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Conditional_modelling&amp;diff=105&amp;oldid=prev"/>
		<updated>2010-05-13T13:51:14Z</updated>

		<summary type="html">&lt;p&gt;Restored page from Google Cache, uploaded by John Pye&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Conditional modelling&amp;#039;&amp;#039;&amp;#039;, in the context of ASCEND, refers to the use of a solver which can change the equations for which it is seeking a solution, depending on the current values of the guessed variables in the model, as the solution progresses. An example of a use for conditional modelling is that pipe flow can change from laminar to turbulent depending on the speed of the flow; in the laminar region the friction equations are very different to those in the turbulent region.&lt;br /&gt;
&lt;br /&gt;
ASCEND currently provides just one solver that can solve this type of model, called [[CMSlv]], but the architecture is such that other conditional solvers (aka MINLP solvers?) can also be connected if desired.&lt;br /&gt;
&lt;br /&gt;
The [[CMSlv]] solver in ASCEND uses the &amp;#039;boundary crossing&amp;#039; algorithm, and is currently fully functional, but &amp;#039;&amp;#039;&amp;#039;requires the closed-source [[CONOPT]] solver&amp;#039;&amp;#039;&amp;#039;. ASCEND users can get a free trial copy of CONOPT, see [[What if I do not have CONOPT]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
The documentation on ASCEND syntax is a little dated, so the current syntax will be summarised here.&lt;br /&gt;
&lt;br /&gt;
=== Logical relations ===&lt;br /&gt;
&lt;br /&gt;
You write logical relations in the declarative part of your &amp;lt;tt&amp;gt;MODEL&amp;lt;/tt&amp;gt; using the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;mybool1, mybool2 IS_A boolean_var;&lt;br /&gt;
&lt;br /&gt;
mybool1 == mybool2;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Boundary conditions ===&lt;br /&gt;
&lt;br /&gt;
To declare a boolean variable that becomes TRUE when a certain real-valued boundary is crossed, use the &amp;lt;tt&amp;gt;CONDITIONAL&amp;lt;/tt&amp;gt; statement along with a logical relation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;myvar1, myvar2 IS_A solver_var;&lt;br /&gt;
CONDITIONAL&lt;br /&gt;
    myboundary1: myvar1 &amp;amp;lt; myvar2;&lt;br /&gt;
&lt;br /&gt;
END CONDITIONAL;&lt;br /&gt;
&lt;br /&gt;
mybool1 IS_A boolean_var;&lt;br /&gt;
mybool1 == SATISFIED(myboundary1);&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that normally the relations inside a &amp;lt;tt&amp;gt;CONDITIONAL&amp;lt;/tt&amp;gt; section would be inequalities. In fact the relations can be equalities as well, or even logical relations. In the case of real-valued equality conditions, the following syntax is advisable, to specify a tolerance limit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;mybool1 == SATISFIED(myequality1, 1e-8 {kJ/kg});&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional relations ===&lt;br /&gt;
&lt;br /&gt;
To use the value of a boolean var to control what equations are active in your model, use a &amp;lt;tt&amp;gt;WHEN&amp;lt;/tt&amp;gt; statement (continuing from the previous model:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;myvar3 IS_A solver_var;&lt;br /&gt;
&lt;br /&gt;
mycondexpr1: myvar3 = 2 * (myvar1 - myvar2);&lt;br /&gt;
mycondexpr2: myvar3 = sin(myvar1 - myvar2);&lt;br /&gt;
&lt;br /&gt;
WHEN(mybool1)&lt;br /&gt;
    CASE TRUE:&lt;br /&gt;
        USE mycondexpr1;&lt;br /&gt;
&lt;br /&gt;
    CASE FALSE:&lt;br /&gt;
        USE mycondexpr2;&lt;br /&gt;
END WHEN;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use multiple variables in your &amp;lt;tt&amp;gt;WHEN&amp;lt;/tt&amp;gt; list, which occasionally saves some typing. Also there is the &amp;lt;tt&amp;gt;OTHERWISE&amp;lt;/tt&amp;gt; clause.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;WHEN(mybool1,mybool2)&lt;br /&gt;
&lt;br /&gt;
    CASE TRUE,FALSE:&lt;br /&gt;
        ...&lt;br /&gt;
    CASE FALSE,FALSE:&lt;br /&gt;
&lt;br /&gt;
        ...&lt;br /&gt;
    OTHERWISE:&lt;br /&gt;
        ...&lt;br /&gt;
END WHEN;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following are important observations about the implementation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* The WHEN statement does not mean conditional compilation. We create and have available the data structures for all of the variables and equations in each of the models. This is actually a requirement for the solution algorithms of conditional models. All the models and equations whose name is given in each of the cases should be declared inside the model which contains the WHEN statement.&lt;br /&gt;
* The variables in the list of variables can be of any type among boolean, integer or symbol or any combination of them. That is, we are not limited to the use of boolean variables. Obviously, The list of values in each case must be in agreement with the list of variables in the number of elements and type of each element. In other words, order matters in the list of variables of the WHEN statement, and parentheses are enclosing this list to make clear such a feature.&lt;br /&gt;
* Names of arrays of models or equations are also allowed inside the scope of each CASE.&lt;br /&gt;
&lt;br /&gt;
The WHEN statement represents an important contribution to modeling: it allows the user to define the domain of validity of both models and equations inside the cases of a WHEN statement. This feature&lt;br /&gt;
enormously increases the scope of modeling in an equation based modeling environment.&lt;br /&gt;
&lt;br /&gt;
Mainly, there are two different ways in which the WHEN statement can&lt;br /&gt;
be used.:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* First, the WHEN statement can be used to select a configuration of a problem among several alternative configurations.&lt;br /&gt;
* Second, in combination with logical relations, the WHEN statement can be used for conditional programming. That is, a problem in which the system of equations to be solved depends on the solution of the problem. A typical example of this situation is the laminar-turbulent flow transition. The selection of the equation to calculate the friction factor depends on the value of the Reynolds number, which is an unknown in the problem.&lt;br /&gt;
&lt;br /&gt;
=== Other conditional syntax ===&lt;br /&gt;
&lt;br /&gt;
There is also syntax for providing conditional functionality in the &amp;lt;tt&amp;gt;METHODS&amp;lt;/tt&amp;gt; section of a model. See Vicente Rico-Ramirez&amp;#039; thesis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Some complete worked examples exist, for the following cases:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* condensing heat exchanger {{src|models/heatex.a4c}}&lt;br /&gt;
* shocks in adiabatic compressible flow {{src|models/sonic.a4c}}&lt;br /&gt;
* pipe flow network with one-way valves {{src|models/pipeline.a4c}}&lt;br /&gt;
* choosing reactor feedstocks [http://ascend.cheme.cmu.edu/ftp/pdfMisc/when_model.pdf documentation] and {{src|models/when_demo.a4c}}&lt;br /&gt;
* Rachford-Rice flash model {{src|models/rachford.a4c}}&lt;br /&gt;
* Mass balance for a linear process with multiple &amp;#039;modes&amp;#039; {{src|models/linmassbal.a4c}}&lt;br /&gt;
&lt;br /&gt;
== Further documentation ==&lt;br /&gt;
&lt;br /&gt;
The primary reference for ASCEND&amp;#039;s conditional modelling is:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Vicente Rico-Ramirez&amp;#039; thesis, &amp;lt;a href=&amp;quot;https://ascend.cheme.cmu.edu/ftp/pdfThesis/victhesis.pdf&amp;quot; class=&amp;quot;external text&amp;quot; title=&amp;quot;https://ascend.cheme.cmu.edu/ftp/pdfThesis/victhesis.pdf&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Representation, Analysis and Solution of Conditional Models in an Equation-Based Environment&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further source of documentation (some of which is a &amp;#039;&amp;#039;&amp;#039;proposed&amp;#039;&amp;#039;&amp;#039; implementation) include:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* The ASCEND [http://ascend.cheme.cmu.edu/ftp/pdfHowto/howto-conditional.pdf HOWTO: Conditional Modelling]&lt;br /&gt;
* Rico-Ramirez, V., Allan, B.A. and Westerberg, A.W. [http://ascend.cheme.cmu.edu/ftp/pdfPapersRptsSlides/tech_modeling.pdf Conditional Modeling in an Equation-Based Environment] (PDF), Carnegie Mellon University, ICES Technical Report 06-242-98, 1998.&lt;br /&gt;
* Zaher&amp;#039;s Thesis, [http://ascend.cheme.cmu.edu/ftp/pdfThesis/joethesis.pdf Conditional Modeling]&lt;br /&gt;
* There are further documents in the [http://ascend.cheme.cmu.edu/ascend_bibliography.htm Ascend Bibliograpy]&lt;br /&gt;
&lt;br /&gt;
== Slack variables ==&lt;br /&gt;
&lt;br /&gt;
Note that in some cases, it is possible to model conditional expressions without the need for specialised conditional syntax. This approach has been used in the current  thermodynamics library in ASCEND.&lt;br /&gt;
&lt;br /&gt;
For an example, see the model &amp;#039;&amp;#039;&amp;#039;iapws95_2phase&amp;#039;&amp;#039;&amp;#039; in the {{src|models/johnpye/iapws95.a4c}} file in the [[ModelLibrary]].&lt;br /&gt;
&lt;br /&gt;
There are some &amp;#039;&amp;#039;very worthwhile&amp;#039;&amp;#039; comments on how to go about using slack variables in the following document (page 17):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://www.gams.com/solvers/conopt.pdf]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Boundary crossing in dynamic models ==&lt;br /&gt;
&lt;br /&gt;
Some work is being done on adding support for integration of conditional dynamic models. This is taking place as part of the [[IDA]] solver work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future ==&lt;br /&gt;
&lt;br /&gt;
It is proposed that we implement an open-source alternative optimiser for ACEND so that [[CONOPT]] is not a requirement for conditional modelling. A good candidate appears to be &amp;lt;a href=&amp;quot;https://projects.coin-or.org/Ipopt&amp;quot; class=&amp;quot;external text&amp;quot; title=&amp;quot;https://projects.coin-or.org/Ipopt&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;IPOPT&amp;lt;/a&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also [[Integration of Conditional Models]].&lt;br /&gt;
&lt;br /&gt;
See also [[SELECT]], which is used to produce flexible models that are not, strictly, conditional models in the sense that is intended here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [[Category:Documentation]]&lt;br /&gt;
[[Category:Syntax]]&lt;/div&gt;</summary>
		<author><name>UploadBot</name></author>
	</entry>
</feed>