Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

IDEA::GoalTokenDecision Class Reference

#include <GoalTokenDecisionPoint.hh>

List of all members.

Public Methods

 GoalTokenDecision (PlanReader::ObjectData const &object, std::string const &attribute, PlanReader::TokenData const &token, const EUROPA::DbClientId &dbClient, const PslDatabase *db, const EUROPA::OpenDecisionManagerId &odm, const int plannerAuthority, const bool isFirstToken, const bool isLastToken, const Time plannerHorizonStart, const Time plannerHorizonEnd, const GoalTokenDecision *previousDecision, bool controlTimes=true, bool mergeFirstToken=true, bool freezeTokenStartEndTimes=true, bool useGeneralTimelines=false)
virtual ~GoalTokenDecision ()
virtual bool assign ()
 delegate to TokenDecisionPoint

virtual bool retract ()
 delegate to TokenDecisionPoint

virtual bool hasRemainingChoices ()
 This is the first function call made on this object by PLASMA code. create TokenId from object, attribute and token. create TokenDecisionPoint from TokenId and delegate the call to it.

virtual void print (std::ostream &os) const
void initialize ()

Private Methods

void adjustFirstNewTokenTimes (Time &earliestStartTime, Time &latestStartTime, Time &earliestEndTime)
 The first new token on each timeline must straddle the start of the horizon.

bool createTokenDecision ()
 Create a token in the db and initialize m_tokenDecision. Return true upon success.

void cropTokenEndTime (Time &latestEndTime)
 Crop latest end time of each goal except first and last on timeline to endHorizon-1. 'Infinity' for latest end time will prevent planner from making any decisions on the token.

void adjustFirstTokenTimes (Time &earliestStartTime, Time &latestStartTime, Time &earliestEndTime)
 The first token on each timeline must straddle the start of the horizon.

void adjustLastTokenTimes (Time &latestStartTime, Time &earliestEndTime)
 The last token on each timeline must straddle the end of the horizon.


Private Attributes

EUROPA::TokenDecisionPointId m_tokenDecision
EUROPA::TokenId m_token
PlanReader::ObjectData const m_object
std::string const m_attribute
PlanReader::TokenData const m_tokenData
const PslDatabasem_db
EUROPA::OpenDecisionManagerId m_odm
EUROPA::ConstraintId m_StartConstraint
EUROPA::ConstraintId m_EndConstraint
const int m_plannerAuthority
const bool m_isFirstToken
const bool m_isLastToken
const Time m_plannerHorizonStart
const Time m_plannerHorizonEnd
const GoalTokenDecision * m_previousDecision
 This is the predeccessor, constrain this token to succeed it.

bool m_controlTimes
bool m_mergeFirstToken
bool m_restrictTokenTimesBaseDomains
bool m_useGeneralTimelines
 if true, use more general assumptions for timelines, including the the possibility that timelines might start empty (for dynamic objects without default tokens), that the first loaded token might not be the first token in the pre-existing timeline, and that tokens might follow after those loaded in goal loading


Detailed Description

class GoalTokenDecision


Constructor & Destructor Documentation

IDEA::GoalTokenDecision::GoalTokenDecision PlanReader::ObjectData const &    object,
std::string const &    attribute,
PlanReader::TokenData const &    token,
const EUROPA::DbClientId &    dbClient,
const PslDatabase   db,
const EUROPA::OpenDecisionManagerId &    odm,
const int    plannerAuthority,
const bool    isFirstToken,
const bool    isLastToken,
const Time    plannerHorizonStart,
const Time    plannerHorizonEnd,
const GoalTokenDecision *    previousDecision,
bool    controlTimes = true,
bool    mergeFirstToken = true,
bool    freezeTokenStartEndTimes = true,
bool    useGeneralTimelines = false
 

virtual IDEA::GoalTokenDecision::~GoalTokenDecision   [inline, virtual]
 


Member Function Documentation

void IDEA::GoalTokenDecision::adjustFirstNewTokenTimes Time   earliestStartTime,
Time   latestStartTime,
Time   earliestEndTime
[private]
 

The first new token on each timeline must straddle the start of the horizon.

void IDEA::GoalTokenDecision::adjustFirstTokenTimes Time   earliestStartTime,
Time   latestStartTime,
Time   earliestEndTime
[private]
 

The first token on each timeline must straddle the start of the horizon.

void IDEA::GoalTokenDecision::adjustLastTokenTimes Time   latestStartTime,
Time   earliestEndTime
[private]
 

The last token on each timeline must straddle the end of the horizon.

bool IDEA::GoalTokenDecision::assign   [virtual]
 

delegate to TokenDecisionPoint

bool IDEA::GoalTokenDecision::createTokenDecision   [private]
 

Create a token in the db and initialize m_tokenDecision. Return true upon success.

void IDEA::GoalTokenDecision::cropTokenEndTime Time   latestEndTime [private]
 

Crop latest end time of each goal except first and last on timeline to endHorizon-1. 'Infinity' for latest end time will prevent planner from making any decisions on the token.

bool IDEA::GoalTokenDecision::hasRemainingChoices   [virtual]
 

This is the first function call made on this object by PLASMA code. create TokenId from object, attribute and token. create TokenDecisionPoint from TokenId and delegate the call to it.

void IDEA::GoalTokenDecision::initialize  
 

void IDEA::GoalTokenDecision::print std::ostream &    os const [virtual]
 

bool IDEA::GoalTokenDecision::retract   [virtual]
 

delegate to TokenDecisionPoint


Member Data Documentation

std::string const IDEA::GoalTokenDecision::m_attribute [private]
 

bool IDEA::GoalTokenDecision::m_controlTimes [private]
 

const PslDatabase* IDEA::GoalTokenDecision::m_db [private]
 

EUROPA::ConstraintId IDEA::GoalTokenDecision::m_EndConstraint [private]
 

const bool IDEA::GoalTokenDecision::m_isFirstToken [private]
 

const bool IDEA::GoalTokenDecision::m_isLastToken [private]
 

bool IDEA::GoalTokenDecision::m_mergeFirstToken [private]
 

First token will be merged instead of activated. Default is activated. All other tokens are activated and inserted at the end of timeline.

PlanReader::ObjectData const IDEA::GoalTokenDecision::m_object [private]
 

EUROPA::OpenDecisionManagerId IDEA::GoalTokenDecision::m_odm [private]
 

const int IDEA::GoalTokenDecision::m_plannerAuthority [private]
 

const Time IDEA::GoalTokenDecision::m_plannerHorizonEnd [private]
 

const Time IDEA::GoalTokenDecision::m_plannerHorizonStart [private]
 

const GoalTokenDecision* IDEA::GoalTokenDecision::m_previousDecision [private]
 

This is the predeccessor, constrain this token to succeed it.

bool IDEA::GoalTokenDecision::m_restrictTokenTimesBaseDomains [private]
 

if true, the base domain of token start and end times will be restricted to the values calculated by the goal loader or passed from external planner

  • see m_controlTimes. The domains of these times can not be relaxed later. If false, start/end times variables will be created with a base domain of [0 Infinity] and *constrained* to whatever ranges they have to take for current round of planning. These ranges can be relaxed later [e.g. by reactive planner].

EUROPA::ConstraintId IDEA::GoalTokenDecision::m_StartConstraint [private]
 

EUROPA::TokenId IDEA::GoalTokenDecision::m_token [private]
 

PlanReader::TokenData const IDEA::GoalTokenDecision::m_tokenData [private]
 

EUROPA::TokenDecisionPointId IDEA::GoalTokenDecision::m_tokenDecision [private]
 

bool IDEA::GoalTokenDecision::m_useGeneralTimelines [private]
 

if true, use more general assumptions for timelines, including the the possibility that timelines might start empty (for dynamic objects without default tokens), that the first loaded token might not be the first token in the pre-existing timeline, and that tokens might follow after those loaded in goal loading


Contact information
© IDEA
Generated on Fri Feb 3 17:09:45 2006 for IDEA.