| 
| 
  | JetLagCoach (std::string name="jet_lag_coach") | 
|   | 
| virtual void  | setGoal (InitializationType type, const AIMValue &init, bool dynamic=true) | 
|   | 
virtual const std::map 
< std::string, AIMValue > &  | getProperties () | 
|   | 
| virtual void  | setProperties (const std::map< std::string, AIMValue > &properties) | 
|   | 
virtual std::vector 
< TaskDescription >  | getFutureTasks (double start, double end) | 
|   | 
| virtual AIMValue  | setProperty (const std::string &key, AIMValue value) | 
|   | 
| 
  | 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 Status  | getStatus () const  | 
|   | 
| virtual Type  | getType () | 
|   | 
virtual std::map< std::string,  
AIMValue >  | getMemberDataAsProperties () const  | 
|   | 
| virtual void  | pause (double time) | 
|   | 
| virtual void  | resume (double time) | 
|   | 
| virtual TaskDescription  | setTaskValueManually (std::string taskType, double taskStartDate, const AIMValue &data) | 
|   | 
|   | 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  | 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  | 
|   | 
 | 
| 
static const std::string  | PROP_FLIGHT_PLANS = "flight_plans" | 
|   | 
| 
static const std::string  | PROP_CURRENT_TIMEZONE = "current_timezone" | 
|   | 
| 
static const std::string  | PROP_ORIGINAL_TIMEZONE = "original_timezone" | 
|   | 
| static const std::string  | PROP_ARRIVAL_TIME = "arrival_time" | 
|   | 
| 
static const std::string  | PROP_PROGRAM_PHASE = "program_phase" | 
|   | 
| static const std::string  | PROP_BED_TIME = "bed_time" | 
|   | 
| static const std::string  | PROP_NORMAL_BED_TIME = "normal_bed_time" | 
|   | 
| static const std::string  | PROP_WAKEUP_TIME = "wakeup_time" | 
|   | 
| static const std::string  | PROP_NORMAL_WAKEUP_TIME = "normal_wakeup_time" | 
|   | 
| static const std::string  | PROP_HOUR_DIFFERENCE = "hour_difference" | 
|   | 
| 
static const std::string  | PROP_PLANNED_TASKS = "planned_tasks" | 
|   | 
| 
static const std::string  | PROP_STAYING_DAYS = "staying_days" | 
|   | 
| 
static const std::string  | PROP_PROGRAM_FINISHED_DATE = "program_finished_date" | 
|   | 
| static const std::string  | PROP_SET_NEW_TIME_ZONE = "set_new_time_Zone" | 
|   | 
| 
static const std::string  | FIELD_FLIGHT_ID = "flight_id" | 
|   | 
| 
static const std::string  | FIELD_FLIGHT_DATE = "flight_date" | 
|   | 
| 
static const std::string  | FIELD_FLIGHT_DEPARTURE_TZ = "flight_departure_tz" | 
|   | 
| 
static const std::string  | FIELD_FLIGHT_ARRIVAL_TZ = "flight_arrival_tz" | 
|   | 
| 
static const std::string  | FIELD_FLIGHT_DEPARTURE_TIME = "flight_departure_time" | 
|   | 
| 
static const std::string  | FIELD_FLIGHT_ARRIVAL_TIME = "flight_arrival_time" | 
|   | 
| 
static const std::string  | FIELD_FLIGHT_DEPARTURE_TZ_OFFSET = "flight_departure_tz_offset" | 
|   | 
| 
static const std::string  | FIELD_FLIGHT_ARRIVAL_TZ_OFFSET = "flight_arrival_tz_offset" | 
|   | 
| 
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 const std::string  | VERSION = AIM_VERSION | 
|   | 
 | 
| virtual void  | processDateValue (const std::string &sensor, const AIMValue &dateValue) | 
|   | 
| 
virtual bool  | handleNewFlightPlan (AIMValue flightPlan) | 
|   | 
| 
virtual bool  | handleNewTimeZone (AIMValue timeZone, std::map< std::string, AIMValue > &stateProperties) | 
|   | 
| 
virtual std::vector< JetLagTask * >  | getPhaseTasks (JetlagProgramPhase phase, std::map< std::string, AIMValue > &stateProperties) | 
|   | 
| 
virtual void  | startPlannedTasks () | 
|   | 
| 
virtual std::vector< JetLagTask * >  | getPreDepartureTasks (std::map< std::string, AIMValue > &stateProperties, bool travelDay) | 
|   | 
| 
virtual std::vector< JetLagTask * >  | getDuringFlightTasks (std::map< std::string, AIMValue > &stateProperties) | 
|   | 
| 
virtual std::vector< JetLagTask * >  | getTravelDayAfterArrivalTasks (std::map< std::string, AIMValue > &stateProperties) | 
|   | 
| 
virtual std::vector< JetLagTask * >  | getAfterTravelDayTasks (std::map< std::string, AIMValue > &stateProperties) | 
|   | 
| 
virtual std::vector< JetLagTask * >  | getBiorhythmTasks (double coreBodyLowDate, double adjustSec) | 
|   | 
| 
virtual void  | createNewPlan () | 
|   | 
| virtual double  | getNextToBedDate (double time, double bed_time, int tz_offset=-1) | 
|   | 
| virtual double  | getNextOutBedDate (double time, double out_bed_time, double to_bed_time=0, int tz_offset=-1) | 
|   | 
| 
virtual double  | addHoursToBedTime (double bed_time, double hours) | 
|   | 
| virtual double  | getStartOfDay (double time, int tz_offset=-1) | 
|   | 
| 
virtual JetLagTask *  | creatJetLagTask (Task::Type taskType, double taskStartTime, double taskEndTime, double triggerTime=0.0/0.0, double targetStartTime=0.0/0.0, double targetEndTime=0.0/0.0) | 
|   | 
| virtual JetlagProgramPhase  | getProgramPhase (double time, std::map< std::string, AIMValue > &stateProperties) | 
|   | 
|   | Coach (Type coachType, std::string name="coach") | 
|   | 
| virtual void  | addActiveTask (Task &task) | 
|   | 
| 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 std::pair< double, double >  | calculateTaskPeriod (double currentTime, std::string taskType="") | 
|   | 
| 
virtual void  | removeRoutesForTask (Task *task) | 
|   | 
| 
virtual Task *  | getTask (TaskDescription::Type type) | 
|   | 
| 
void  | setDataSubscribers (const std::map< std::string, AIM * > &subscribers) | 
|   | 
| 
void  | setInputDataQueue (const InputDataQueue &inputDataQueue) | 
|   | 
| 
void  | setOutputDataQueue (const AIMDataQueue &outputDataQueue) | 
|   | 
 | 
| 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
 } | 
|   | 
typedef std::pair< std::string,  
AIMValue >  | AIMData | 
|   | 
| typedef std::queue< AIMData >  | AIMDataQueue | 
|   | 
| typedef std::queue< AIMValue >  | AIMValueQueue | 
|   | 
typedef std::map< std::string,  
AIMValueQueue >  | InputDataQueue | 
|   | 
Implementation of the jet lag coach. This coach coaches a user before, during and after a flight 
 
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}}
- Parameters
 - 
  
    | 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.