| 
    AIM
    
   | 
 
#include <MentalResilienceCoach.h>
  
 Public Member Functions | |
| MentalResilienceCoach (std::string name="mental_resilience_coach") | |
| virtual void | setGoal (InitializationType type, const AIMValue &init, bool dynamic=true) | 
  Public Member Functions inherited from CoachingEngine::Coach | |
| Coach (const Coach &other) | |
| Coach & | operator= (const Coach &rhs) | 
| void | addData (const AIMData &data) | 
| void | doTick () | 
| std::vector< AIMValue > | getRequirements () const | 
| bool | requirementsAreUpdated (bool reset) const | 
| virtual AIMValue | getGoal () const | 
| virtual std::vector < TaskDescription >  | getCurrentTasks () const | 
| virtual std::vector < TaskDescription >  | getFutureTasks (double start, double end) | 
| virtual Status | getStatus () const | 
| virtual Type | getType () | 
| virtual const std::map < std::string, AIMValue > &  | getProperties () | 
| 
virtual std::map< std::string,  AIMValue >  | getMemberDataAsProperties () const | 
| virtual void | setProperties (const std::map< std::string, AIMValue > &properties) | 
| virtual void | pause (double time) | 
| virtual void | resume (double time) | 
| virtual TaskDescription | setTaskValueManually (std::string taskType, double taskStartDate, const AIMValue &data) | 
  Public Member Functions inherited from AIM | |
| AIM (std::string name="") | |
| AIM (const AIM &other) | |
| AIM & | operator= (const AIM &rhs) | 
| virtual void | addDataSubscriber (const std::string &key, AIM *subscriber) | 
| virtual void | removeDataSubscriber (const std::string &key) | 
| virtual AIMValue | setProperty (const std::string &key, AIMValue value) | 
| virtual AIMValue | getProperty (std::string key) const | 
| virtual void | sendData () | 
| virtual std::string | exportProperties () | 
| virtual std::vector< std::pair < std::string, AIMValue > >  | getOutputData (bool clear_output=false) | 
| virtual std::vector< std::pair < std::string, AIMValue > >  | getInputData (bool clear_input=false) | 
| virtual AIM * | getDataSubscriber (std::string subscriber) | 
| virtual std::string | getName () const | 
Protected Member Functions | |
| virtual std::pair< double, double > | calculateTaskPeriod (double currentTime, std::string taskType="") | 
| virtual void | addActiveTask (Task &task) | 
  Protected Member Functions inherited from CoachingEngine::Coach | |
| Coach (Type coachType, std::string name="coach") | |
| virtual void | processDateValue (const std::string &sensor, const AIMValue &dateValue) | 
| virtual void | removeActiveTask (Task *task) | 
| virtual double | calculateTargetValue (int week, double goalValue, double lastValue, double speed=(2.0/3.0)) | 
| virtual int | getWeek (double date) | 
| virtual double | calculateGoal (std::string taskType, double currentValue, int weeksLeft) | 
| virtual void | decreaseGain (std::string taskType) | 
| virtual void | increaseGain (std::string taskType) | 
| virtual void | handleCompletedTask (Task *task) | 
| virtual bool | checkAndHandleNewWeek () | 
| virtual double | calculateAverage (std::string taskType, double startDate, double endDate, int min_values=1, int nr_values=-1) | 
| virtual void | createNewTask (std::string taskType) | 
| virtual void | removeRoutesForTask (Task *task) | 
| virtual Task * | getTask (TaskDescription::Type type) | 
  Protected Member Functions inherited from AIM | |
| void | setDataSubscribers (const std::map< std::string, AIM * > &subscribers) | 
| void | setInputDataQueue (const InputDataQueue &inputDataQueue) | 
| void | setOutputDataQueue (const AIMDataQueue &outputDataQueue) | 
Additional Inherited Members | |
  Public Types inherited from CoachingEngine::Coach | |
| enum | Type {  PHYSICAL_ACTIVITY, MENTAL_RESILIENCE, SLEEP_DURATION, JETLAG, SHIFTWORK, CALIBRATION, NONE, BIORHYTHM }  | 
| enum | InitializationType { MANUAL_GOAL, POPULATION_GOAL, PERSONAL_GOAL } | 
| enum | Status { UNINITIALIZED, GOAL_INITIALIZED, READY, PAUSED } | 
  Public Types inherited from AIM | |
| typedef std::pair< std::string,  AIMValue >  | AIMData | 
| typedef std::queue< AIMData > | AIMDataQueue | 
| typedef std::queue< AIMValue > | AIMValueQueue | 
| typedef std::map< std::string,  AIMValueQueue >  | InputDataQueue | 
  Static Public Attributes inherited from CoachingEngine::Coach | |
| static const std::string | PROP_COMPLETED_TASKS = "completed_tasks" | 
| static const std::string | PROP_ACTIVE_TASKS = "active_tasks" | 
| static const std::string | PROP_STATUS = "status" | 
| static const std::string | PROP_GOAL = "goal" | 
| static const std::string | PROP_BASELINE = "baseline" | 
| static const std::string | PROP_DYNAMIC_COACH = "dynamic_coach" | 
| static const std::string | PROP_GOAL_TYPE = "goal_type" | 
| static const std::string | PROP_START_DATE = "start_date" | 
| static const std::string | PROP_END_DATE = "end_date" | 
| static const std::string | PROP_TOTAL_DAYS = "total_days" | 
| static const std::string | PROP_GAIN = "gain" | 
| static const std::string | PROP_CURRENT_TIME = "clock" | 
| static const std::string | PROP_START_PAUSE = "start_pause" | 
| static const std::string | OUTPUT_FIELD_COACH_TYPE = "coach_type" | 
| static const std::string | PROP_PAUSED_SECONDS = "paused_seconds" | 
  Static Public Attributes inherited from AIM | |
| static const std::string | VERSION = AIM_VERSION | 
  Protected Types inherited from CoachingEngine::Coach | |
| 
typedef std::map< std::string,  std::unordered_set< Task * > >  | SensorRoutes | 
  Protected Attributes inherited from CoachingEngine::Coach | |
| const Type | type | 
| Status | status | 
| std::vector< Task * > | activeTasks | 
| std::vector< Task * > | completedTasks | 
| SensorRoutes | routes | 
| AIMValue | goal | 
| AIMValue | baseline | 
| Clock | clock | 
| bool | dynamicCoach | 
| InitializationType | goalType | 
| double | end_date | 
| double | start_date | 
| int | total_days | 
| AIMValue | gain | 
  Protected Attributes inherited from AIM | |
| std::string | name | 
| std::vector< AIMValue > | requirements | 
| bool | requirementsUpdated | 
| std::map< std::string, AIM * > | dataSubscribers | 
| std::map< std::string, AIMValue > | properties | 
| InputDataQueue | inputDataQueue | 
| AIMDataQueue | outputDataQueue | 
Implementation of the mental resilience coach. This coach coaches a user with it's mental resilience
      
  | 
  protectedvirtual | 
Add a task to the pool of managed tasks. After adding the task requirements and data forwarding will be handled by the Coach.
Reimplemented from CoachingEngine::Coach.
      
  | 
  protectedvirtual | 
function to calculate the start and end time of a task
Reimplemented from CoachingEngine::Coach.
      
  | 
  virtual | 
Set the goal for the coach.
A coach can be initialized with a specific type. With a corresponding init value.
MANUAL_GOAL: init = {{"goal",{"Task.TYPE", "value"}}}
PERSONAL_GOAL: init = {{"goal",{"Task.TYPE", "value"}}, {"baseline",{"Task.TYPE", "value"}}, {"days",84}}
POPULATION_GOAL: init = {{"goal",{"Task.TYPE", "value"}}, {"baseline",{"Task.TYPE", "value"}}, {"days",84}}
| type | The InitializationType of the coach | 
| init | The AIMValue map with initialization data | 
| dynamic | Update the goal based on the progress | 
Reimplemented from CoachingEngine::Coach.