Swarm-SLAM  1.0.0
C-SLAM Framework
cslam.broker.Broker Class Reference
Inheritance diagram for cslam.broker.Broker:
[legend]

Public Member Functions

def __init__ (self, edges, robots_involved)
 
def brokerage (self, use_vertex_cover)
 
def vertex_cover (self)
 
def simple_dialog (self)
 

Public Attributes

 edges
 
 is_multi_robot_graph
 
 is_bipartite
 
 matching_graph
 

Detailed Description

The broker decides which vertices in the matching 
graph are to be shared between the robots.

Definition at line 8 of file broker.py.

Constructor & Destructor Documentation

◆ __init__()

def cslam.broker.Broker.__init__ (   self,
  edges,
  robots_involved 
)
Initialize the broker

Args:
    edges (list(EdgeInterRobot)): _description_
    robots_involved (list(int)): Robot ids of the 
                        robots involved in the exchange

Definition at line 13 of file broker.py.

Member Function Documentation

◆ brokerage()

def cslam.broker.Broker.brokerage (   self,
  use_vertex_cover 
)
Return the broker selection of vertices to send.
Either using vertex cover or simple dialog strategy.

Args:
    use_vertex_cover (bool): use vertex cover stratehy

Returns:
    List(set((int,int)): Vertices to be transmitted

Definition at line 66 of file broker.py.

Here is the call graph for this function:

◆ simple_dialog()

def cslam.broker.Broker.simple_dialog (   self)
Simple dialog exchange
For each edge, transmit one of the two vertices randomly
unless one of the 2 vertices is already transmitted.

Returns:
    List(set((int,int)): Vertices to be transmitted

Definition at line 112 of file broker.py.

Here is the caller graph for this function:

◆ vertex_cover()

def cslam.broker.Broker.vertex_cover (   self)
Computes the minimum vertex cover over the edges
If the graph is bipartite: we compute the maximum matching and
 recover the minimum vertex cover with Konig's theorem

Otherwise, we use an approximate greedy algorithm.

Returns:
    List(set((int,int)): Vertices to be transmitted

Definition at line 84 of file broker.py.

Here is the caller graph for this function:

Member Data Documentation

◆ edges

cslam.broker.Broker.edges

Definition at line 21 of file broker.py.

◆ is_bipartite

cslam.broker.Broker.is_bipartite

Definition at line 33 of file broker.py.

◆ is_multi_robot_graph

cslam.broker.Broker.is_multi_robot_graph

Definition at line 29 of file broker.py.

◆ matching_graph

cslam.broker.Broker.matching_graph

Definition at line 42 of file broker.py.


The documentation for this class was generated from the following file: