<?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=MODEL</id>
	<title>MODEL - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ascend4.org/index.php?action=history&amp;feed=atom&amp;title=MODEL"/>
	<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=MODEL&amp;action=history"/>
	<updated>2026-05-03T20:33:19Z</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=MODEL&amp;diff=6295&amp;oldid=prev</id>
		<title>Jpye at 11:08, 11 January 2024</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=MODEL&amp;diff=6295&amp;oldid=prev"/>
		<updated>2024-01-11T11:08:13Z</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 11:08, 11 January 2024&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-l58&quot;&gt;Line 58:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 58:&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 [[METHODS]] for how to use METHOD statements to initialise your model so that it is ready to solve.&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 [[METHODS]] for how to use METHOD statements to initialise your model so that it is ready to solve.&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;/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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;See [[How do I fix my model|How do I fix my model?]] for tips on how to get a broken model working.&lt;/ins&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; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;  [[Category: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;  [[Category: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;div&gt;[[Category:Documentation]]&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;[[Category:Documentation]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff:1.41:old-4559:rev-6295:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Jpye</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=MODEL&amp;diff=4559&amp;oldid=prev</id>
		<title>Jpye at 06:04, 24 February 2014</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=MODEL&amp;diff=4559&amp;oldid=prev"/>
		<updated>2014-02-24T06:04:29Z</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 06:04, 24 February 2014&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-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&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;&#039;&#039;This text has been copied from the [[Category:Documentation|PDF documentation]] and subsequently modified.&#039;&#039;&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;&#039;&#039;This text has been copied from the [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:&lt;/ins&gt;Category:Documentation|PDF documentation]] and subsequently modified.&#039;&#039;&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;An ASCEND &amp;#039;&amp;#039;&amp;#039;model&amp;#039;&amp;#039;&amp;#039; has a declarative part and an optional procedural part&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;An ASCEND &amp;#039;&amp;#039;&amp;#039;model&amp;#039;&amp;#039;&amp;#039; has a declarative part and an optional procedural part&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff:1.41:old-125:rev-4559:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Jpye</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=MODEL&amp;diff=125&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=MODEL&amp;diff=125&amp;oldid=prev"/>
		<updated>2010-05-13T13:54:34Z</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;This text has been copied from the [[Category:Documentation|PDF documentation]] and subsequently modified.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
An ASCEND &amp;#039;&amp;#039;&amp;#039;model&amp;#039;&amp;#039;&amp;#039; has a declarative part and an optional procedural part&lt;br /&gt;
headed by the METHODS word. Models are essentially containers for variables&lt;br /&gt;
and relations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;MODEL foo;&lt;br /&gt;
    (* statements about foo go here*)&lt;br /&gt;
METHODS&lt;br /&gt;
    (* METHODs for foo go here*)&lt;br /&gt;
&lt;br /&gt;
END foo;&amp;lt;/source&amp;gt;&lt;br /&gt;
The first part of the MODEL contains variable declarations and equations (&amp;#039;relations&amp;#039;). The second part contains [[METHODS]], which are used to manipulate and initialise the model, and also to perform any other reporting and procedural roles that the user can think of.&lt;br /&gt;
&lt;br /&gt;
A model can be built up as a &amp;#039;&amp;#039;&amp;#039;refinement&amp;#039;&amp;#039;&amp;#039; simpler &amp;#039;base&amp;#039; models, using the [[REFINES]] statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;MODEL bar REFINES foo;&lt;br /&gt;
    (*additional statements about foo *)&lt;br /&gt;
METHODS&lt;br /&gt;
    (* additional METHODs for bar *)&lt;br /&gt;
&lt;br /&gt;
END bar;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Models can also be &amp;#039;parameterised&amp;#039;, so that they work a bit like &amp;#039;functions&amp;#039; in C, Python and other languages. In other words, they only work if you pass them some parameters when you instantiate them. A &amp;#039;&amp;#039;&amp;#039;flowsheet&amp;#039;&amp;#039;&amp;#039; model can then be built up using a set of parameterised (and reusable, general purpose) sub-models. An example is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;MODEL column(&lt;br /&gt;
&lt;br /&gt;
	ntrays WILL_BE integer_constant;&lt;br /&gt;
	components IS_A set of symbol_constant;&lt;br /&gt;
&lt;br /&gt;
);&lt;br /&gt;
	stage[1..ntrays] IS_A simple_tray;&lt;br /&gt;
END column;&lt;br /&gt;
&lt;br /&gt;
MODEL flowsheet;&lt;br /&gt;
	tower4size IS_A integer_constant;&lt;br /&gt;
	tower4size :== 22;&lt;br /&gt;
&lt;br /&gt;
	ct IS_A column(tower4size,[c5,c6]);&lt;br /&gt;
	(* additional flowsheet statements *)&lt;br /&gt;
END flowsheet;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the column model takes the first argument, ntrays, by &lt;br /&gt;
reference, using the [[WILL_BE]] keyword. That is, ct.ntrays is an alias for the flowsheet instance tower4size.&lt;br /&gt;
tower4size must be compiled and assigned a value before we will attempt&lt;br /&gt;
to compile the column model instance ct. The second argument is taken&lt;br /&gt;
by value, [c5,c6], and assigned to components, a column part that was declared with IS_A in the parameter list. There is only one name for this set,&lt;br /&gt;
ct.components. Note that in the flowsheet model there is no part that is a&lt;br /&gt;
set of symbol_constant.&lt;br /&gt;
&lt;br /&gt;
The use of parameters in ASCEND modeling requires some thought. Beginners may&lt;br /&gt;
wish to create new models without parameters until they are comfortable using the existing parameterized library definitions. Parameters are intended to&lt;br /&gt;
support model reuse and efficient compilation which are not issues in the very&lt;br /&gt;
earliest phase of developing novel models.&lt;br /&gt;
&lt;br /&gt;
See also [[Object-oriented modelling]] for more examples of how to build up complex models.&lt;br /&gt;
&lt;br /&gt;
See [[METHODS]] for how to use METHOD statements to initialise your model so that it is ready to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [[Category:Syntax]]&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>UploadBot</name></author>
	</entry>
</feed>