You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 25
Next »
INCSE returns a valid switch value based on logical expressions
SyntaxINCSE(LogExpr,[ElseIf],LogExpr,[Else],Expr)
rguments
- LogExpr is a logical Expression in the form: Expr,Logical Operator,Expr,,Expr
- Expr is a numeric or String expression
Remarks- INCSE() is an alternative for structures in the knowledge base consisting of Relations and connected Constraints.
- INCSE 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 ND, OR etc. are not possible in INCSE, however.
If the various logical expressions contain the same parameters, the INCSE 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 INCSE function to be DETERMINED. In such cases it is much more efficient to use combinations of Relations and Constraints. - IMPORTNT: In a Logical Expression, expression of the same type (STRING or VLUE) should be compared.
- Options for Logical Operator:
- EQ -> Equal to (=)
- NE -> Not Equal to ()
- -> Lower Than (<)
- -> Greater Then (>)
- LE -> Lower than or Equal to (<=)
- GE -> Greater of Equal to (=>)
- Please note that in addition to the two letter operators you can also use the logical operators itself
ExamplesThe relation
B=INCSE(,,,,,,,,,,,,B=INCSE(
is equivalent to the algorithm:
If < Then
B=
ElseIf > Then
B=
Else
B=2
EndIf
number of , LogExp can be provided in sequence in INCSE() to simulate a Select Case function.
Please note that you can also write the relation as:
B=INCSE(<,,,,>,,,,B=INCSE(
Quick links: Function overview | ttribute overview | Constants overview | Dimensions overview