Skip to content

Draft: WIP: Fastino ramp collision detection

Thomas Niederprüm requested to merge fastino_collision_detection into master

Description

Currently Fastino ramps are slightly moved in time if they have the same starting time to avoid RTIO event collisions. While this covers ramps with the same timestep and the same starting time, we still have problems if ramps with different parameters overlap in time and produce one or few event collisions. To also cover this case we need to:

  • Store the starttime, timestep and duration of the ramp upon registration of the ramp
  • Efficiently calculate if collisions appear for any newly registered ramp with all registered ramps that overlap with the new one. Of course one could numerically calculate the times for each step and check for coincidences, but that will most likely take too long. We need thus to check if there is an analytical way of finding collisions from the parameters (starttime1, timestep1, duration1) and (starttime2, timestep2, duration2)
  • If our ramp registry holds a ramp that is already over (starttime+duration < now_mu()) we need to remove it from the registry

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Merge request reports