Version 2.52
- NodeDialog now properly shows the initial activity value when editing
a node with linear scale
- In order to show more precise values, we use a (very convoluted)
technique to get the "double" value of log-scale node activities. As
UPPAAL cannot generate simulations with all the time points for all
variables (for unknown reasons), we make sure that both values of a
"double" variable were measured in the same instant by merging them into
a unique variable. In doing so, we also need to lose one significant
figure from the .b component: this sacrifice avoids that the merged
number becomes too large (larger than one million), forcing UPPAAL to
output it in the exponential notation (e.g. 1.23456e6 note that we get 5
digits after the ".", losing the last digit) and thus producing very
imprecise numbers. The merged number (the type is called
"collapsedDouble" in the model) m is produced from a double number d
with the formula m = ((d.b / 10) * 201) + (d.e + 100). This
automatically assumes that d.e is always in the range [-100, 100] (and,
for convenience, "shifts" it to get a positive number), and indeed we
now declare that as a limit for the .e component of the double
structure, and that d.b is in the range [-9999, 9999]. This last
assumption is true if we assume that the functions producing double
numbers are all correct. The last digit of d.b is lost with the d.b / 10
operation, while the multiplication by 201 is used to "make space" for
the value of d.e (which is shifted to be in [0, 200]). The reverse
operation is then made in UppaalModelAnalyserSMC when reading a
simulation for a log-scale node: we first deduce the original double d
value from the m merged number, and then transform it into a proper
double. So we get d.b = (n / 201) * 10 (with "/" the integer division),
d.e = n % 201 - 100. Then we find the final value v = d.b * Math.pow(10,
d.e).