RLRP routing  v.0.1.0
All Classes Namespaces Files Functions Variables Pages
RouteTable.Entry Class Reference

Class Entry represents a dictionary containing current estimated values for forwarding a packet to the given mac. More...

Inheritance diagram for RouteTable.Entry:
Inheritance graph
Collaboration diagram for RouteTable.Entry:
Collaboration graph

Public Member Functions

def __init__ (self, dst_ip, neighbors_list)
 Constructor. More...
 
def init_values (self)
 Initialize the first estimation values for the freshly added actions/neighbors. More...
 
def update_neighbors (self, neighbors_list)
 Update the list of neighbors, according to a given neighbors list. More...
 
def update_value (self, mac, reward)
 Update estimation value on the action (mac) by the given reward. More...
 
def calc_avg_value (self)
 Calculate and output the average of estimation values of this entry itself. More...
 

Public Attributes

 dst_ip
 Destination IP address of the route. More...
 
 local_neighbor_list
 Store a copy of the initial list of direct neighbors. More...
 
 value_estimator
 Create rl_logic.ValueEstimator object for keeping the updates for incoming rewards. More...
 

Detailed Description

Class Entry represents a dictionary containing current estimated values for forwarding a packet to the given mac.

Constructor & Destructor Documentation

def RouteTable.Entry.__init__ (   self,
  dst_ip,
  neighbors_list 
)

Constructor.

Parameters
selfThe object pointer.
dst_ipDestination IP address of the route.
neighbors_listList of MAC addresses of currently accessible direct neighbors.
Returns
None

Member Function Documentation

def RouteTable.Entry.calc_avg_value (   self)

Calculate and output the average of estimation values of this entry itself.

Initialize the first estimation values for the freshly added actions/neighbors.

Parameters
selfThe object pointer.
Returns
Average estimation value: sum(self.values()) / len(self).
def RouteTable.Entry.init_values (   self)

Initialize the first estimation values for the freshly added actions/neighbors.

Parameters
selfThe object pointer.
Returns
None

Here is the caller graph for this function:

def RouteTable.Entry.update_neighbors (   self,
  neighbors_list 
)

Update the list of neighbors, according to a given neighbors list.

Parameters
selfThe object pointer.
neighbors_listList of MAC addresses of currently accessible direct neighbors.
Returns
None

Here is the call graph for this function:

def RouteTable.Entry.update_value (   self,
  mac,
  reward 
)

Update estimation value on the action (mac) by the given reward.

Parameters
selfThe object pointer.
macMAC address of the neighbor (action ID).
rewardReward value to be assigned.
Returns
None

Member Data Documentation

RouteTable.Entry.dst_ip

Destination IP address of the route.

RouteTable.Entry.local_neighbor_list

Store a copy of the initial list of direct neighbors.

RouteTable.Entry.value_estimator

Create rl_logic.ValueEstimator object for keeping the updates for incoming rewards.


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