New event date not detected in DateDetector

I am facing some issues with the DateDetector.
I can not provide the code yet as I would need to extract it simplify it to reproduce the problem in separately. First I would like to know if I am not doing a mistake in the general usage.

The use case is the following :

  • a sub class of ConstantThrustManeuver uses a DateDetector initialized without date
  • when some events occur, a date in the future is added to this detector, and tthe action RESET_DERIVATIVES is used (because the additional equations change)
  • when the DateDetector detect an event, the ConstantThrustManeuver changes its state (and action RESET_DERIVATIVES is returned)

It works well in some cases but sometimes a date is not detected.
Is there some restrictions on the adding of events ? I tried to use the RESET_EVENTS actions but in that case my models are not well updated.

Hi Mikael,

RESET_DERIVATIVES includes all the effects of RESET_EVENTS so that usage seems correct. DateDetector should be able to handle that case as well. There could be an issue if DateDetector is reused in multiple propagations, or if multiple dates are added at the same time. With a failing test case I should be able to figure it out fairly quickly. DateDetector is one of the more complex event detectors, perhaps try implementing a simpler detector that only handles one date.


Hi, thank you for your answer. I found a workaround to not use a date detector in my case but that would be better to understand what is going wrong. I will try to reproduce this bad behaviour in a sub test.