Class constant_speed_force

Inheritance Relationships

Base Types

  • public rer::client< constant_speed_force >

  • public cosm::apf2D::base_force (Class base_force)

Class Documentation

class constant_speed_force : public rer::client<constant_speed_force>, public cosm::apf2D::base_force

A force ensuring that an agent and its immediate neighbors maintain a constant average speed.

Inspired FLOCK:Bargarti2018-stochfov, but not from there, because the math did not work out, despite what the authors claimed.

Public Functions

explicit constant_speed_force(const config::constant_speed_force_config *config)
rmath::vector2d operator()(const boid &agent, const std::vector<rmath::vector2d> &neighbors) const

Calculate the force.

Parameters:
  • agent – The current agent.

  • neighbors – The velocities of the neighbors of agent.