GAMS  1.4.0
gams::algorithms::BaseAlgorithm Class Referenceabstract

The base class that algorithms in GAMS use. More...

#include <BaseAlgorithm.h>

Inheritance diagram for gams::algorithms::BaseAlgorithm:
gams::algorithms::DebugAlgorithm gams::algorithms::Executor gams::algorithms::Follow gams::algorithms::FormationCoverage gams::algorithms::FormationFlying gams::algorithms::FormationSync gams::algorithms::Greet gams::algorithms::GroupBarrier gams::algorithms::Hold gams::algorithms::Home gams::algorithms::JavaAlgorithm gams::algorithms::KarlEvaluator gams::algorithms::Land gams::algorithms::MessageProfiling gams::algorithms::Move gams::algorithms::NullAlgorithm gams::algorithms::PerformanceProfiling gams::algorithms::PerimeterPatrol gams::algorithms::Spell gams::algorithms::Takeoff gams::algorithms::Wait gams::algorithms::ZoneCoverage gams::algorithms::area_coverage::BaseAreaCoverage

Public Member Functions

 BaseAlgorithm (madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0, variables::Agents *agents=0)
 Constructor. More...
 
virtual ~BaseAlgorithm ()
 Destructor. More...
 
virtual int analyze (void)=0
 Analyzes environment, platform, or other information. More...
 
virtual int execute (void)=0
 Plans the next execution of the algorithm. More...
 
variables::Agentsget_agents (void)
 Gets the list of agents. More...
 
variables::AlgorithmStatusget_algorithm_status (void)
 Gets algorithm status variables. More...
 
madara::knowledge::KnowledgeBase * get_knowledge_base (void)
 Gets the knowledge base. More...
 
platforms::BasePlatformget_platform (void)
 Gets the platform. More...
 
variables::Selfget_self (void)
 Gets self-defined variables. More...
 
variables::Sensorsget_sensors (void)
 Gets the available sensor information. More...
 
void operator= (const BaseAlgorithm &rhs)
 Assignment operator. More...
 
virtual int plan (void)=0
 Plans the next execution of the algorithm. More...
 
virtual void set_agents (variables::Agents *agents)
 Sets the list of agents in the swarm. More...
 
virtual void set_platform (platforms::BasePlatform *platform)
 Sets the platform. More...
 
virtual void set_self (variables::Self *self)
 Sets the map of sensor names to sensor information. More...
 
virtual void set_sensors (variables::Sensors *sensors)
 Sets the map of sensor names to sensor information. More...
 

Protected Attributes

variables::Agentsagents_
 the list of agents potentially participating in the algorithm More...
 
unsigned int executions_
 number of executions More...
 
madara::knowledge::KnowledgeBase * knowledge_
 provides access to the knowledge base More...
 
platforms::BasePlatformplatform_
 provides access to the platform More...
 
variables::Selfself_
 the algorithm's concept of self More...
 
variables::Sensorssensors_
 provides access to sensor information More...
 
variables::AlgorithmStatus status_
 provides access to status information for this platform More...
 

Friends

class controllers::BaseController
 
class controllers::Multicontroller
 

Detailed Description

The base class that algorithms in GAMS use.

Definition at line 94 of file BaseAlgorithm.h.

Constructor & Destructor Documentation

◆ BaseAlgorithm()

gams::algorithms::BaseAlgorithm::BaseAlgorithm ( madara::knowledge::KnowledgeBase *  knowledge = 0,
platforms::BasePlatform platform = 0,
variables::Sensors sensors = 0,
variables::Self self = 0,
variables::Agents agents = 0 
)

Constructor.

Parameters
knowledgethe knowledge base of variables and values
platformthe underlying platform the algorithm will use
sensorsmap of sensor names to sensor information
selfself-referencing variables for this agent
agentslist of agents in the swarm

◆ ~BaseAlgorithm()

virtual gams::algorithms::BaseAlgorithm::~BaseAlgorithm ( )
virtual

Destructor.

Member Function Documentation

◆ analyze()

◆ execute()

◆ get_agents()

variables::Agents* gams::algorithms::BaseAlgorithm::get_agents ( void  )

Gets the list of agents.

◆ get_algorithm_status()

variables::AlgorithmStatus* gams::algorithms::BaseAlgorithm::get_algorithm_status ( void  )

Gets algorithm status variables.

◆ get_knowledge_base()

madara::knowledge::KnowledgeBase* gams::algorithms::BaseAlgorithm::get_knowledge_base ( void  )

Gets the knowledge base.

◆ get_platform()

platforms::BasePlatform* gams::algorithms::BaseAlgorithm::get_platform ( void  )

Gets the platform.

◆ get_self()

variables::Self* gams::algorithms::BaseAlgorithm::get_self ( void  )

Gets self-defined variables.

◆ get_sensors()

variables::Sensors* gams::algorithms::BaseAlgorithm::get_sensors ( void  )

Gets the available sensor information.

◆ operator=()

void gams::algorithms::BaseAlgorithm::operator= ( const BaseAlgorithm rhs)

Assignment operator.

Parameters
rhsvalues to copy

◆ plan()

◆ set_agents()

virtual void gams::algorithms::BaseAlgorithm::set_agents ( variables::Agents agents)
virtual

Sets the list of agents in the swarm.

Parameters
agentslist of agents

◆ set_platform()

virtual void gams::algorithms::BaseAlgorithm::set_platform ( platforms::BasePlatform platform)
virtual

Sets the platform.

Parameters
platformthe underlying platform the algorithm will use

◆ set_self()

virtual void gams::algorithms::BaseAlgorithm::set_self ( variables::Self self)
virtual

Sets the map of sensor names to sensor information.

Parameters
selfpointer to self-referencing variables container

◆ set_sensors()

virtual void gams::algorithms::BaseAlgorithm::set_sensors ( variables::Sensors sensors)
virtual

Sets the map of sensor names to sensor information.

Parameters
sensorsmap of sensor names to sensor information

Friends And Related Function Documentation

◆ controllers::BaseController

friend class controllers::BaseController
friend

Definition at line 98 of file BaseAlgorithm.h.

◆ controllers::Multicontroller

friend class controllers::Multicontroller
friend

Definition at line 99 of file BaseAlgorithm.h.

Member Data Documentation

◆ agents_

variables::Agents* gams::algorithms::BaseAlgorithm::agents_
protected

the list of agents potentially participating in the algorithm

Definition at line 201 of file BaseAlgorithm.h.

◆ executions_

unsigned int gams::algorithms::BaseAlgorithm::executions_
protected

number of executions

Definition at line 204 of file BaseAlgorithm.h.

◆ knowledge_

madara::knowledge::KnowledgeBase* gams::algorithms::BaseAlgorithm::knowledge_
protected

provides access to the knowledge base

Definition at line 207 of file BaseAlgorithm.h.

◆ platform_

platforms::BasePlatform* gams::algorithms::BaseAlgorithm::platform_
protected

provides access to the platform

Definition at line 210 of file BaseAlgorithm.h.

◆ self_

variables::Self* gams::algorithms::BaseAlgorithm::self_
protected

the algorithm's concept of self

Definition at line 213 of file BaseAlgorithm.h.

◆ sensors_

variables::Sensors* gams::algorithms::BaseAlgorithm::sensors_
protected

provides access to sensor information

Definition at line 216 of file BaseAlgorithm.h.

◆ status_

variables::AlgorithmStatus gams::algorithms::BaseAlgorithm::status_
protected

provides access to status information for this platform

Definition at line 219 of file BaseAlgorithm.h.


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