Documentation Home Page HYPERSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

TestView Command | General | Assign

Assign Dialog Box


The command Assign is used, as the name implies, to assign values to variables. It is necessary to initialize variables in many cases:

  • For the if expression in a loop to function
  • To evaluate expressions before using them in other commands such as Miscellaneous or Pause/message (which does not support expression evaluation)
  • To output signal values or component parameter values in a tableOut report

If a variable is not initialized before being used in the Processing command or Expression command for instance, it will cause an error and the test sequence will abort.


This command uses the ScopeView calculation engine, meaning that it is possible to use the functions from ScopeView (e.g. ‘max’). For all intent and purposes, ‘Eval’, ‘Expression’ and ‘Assign’ yield the same result, the only difference is the visual presentation of the dialog box and the capability to process one or more expressions.

Differences:

EvalCan only evaluate one expression.
ExpressionCan evaluate several expressions.
AssignCan evaluate several expressions and has the ‘multi-param’ mode.






OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323