@lenaRB : I reviewed code generated by the compiler for the CountInside example.
One first remark: there is one warning for the CRMLClock_build of the CRML2Modelica library.
This is due to the equation below comparing a Real with an Integer:
clock.out = Functions.cvBooleanToBoolean4(time==clock.ticks[clock.counter]);
A better option could be this one (eps being a small number):
clock.out = Functions.cvBooleanToBoolean4(abs(time - clock.ticks[clock.counter]) < eps);
@lenaRB : I reviewed code generated by the compiler for the CountInside example.
One first remark: there is one warning for the
CRMLClock_buildof the CRML2Modelica library.This is due to the equation below comparing a
Realwith anInteger:clock.out = Functions.cvBooleanToBoolean4(time==clock.ticks[clock.counter]);A better option could be this one (
epsbeing a small number):clock.out = Functions.cvBooleanToBoolean4(abs(time - clock.ticks[clock.counter]) < eps);