37 #ifndef DEMOS_KOULES_SIMULATOR_
38 #define DEMOS_KOULES_SIMULATOR_
40 #include "KoulesConfig.h"
41 #include <ompl/control/StatePropagator.h>
57 using CollisionEvent = std::tuple<double, unsigned int, unsigned int>;
60 using CollisionEventQueue = std::priority_queue<CollisionEvent,
61 std::vector<CollisionEvent>, std::greater<CollisionEvent>>;
65 void initCollisionEvents();
68 double wallCollideEvent(
unsigned int i,
int dim);
70 void elasticCollision(
unsigned int i,
unsigned int j);
73 void computeCollisionEvent(
unsigned int i,
unsigned int j);
76 void advance(
double t);
79 void markAsDead(
unsigned int i);
86 unsigned int numDimensions_;
88 unsigned int numKoules_;
90 std::vector<double> qcur_;
92 std::vector<double> qnext_;
94 std::vector<bool> dead_;
100 CollisionEventQueue collisionEvents_;