Open fidadoma opened 4 years ago
@jirilukavsky What if we add code that would check that does not break some constraints (otherwise regenerate this step)moment_next <- step_function(moment, timescale[i], settings, ...)
?
I am aware of this. So far, the problem was approached by using very small time steps (1/100 s) and adding extra values for bouncing limits (e.g., 2.05 deg instead of 2.0 deg). The problem is that some step_functions are deterministic, so regenerating does not solve the problem.
When generating trajectories, objects can move outside the arena. The probable cause is the order of the bouncing corrections and step_functions (bouncing corrections change the direction, but the step size function can move) in function make_random_trajectory
Following code reproduces the error