Coverage Control Library
Loading...
Searching...
No Matches
NearOptimalCVT Class Reference

#include <near_optimal_cvt.h>

+ Inheritance diagram for NearOptimalCVT:

Public Member Functions

 NearOptimalCVT (Parameters const &params, CoverageSystem &env)
 
 NearOptimalCVT (Parameters const &params, size_t const &num_robots, CoverageSystem &env)
 
PointVector GetActions ()
 
auto GetGoals ()
 
auto & GetVoronoi ()
 
void ComputeGoals ()
 
int ComputeActions ()
 
bool IsConverged ()
 
- Public Member Functions inherited from AbstractController

Detailed Description

The algorithm has knowledge of the entire map in a centralized manner. It runs several trials; for each trial, it generates random initial positions for the sites. Then uses the CVT to compute optimal centroids. It performs the Hungarian algorithm to assign robots to the centroids. Finally, the trial with the minimum cost is selected.

Definition at line 60 of file near_optimal_cvt.h.

Constructor & Destructor Documentation

◆ NearOptimalCVT() [1/2]

NearOptimalCVT ( Parameters const & params,
CoverageSystem & env )
inline

Definition at line 72 of file near_optimal_cvt.h.

◆ NearOptimalCVT() [2/2]

NearOptimalCVT ( Parameters const & params,
size_t const & num_robots,
CoverageSystem & env )
inline

Definition at line 74 of file near_optimal_cvt.h.

Member Function Documentation

◆ ComputeActions()

int ComputeActions ( )
inlinevirtual

Pure virtual function to compute the actions for the robots

Returns
0 if the actions are computed successfully, 1 otherwise

Implements AbstractController.

Definition at line 96 of file near_optimal_cvt.h.

◆ ComputeGoals()

void ComputeGoals ( )
inline

Definition at line 89 of file near_optimal_cvt.h.

◆ GetActions()

PointVector GetActions ( )
inlinevirtual

Pure virtual function to get the actions for the robots

Returns
The actions for the robots

Implements AbstractController.

Definition at line 83 of file near_optimal_cvt.h.

◆ GetGoals()

auto GetGoals ( )
inline

Definition at line 85 of file near_optimal_cvt.h.

◆ GetVoronoi()

auto & GetVoronoi ( )
inline

Definition at line 87 of file near_optimal_cvt.h.

◆ IsConverged()

bool IsConverged ( )
inline

Definition at line 116 of file near_optimal_cvt.h.