54 #ifndef _GAMS_ALGORITHMS_EXECUTOR_H_
55 #define _GAMS_ALGORITHMS_EXECUTOR_H_
65 #include "madara/utility/EpochEnforcer.h"
84 madara::knowledge::KnowledgeMap
args;
112 madara::knowledge::KnowledgeBase * knowledge = 0,
168 madara::utility::EpochEnforcer<std::chrono::steady_clock>
enforcer_;
192 const madara::knowledge::KnowledgeMap & args,
193 madara::knowledge::KnowledgeBase * knowledge,
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Base class for algorithm factories that classes derived from.
The base class that algorithms in GAMS use.
A factory class for creating Executor algorithms.
virtual BaseAlgorithm * create(const madara::knowledge::KnowledgeMap &args, madara::knowledge::KnowledgeBase *knowledge, platforms::BasePlatform *platform, variables::Sensors *sensors, variables::Self *self, variables::Agents *agents)
Creates an Executor Algorithm.
An algorithm capable of executing other algorithms.
BaseAlgorithm * current_
current executing algorithm
int cycles_
tracks the number of cycles completed through algorithms
virtual int analyze(void)
Analyzes environment, platform, or other information.
int repeat_
number of times to repeat
bool precond_met_
indicates if the precondition has been met for current algorithm
virtual int plan(void)
Plans the next execution.
virtual int execute(void)
Executes the next step.
size_t alg_index_
current algorithm
AlgorithmMetaDatas algorithms_
for keeping track of algorithms
Executor(AlgorithmMetaDatas algorithms, int repeat, madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0, variables::Agents *agents=0)
Constructor.
madara::utility::EpochEnforcer< std::chrono::steady_clock > enforcer_
enforcer for time
void operator=(Executor &rhs)
Assignment operator.
A container for self referencing information.
std::vector< AlgorithmMetaData > AlgorithmMetaDatas
helper typdef for collection of AlgorithMetaData
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
std::vector< Agent > Agents
An array of agent knowledge.
Contains all GAMS-related tools, classes and code.