Vector.play for continuous is supposed to be second order correct during a simulation.
This requires that the variables that are filled by the vector sometimes need to be
evaluated at t and sometimes at t+dt/2 depending on the which part of the fixed step
method is being computed. Since Vector.play has no way of knowing which phase
the variable is used, it computes it in both phases. That is unfortunate in your example
since temp() is not setting any variable at all.
The reason for the extra call at the tVec values is that those are points of (in this case, first derivative)
discontinuities and so an explicit event is used. This is particularly important for
variable step methods. In your case they can be avoided by explicitly identifying the
discontinuities (in your case there are none but I put one in as an example instead
of using a 0 size vector).
Code: Select all
dvec = new Vector(1)
dvec.x = int(tVec.size/2)
vVec.play("temp($1)", tVec, dvec)