#include <SSIPatrolAgent.h>
Public Member Functions | |
double | compute_cost (int vertex) |
virtual int | compute_next_vertex () |
int | compute_next_vertex (int cv) |
virtual void | init (int argc, char **argv) |
virtual void | onGoalComplete () |
virtual void | receive_results () |
virtual void | send_results () |
SSIPatrolAgent () | |
void | update_global_idleness () |
virtual double | utility (int currentv, int nextv) |
Protected Member Functions | |
bool | all_selected (bool *sv) |
bool | best_bid (int nv) |
void | bid_msg_handler (std::vector< int >::const_iterator it, int sender_id) |
virtual double | compute_bid (int nv) |
double | compute_cost (int cv, int nv) |
double | compute_distance (int vertex) |
size_t | compute_hops (int cv, int nv) |
bool * | create_selected_vertices () |
void | force_bid (int nv, double bidvalue, int robotId) |
bool | greedy_best_bid (int cv, int nv) |
void | idleness_msg_handler (std::vector< int >::const_iterator it) |
void | reset_selected_vertices (bool *sv) |
int | return_next_vertex (int currv, bool *sv) |
void | select_faraway_vertices (bool *selected_vertices, int cv) |
int | select_next_vertex (int currv, bool *sv) |
void | send_bid (int nv, double bv) |
void | send_target (int nv, double bv) |
void | task_request_msg_handler (std::vector< int >::const_iterator it, int sender_id) |
virtual void | update_bids (int next_vertex, double bid_value, int senderId) |
virtual void | update_tasks () |
void | wait () |
Protected Attributes | |
bid_tuple * | bids |
ConfigFile | cf |
bool | first_vertex |
double * | global_instantaneous_idleness |
double | hist |
double | last_update_idl |
pthread_mutex_t | lock |
int | nactivetasks |
int | next_next_vertex |
bool * | selected_vertices |
int * | taskRequests |
bool * | tasks |
double | theta_cost |
double | theta_hop |
double | theta_idl |
double | threshold |
double | timeout |
Definition at line 68 of file SSIPatrolAgent.h.
Definition at line 42 of file SSIPatrolAgent.cpp.
bool SSIPatrolAgent::all_selected | ( | bool * | sv | ) | [protected] |
Definition at line 133 of file SSIPatrolAgent.cpp.
bool SSIPatrolAgent::best_bid | ( | int | nv | ) | [protected] |
Definition at line 636 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::bid_msg_handler | ( | std::vector< int >::const_iterator | it, |
int | sender_id | ||
) | [protected] |
Definition at line 773 of file SSIPatrolAgent.cpp.
double SSIPatrolAgent::compute_bid | ( | int | nv | ) | [protected, virtual] |
Reimplemented in DTASSIPart_Agent.
Definition at line 359 of file SSIPatrolAgent.cpp.
double SSIPatrolAgent::compute_cost | ( | int | cv, |
int | nv | ||
) | [protected] |
Definition at line 231 of file SSIPatrolAgent.cpp.
double SSIPatrolAgent::compute_cost | ( | int | vertex | ) |
Definition at line 185 of file SSIPatrolAgent.cpp.
double SSIPatrolAgent::compute_distance | ( | int | vertex | ) | [protected] |
size_t SSIPatrolAgent::compute_hops | ( | int | cv, |
int | nv | ||
) | [protected] |
Definition at line 253 of file SSIPatrolAgent.cpp.
int SSIPatrolAgent::compute_next_vertex | ( | ) | [virtual] |
Implements PatrolAgent.
Definition at line 448 of file SSIPatrolAgent.cpp.
int SSIPatrolAgent::compute_next_vertex | ( | int | cv | ) |
Definition at line 453 of file SSIPatrolAgent.cpp.
bool * SSIPatrolAgent::create_selected_vertices | ( | ) | [protected] |
Definition at line 96 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::force_bid | ( | int | nv, |
double | bidvalue, | ||
int | robotId | ||
) | [protected] |
Definition at line 424 of file SSIPatrolAgent.cpp.
bool SSIPatrolAgent::greedy_best_bid | ( | int | cv, |
int | nv | ||
) | [protected] |
Definition at line 600 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::idleness_msg_handler | ( | std::vector< int >::const_iterator | it | ) | [protected] |
Definition at line 694 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::init | ( | int | argc, |
char ** | argv | ||
) | [virtual] |
Reimplemented from PatrolAgent.
Reimplemented in DTASSIPart_Agent.
Definition at line 143 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::onGoalComplete | ( | ) | [virtual] |
SEND GOAL (REACHED) AND INTENTION
Reimplemented from PatrolAgent.
Definition at line 48 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::receive_results | ( | ) | [virtual] |
Reimplemented from PatrolAgent.
Definition at line 783 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::reset_selected_vertices | ( | bool * | sv | ) | [protected] |
Definition at line 104 of file SSIPatrolAgent.cpp.
int SSIPatrolAgent::return_next_vertex | ( | int | currv, |
bool * | sv | ||
) | [protected] |
Definition at line 312 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::select_faraway_vertices | ( | bool * | selected_vertices, |
int | cv | ||
) | [protected] |
Definition at line 113 of file SSIPatrolAgent.cpp.
int SSIPatrolAgent::select_next_vertex | ( | int | currv, |
bool * | sv | ||
) | [protected] |
Definition at line 332 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::send_bid | ( | int | nv, |
double | bv | ||
) | [protected] |
Definition at line 574 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::send_results | ( | ) | [virtual] |
Reimplemented from PatrolAgent.
Definition at line 654 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::send_target | ( | int | nv, |
double | bv | ||
) | [protected] |
Definition at line 546 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::task_request_msg_handler | ( | std::vector< int >::const_iterator | it, |
int | sender_id | ||
) | [protected] |
Definition at line 744 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::update_bids | ( | int | next_vertex, |
double | bid_value, | ||
int | senderId | ||
) | [protected, virtual] |
Definition at line 686 of file SSIPatrolAgent.cpp.
Definition at line 295 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::update_tasks | ( | ) | [protected, virtual] |
Reimplemented in DTASSIPart_Agent.
Definition at line 538 of file SSIPatrolAgent.cpp.
double SSIPatrolAgent::utility | ( | int | currentv, |
int | nextv | ||
) | [virtual] |
Definition at line 279 of file SSIPatrolAgent.cpp.
void SSIPatrolAgent::wait | ( | ) | [protected] |
Definition at line 430 of file SSIPatrolAgent.cpp.
bid_tuple* SSIPatrolAgent::bids [protected] |
Definition at line 106 of file SSIPatrolAgent.h.
ConfigFile SSIPatrolAgent::cf [protected] |
Definition at line 121 of file SSIPatrolAgent.h.
bool SSIPatrolAgent::first_vertex [protected] |
Definition at line 75 of file SSIPatrolAgent.h.
double* SSIPatrolAgent::global_instantaneous_idleness [protected] |
Definition at line 82 of file SSIPatrolAgent.h.
double SSIPatrolAgent::hist [protected] |
Definition at line 119 of file SSIPatrolAgent.h.
double SSIPatrolAgent::last_update_idl [protected] |
Definition at line 83 of file SSIPatrolAgent.h.
pthread_mutex_t SSIPatrolAgent::lock [protected] |
Definition at line 72 of file SSIPatrolAgent.h.
int SSIPatrolAgent::nactivetasks [protected] |
Definition at line 93 of file SSIPatrolAgent.h.
int SSIPatrolAgent::next_next_vertex [protected] |
Definition at line 79 of file SSIPatrolAgent.h.
bool* SSIPatrolAgent::selected_vertices [protected] |
Definition at line 96 of file SSIPatrolAgent.h.
int* SSIPatrolAgent::taskRequests [protected] |
Definition at line 87 of file SSIPatrolAgent.h.
bool* SSIPatrolAgent::tasks [protected] |
Definition at line 90 of file SSIPatrolAgent.h.
double SSIPatrolAgent::theta_cost [protected] |
Definition at line 112 of file SSIPatrolAgent.h.
double SSIPatrolAgent::theta_hop [protected] |
Definition at line 115 of file SSIPatrolAgent.h.
double SSIPatrolAgent::theta_idl [protected] |
Definition at line 109 of file SSIPatrolAgent.h.
double SSIPatrolAgent::threshold [protected] |
Definition at line 102 of file SSIPatrolAgent.h.
double SSIPatrolAgent::timeout [protected] |
Definition at line 99 of file SSIPatrolAgent.h.