Skip to content

EventTriggered

Implements a CPF controller using Event triggered communications. More...

#include <EventTriggered.h>

Inherits from CPFControl

Public Functions

Name
EventTriggered(Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic > & adjency_matrix, unsigned int vehicle_ID, double k_epsilon, double c0, double c1, double alpha)
Constructor for the EventTriggered CPF class. Receive the adjency matrix as a parameter.
~EventTriggered()
The destructor for the EventTriggered class.
virtual double coordinationController(double time) override
Method to that updated the coordination control law and returns the correction speed vc to be used by the virtual target.
virtual bool updateVehiclesInformation(double time, unsigned int ID, double gamma, double vd) override
Method to update each individual vehicle information given an int with the ID of the vehicle and the new virtual target value.
virtual bool publishCurrentGamma(double time) override
Method to inform the user if the current gamma should be published or not This method will update the value of gamma last sent to the network when this method returns true.
virtual bool reset() override
Method to reset the current CPF controller.

Protected Functions

Name
void predictVehicleEstimator(unsigned int ID, double time)
Method to estimate the current gamma of a vehicle represented by ID.

Additional inherited members

Public Functions inherited from CPFControl

Name
Eigen::MatrixXi getAdjencyMatrix()
Method to get the Adjency Matrix that represents the network topology.
Eigen::VectorXi getNeighbors()
Method to get a vector with the neighbors of the current vehicle.
bool updateAdjencyMatrix(Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic > & adjency_matrix)
Method to update the Adjency Matrix that represents the network topology.
unsigned int getNetworkSize()
Method to get the number of vehicles used in the network.
unsigned int getCurrentVehicleID()
Method to get the current vehicle ID in the network.
virtual ~CPFControl()
Virtual destructor for the abstract class.

Protected Functions inherited from CPFControl

Name
CPFControl(Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic > & adjency_matrix, unsigned int vehicle_ID)
Constructor for the abstract class. Receive the adjency matrix as a parameter.

Detailed Description

class EventTriggered;

Implements a CPF controller using Event triggered communications.

Author:

  • Marcelo Jacinto
  • Joao Quintas
  • Joao Cruz
  • Hung Tuan

Version: 1.0a

Date: 2021

Copyright: GPLv3

Public Functions Documentation

function EventTriggered

EventTriggered(
    Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic > & adjency_matrix,
    unsigned int vehicle_ID,
    double k_epsilon,
    double c0,
    double c1,
    double alpha
)

Constructor for the EventTriggered CPF class. Receive the adjency matrix as a parameter.

Parameters:

  • adjency_matrix An Eigen adjency matrix
  • vehicle_ID An unsigned int with the ID of this particular vehicle
  • k_epsilon The gain for the correction control law
  • c0 The gain for the event trigger threshold
  • c1 The gain for the event trigger threshold
  • alpha The gian for the event trigger threshold

function ~EventTriggered

~EventTriggered()

The destructor for the EventTriggered class.

Destructor for the EventTriggered class.

function coordinationController

virtual double coordinationController(
    double time
) override

Method to that updated the coordination control law and returns the correction speed vc to be used by the virtual target.

Parameters:

  • time An int with the current time expressed in seconds

Return: A double with the speed correction term vc

Reimplements: CPFControl::coordinationController

function updateVehiclesInformation

virtual bool updateVehiclesInformation(
    double time,
    unsigned int ID,
    double gamma,
    double vd
) override

Method to update each individual vehicle information given an int with the ID of the vehicle and the new virtual target value.

Parameters:

  • time An int with the current time expressed in seconds
  • ID An int with the ID of the vehicle which to update information
  • gamma A double with the new information of the virtual target position
  • vd A double with the desired velocity of the virtual target of that particular vehicle

Return: A boolean with the information whether the information was used with success or not

Reimplements: CPFControl::updateVehiclesInformation

function publishCurrentGamma

virtual bool publishCurrentGamma(
    double time
) override

Method to inform the user if the current gamma should be published or not This method will update the value of gamma last sent to the network when this method returns true.

Parameters:

  • time The current time expressed in seconds

Return: A boolean that is true if the current gamma should be published

Reimplements: CPFControl::publishCurrentGamma

Method to inform the user if the current gamma should be published or not.

function reset

virtual bool reset() override

Method to reset the current CPF controller.

Return: A boolean whether it was reset correctly or not

Reimplements: CPFControl::reset

Protected Functions Documentation

function predictVehicleEstimator

void predictVehicleEstimator(
    unsigned int ID,
    double time
)

Method to estimate the current gamma of a vehicle represented by ID.

Parameters:

  • ID The ID of the vehicle to update the prediction
  • time The current time expressed in seconds

Updated on 2024-03-07 at 10:30:48 +0000


Last update: March 7, 2024