Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the example below 'X1' is a reference to a variable and 'a' and 'b' are references to a coefficient.

The example below uses an if statement. Below 'X' is a reference to a variable and 'a' is a reference to a coefficient.

Code Block
xml
xml

<transformation id="user simple with if else statement test">
	<user>
		<simple>
			<!-- if X > 3, then the expression part if(X &gt; 3, 10.5, -2) is replaced with 10.5 -->
			<!-- if X <= 3, then the expression part if(X &gt; 3, 10.5, -2) is replaced with -2 -->
			<expression>if(X &gt; 3, 10.5, -2) + 5*a</expression>
			<coefficientSet>
				<coefficient id="a" value="1.5"/>
			</coefficientSet>
			<outputVariable>
				<variableId>Y</variableId>
			</outputVariable>
		</simple>
	</user>
</transformation>