WHERE: Difference between revisions

From ASCEND
Jump to navigation Jump to search
Line 33: Line 33:
See also:
See also:
* [[Object-oriented modelling]]
* [[Object-oriented modelling]]
* REFINES
* [[REFINES]]


== Use in ALIASES statement ==
== Use in ALIASES statement ==

Revision as of 09:28, 31 July 2010

WHERE is used in object-oriented modelling to impose constraints on the parameters of a parametric model in ASCEND.

WHERE is also used in ALIASES statements to specify the indexes to be used in an array of aliases.


See also ALIASES, WILL_BE and WILL_BE_THE_SAME.

Use in model declaration

MODEL demo_column(
	components IS_A set OF symbol_constant;

	reference IS_A symbol_constant;
	n_trays IS_A integer_constant;
	feed_location IS_A integer_constant;

) WHERE (
	reference IN components == TRUE;
	n_trays > 5;

	feed_location > 2;
	feed_location < n_trays - 2;
) REFINES colmodel();

   (*... rest of model follows ...*)

END demo_column;

The above model is instantiated using the code

demo IS_A demo_column(['methanol','water'],'water',13,7);

See also:

Use in ALIASES statement

For an example, see ALIASES.