- OAFunc-expression
expression (OAFunc)¶
Works with VSimBase, VSimEM, VSimPD, VSimPA, and VSimVE licenses.
A function of one argument, given via a UserFunc
expression Parameters¶
- argMin (float, optional, default = minimum float)
the lower bound of the function’s domain
- argMax (float, optional, default = maximum float)
the upper bound of the function’s domain
- fmin (float, optional, default = minimum float)
the minimum function value (if specified, the value will be clamped above fmin)
- fmax (float, optional, default = maximum float)
fmax: the maximum function value (if specified, the value will be clamped below fmax)
- expression (string)
The function expression (can be given directly for simple functions), required if a UserFunc code block is not given; in this case, a UserFunc of
kind=expression
is automatically created with this expression.
- outerBoundsValue (string, optional)
specifies the function value when the argument is outside the function’s domain.
“null”: set value to zero
“constant”: set value to the function’s value at the nearest domain boundary (i.e., argMin or argMax)
“except”: halt the simulation with an error.
- UserFunc (code block)
A UserFunc can be specified directly; it must take one argument, and return a scalar. This code block is required if a string
expression
is not given.
- variable (string, optional, default = x)
Name of the variable in the expression.
Example expression Block¶
<OAFunc oafunc1>
kind = expression
expression = cos(x)
</OAFunc>