Closed modelica-trac-importer closed 5 years ago
Comment by perost on 7 Oct 2013 11:45 UTC Fixed in om:r17580. Let me know if this is an acceptable solution.
Comment by perost on 8 Oct 2013 09:35 UTC Improved fix in om:r17600 and om:r17601.
Comment by hansolsson on 8 Oct 2013 13:27 UTC Still too numerically sensitive, since zero difference for crossing function. One possibility would be:
when not initial() then
x = 6;
end when;
when x >= 5 then
...
Another would be to use something like
Boolean activated=time>=1e-3;
algorithm
when activated and x>=2 then
...
elsewhen activated and x>=1 then
...
end
assert(not activated or ..., "");
Comment by perost on 14 Oct 2013 09:17 UTC Fixed in om:r17678 by using the first suggestion (x = 6).
Modified by perost on 10 Feb 2014 16:57 UTC
Modified by dietmarw on 10 Feb 2014 17:06 UTC
Reported by hansolsson on 30 Sep 2013 10:47 UTC The updated ModelicaCompliance.Algorithms.When.WhenPriority and ModelicaCompliance.Equations.When.WhenPriority have a when-statement that never should be triggered.
See mapping of when to if in 8.3.5.1; i.e. the mapping implies that a when that starts true does not trigger an event initially.
Migrated-From: https://trac.modelica.org/Modelica/ticket/1295