“Error: Trying to assign a discrete variable a value with higher variability.”
Example: The error message occurs when checking the following model “FunctionCall.mo” in DYMOLA 6.
model FunctionCall
Boolean result;
algorithm
result := F(time);
end FunctionCall;
function F
input Real p1;
output Boolean result;
algorithm
if (p1 < 0.5) then
result:=true;
else
result:=false;
end if;
end F;
It’s unclear to me what should be wrong with this model.
Regards,
Felix