Versions Compared

Key

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

...

  • LogExpr is a logical Expression in the form: Expr,Logical Operator,Expr,THEN,Expr
  • Expr is a numeric or String expression

Remarks

  1. INCASE() is an alternative for structures in the knowledge base consisting of Relations and connected Constraints.
  2. INCASE may be a more compact way of expressing rules, but in contradistinction to Relations and Constraints, all expressions need to be determinable, even if they are invalid based on the logical expressions. Complex logical expressions with brackets and AND, OR etc. are not possible in INCASE, however.
    If the various logical expressions contain the same parameters, the INCASE function is an efficient option. If the various logical expressions contain entirely different parameters which need to be chained to different Relations, the Solution may become inefficiently large and may require lots of input which may not be relevant to your case since the Modeller requires all expressions in the INCASE function to be DETERMINED. In such cases it is much more efficient to use combinations of Relations and Constraints.
  3. IMPORTANT: In a Logical Expression, expression of the same type (STRING or VALUE) should be compared.
  4. Options for Logical Operator:

...

is equivalent to the algorithm:

    If A<5 Then
    B=1
   ElseIf A>9 Then
    B=3
   Else
    B=2
   EndIf

A number of ELSEIF, LogExp can be provided in sequence in INCASE() to simulate a Select Case function.

...