Age of tokens in simulation is wrong
Bug #352457 reported by
Jiri Srba
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
TAPAAL |
Fix Released
|
High
|
Jiri Srba |
Bug Description
Open the attached net, go to simulation mode and run
Time delay: 0.3
T0
Time delay: 0.01
Time delay: 0.01
Time delay: 0.01
and this point the age of tokens still shows only 0.32
Fire now T1 and the age of tokens in places and on MouseOver is different.
Changed in tapn: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Joakim Bygs says:
I made a place and a couple of tokens, repeatedly change the age with
0.01 and at some point it will not update.
Then I tried with 0.1 and I found that the problem is that at some point
it will update, not 0.1 but 0.09.
The graphic at the places is limited to showing 2 decimals, so when
issuing a 0.01 that instead becomes 0.009, then it looks like the age is
not updated in the place.
I am really tired of these float problems and I don't really see what
more than one (perhaps two) decimal(s) after the separator is good for.
So I suggest to simplify the ages to only have one decimal after the
separator - perhaps using doubles and formating to one decimal is
enough, but we could also make our own number class that has two
integers and a separator; one integer in front of the separator and one
integer from 0 to 9 after the separator.