I am using the FixedRotation
component and get a division by zero error. This happens in a translated expression of the form
var = nominator/fixedRotation.R_rel_inv.T[1,3]
because T[1,3]
is 0 for the chosen parameters:
n={0,1,0}
angle=180 deg
.
It seems that Openmodelica keeps the symbolic variable and tries to be generic but in this case this leads to division by zero because it chooses to put T[1,3]
in the denominator.
What are the modifications in order to tell the compiler that the evaluated values T[1,3]
for the compilation shall be considered as if the values were hard coded? R_rel
is internally in fixedRotation
not defined with Evaluate=true
...
Should I use custom version of this block? (when I copy paste the source code to a new model and set the parameters R_rel
and R_rel_inv
to Evalute=true
then the simulation works without division by zero)...
BUT is there a modifier to tell from outside that a parameter shall be Evaluate=true
without the need to make a new model?
Any other way to prevent division by zero?