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

IDEA::PlasmaTokenImpl Class Reference
[PlanServer implementation using EUROPA-2]

See PslToken for API documentation. More...

#include <PlasmaTokenImpl.hh>

Inheritance diagram for IDEA::PlasmaTokenImpl:

IDEA::PslTokenImpl List of all members.

Public Methods

 PlasmaTokenImpl (const PslDatabase *database, const PslTimeline *timeline, const PslPredicate *predicate, int externalTokenId, const TokenLocation &source, const std::string &comRelayName, const EUROPA::TokenId &tokenId)
 PlasmaTokenImpl (const PslDatabase *database, const PslPredicate *predicate, int externalTokenId, const TokenLocation &source, const std::string &comRelayName, const EUROPA::TokenId &tokenId)
 Constructor for a token for which we do not know yet on which timeline it will be executed but can be activated.

 ~PlasmaTokenImpl ()
void finalize ()
void commit ()
bool isCommitted () const
bool canBeCommitted () const
Time getEarliestEndTime () const
Time getEarliestStartTime () const
int getId () const
Time getMaximumDuration () const
Time getMinimumDuration () const
Time getLatestEndTime () const
Time getLatestStartTime () const
bool endsAtStart (const PslToken *token) const
void setSuccessor (const PslToken *token) const
const EUROPA::TokenId getTokenId () const
void print (std::ostream &os) const
void setEarliestEndTime (const Time &value)
 Sets the earliest time of the end-time to the maximum of the current earliest end-time and value.

void setLatestEndTime (const Time &value)
 Sets the latest time of the end-time to the minimum of the current latest end-time and value.

void setLatestStartTime (const Time &value)
 Sets the latest time of the start-time to the maximum of the current latest start-time and value.

void setEarliestStartTime (const Time &value)
 Sets the earliest time of the start-time to the maximum of the current earliest start-time and value.

void resetSuccessorSelectorParameters (const std::vector< int > &authorities)
bool endsNoEarlierThanEnd (const PslToken *token) const
 Calculates temporal distance between end time variables of 2 tokens. Returns true if current token's end event must match or precede given token's end event.

void endAt (const Time &time)
const std::string & getComRelayName () const
const PslDatabasegetDatabase () const
unsigned int getExternalTokenId (bool externalize)
const std::string & getName () const
const PslParametergetParameter (const std::string &compareString) const
const PslParametergetParameter (int index) const
PslParameterList getParameters () const
const PslPredicategetPredicate () const
const PslParametergetReturnStatusParameter () const
const PslParametergetReturnStatusFlagParameter () const
const TokenLocationgetSourceLocation () const
const TokenLocationgetTargetLocation ()
const PslTimelinegetTimeline ()
bool hasDirectSuccessor (const PslTimeline *tl) const
bool isControllable ()
bool isExecutable ()
bool isExecuting (const Time &t) const
bool isGoal ()
bool isEnabled () const
 Returns true if the invoking token is enabled (it can be ended).

void setEnabled (bool value)
bool returnsStatus () const
bool isAuthorized () const
void constrainEndTime (const PslToken *token, const Time &value, int authority)
 Enforces the end-time of the token to be equal to value with authority authority by introducing a constraint.

void constrainStartTime (const PslToken *token, const Time &value, int authority)
 Enforces the start-time of the token to be equal to value with authority authority by introducing a constraint.

void startAt (const Time &time)
bool usesCPU () const
const PslVariablegetStartVariable ()
const PslVariablegetEndVariable ()
bool isFinalized () const
int getExternalId (const PslToken *token)

Protected Attributes

Int2PslParameterMap m_Parameters

Private Methods

const PslTimelineretrieveTimelineAllocation () const
void resetSuccessorSelectorParameter (const std::vector< int > &authorities, int index)
 Internal function; finalizes the status or output parameter and its associated flag parameter corresponding to the argument.

const PslVariablecreateEndVariable ()
const PslVariablecreateStartVariable ()
void createParameters (const PslToken *token)
 This method needs to be implemented and create the corresponding PslParameter instances for the parameters of the underlying token implementation.


Private Attributes

EUROPA::TokenId m_TokenId

Detailed Description

See PslToken for API documentation.


Constructor & Destructor Documentation

IDEA::PlasmaTokenImpl::PlasmaTokenImpl const PslDatabase   database,
const PslTimeline   timeline,
const PslPredicate   predicate,
int    externalTokenId,
const TokenLocation   source,
const std::string &    comRelayName,
const EUROPA::TokenId &    tokenId
 

IDEA::PlasmaTokenImpl::PlasmaTokenImpl const PslDatabase   database,
const PslPredicate   predicate,
int    externalTokenId,
const TokenLocation   source,
const std::string &    comRelayName,
const EUROPA::TokenId &    tokenId
 

Constructor for a token for which we do not know yet on which timeline it will be executed but can be activated.

IDEA::PlasmaTokenImpl::~PlasmaTokenImpl  
 


Member Function Documentation

bool IDEA::PlasmaTokenImpl::canBeCommitted   [virtual]
 

Implements IDEA::PslTokenImpl.

void IDEA::PlasmaTokenImpl::commit   [virtual]
 

Implements IDEA::PslTokenImpl.

void IDEA::PslTokenImpl::constrainEndTime const PslToken   token,
const Time   value,
int    authority
[inherited]
 

Enforces the end-time of the token to be equal to value with authority authority by introducing a constraint.

Assumes there is no such constraint yet, if there is it will be overriden or if assert is enabled it will raise an assertion.

void IDEA::PslTokenImpl::constrainStartTime const PslToken   token,
const Time   value,
int    authority
[inherited]
 

Enforces the start-time of the token to be equal to value with authority authority by introducing a constraint.

Assumes there is no such constraint yet, if there is it will be overriden or if assert is enabled it will raise an assertion.

const PslVariable * IDEA::PlasmaTokenImpl::createEndVariable   [private, virtual]
 

Implements IDEA::PslTokenImpl.

void IDEA::PlasmaTokenImpl::createParameters const PslToken   token [private, virtual]
 

This method needs to be implemented and create the corresponding PslParameter instances for the parameters of the underlying token implementation.

Implements IDEA::PslTokenImpl.

const PslVariable * IDEA::PlasmaTokenImpl::createStartVariable   [private, virtual]
 

Implements IDEA::PslTokenImpl.

void IDEA::PslTokenImpl::endAt const Time   time [inherited]
 

bool IDEA::PlasmaTokenImpl::endsAtStart const PslToken   token const [virtual]
 

Implements IDEA::PslTokenImpl.

bool IDEA::PlasmaTokenImpl::endsNoEarlierThanEnd const PslToken   token const [virtual]
 

Calculates temporal distance between end time variables of 2 tokens. Returns true if current token's end event must match or precede given token's end event.

Implements IDEA::PslTokenImpl.

void IDEA::PlasmaTokenImpl::finalize   [virtual]
 

Reimplemented from IDEA::PslTokenImpl.

const std::string & IDEA::PslTokenImpl::getComRelayName   [inherited]
 

const PslDatabase * IDEA::PslTokenImpl::getDatabase   [inherited]
 

Time IDEA::PlasmaTokenImpl::getEarliestEndTime   [virtual]
 

Implements IDEA::PslTokenImpl.

Time IDEA::PlasmaTokenImpl::getEarliestStartTime   [virtual]
 

Implements IDEA::PslTokenImpl.

const PslVariable * IDEA::PslTokenImpl::getEndVariable   [inherited]
 

int IDEA::PslTokenImpl::getExternalId const PslToken   token [inherited]
 

unsigned int IDEA::PslTokenImpl::getExternalTokenId bool    externalize [inherited]
 

int IDEA::PlasmaTokenImpl::getId   [virtual]
 

Implements IDEA::PslTokenImpl.

Time IDEA::PlasmaTokenImpl::getLatestEndTime   [virtual]
 

Implements IDEA::PslTokenImpl.

Time IDEA::PlasmaTokenImpl::getLatestStartTime   [virtual]
 

Implements IDEA::PslTokenImpl.

Time IDEA::PlasmaTokenImpl::getMaximumDuration   [virtual]
 

Implements IDEA::PslTokenImpl.

Time IDEA::PlasmaTokenImpl::getMinimumDuration   [virtual]
 

Implements IDEA::PslTokenImpl.

const std::string & IDEA::PslTokenImpl::getName   [inherited]
 

const PslParameter * IDEA::PslTokenImpl::getParameter int    index const [inherited]
 

const PslParameter * IDEA::PslTokenImpl::getParameter const std::string &    compareString const [inherited]
 

PslParameterList IDEA::PslTokenImpl::getParameters   [inherited]
 

const PslPredicate * IDEA::PslTokenImpl::getPredicate   [inherited]
 

const PslParameter * IDEA::PslTokenImpl::getReturnStatusFlagParameter   [inherited]
 

const PslParameter * IDEA::PslTokenImpl::getReturnStatusParameter   [inherited]
 

const TokenLocation & IDEA::PslTokenImpl::getSourceLocation   [inherited]
 

const PslVariable * IDEA::PslTokenImpl::getStartVariable   [inherited]
 

const TokenLocation & IDEA::PslTokenImpl::getTargetLocation   [inherited]
 

const PslTimeline * IDEA::PslTokenImpl::getTimeline   [inherited]
 

const EUROPA::TokenId IDEA::PlasmaTokenImpl::getTokenId  
 

bool IDEA::PslTokenImpl::hasDirectSuccessor const PslTimeline   tl const [inherited]
 

bool IDEA::PslTokenImpl::isAuthorized   [inherited]
 

bool IDEA::PlasmaTokenImpl::isCommitted   [virtual]
 

Implements IDEA::PslTokenImpl.

bool IDEA::PslTokenImpl::isControllable   [inherited]
 

bool IDEA::PslTokenImpl::isEnabled   [inherited]
 

Returns true if the invoking token is enabled (it can be ended).

bool IDEA::PslTokenImpl::isExecutable   [inherited]
 

bool IDEA::PslTokenImpl::isExecuting const Time   t const [inherited]
 

bool IDEA::PslTokenImpl::isFinalized   [inherited]
 

bool IDEA::PslTokenImpl::isGoal   [inherited]
 

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

exact

Reimplemented from IDEA::PslTokenImpl.

void IDEA::PlasmaTokenImpl::resetSuccessorSelectorParameter const std::vector< int > &    authorities,
int    index
[private]
 

Internal function; finalizes the status or output parameter and its associated flag parameter corresponding to the argument.

void IDEA::PlasmaTokenImpl::resetSuccessorSelectorParameters const std::vector< int > &    authorities
 

const PslTimeline * IDEA::PlasmaTokenImpl::retrieveTimelineAllocation   [private, virtual]
 

Implements IDEA::PslTokenImpl.

bool IDEA::PslTokenImpl::returnsStatus   [inherited]
 

void IDEA::PlasmaTokenImpl::setEarliestEndTime const Time   value [virtual]
 

Sets the earliest time of the end-time to the maximum of the current earliest end-time and value.

LowerBound( end ) = maximum{ LowerBound( end ), value }. This should create an inconsistency if value is greater than UpperBound( end )

Implements IDEA::PslTokenImpl.

void IDEA::PlasmaTokenImpl::setEarliestStartTime const Time   value [virtual]
 

Sets the earliest time of the start-time to the maximum of the current earliest start-time and value.

LowerBound( start ) = maximum{ LowerBound( start ), value }. This should create an inconsistency if value is greater than UpperBound( start )

Implements IDEA::PslTokenImpl.

void IDEA::PslTokenImpl::setEnabled bool    value [inherited]
 

void IDEA::PlasmaTokenImpl::setLatestEndTime const Time   value [virtual]
 

Sets the latest time of the end-time to the minimum of the current latest end-time and value.

UpperBound( end ) = minimum{ UpperBound( end ), value }. This should create an inconsistency if value is lower than LowerBound( end )

Implements IDEA::PslTokenImpl.

void IDEA::PlasmaTokenImpl::setLatestStartTime const Time   value [virtual]
 

Sets the latest time of the start-time to the maximum of the current latest start-time and value.

UpperBound( start ) = minimum{ UpperBound( start ), value }. This should create an inconsistency if value is lower than LowerBound( end )

Implements IDEA::PslTokenImpl.

void IDEA::PlasmaTokenImpl::setSuccessor const PslToken   token const [virtual]
 

Implements IDEA::PslTokenImpl.

void IDEA::PslTokenImpl::startAt const Time   time [inherited]
 

bool IDEA::PslTokenImpl::usesCPU   [inherited]
 


Member Data Documentation

Int2PslParameterMap IDEA::PslTokenImpl::m_Parameters [protected, inherited]
 

EUROPA::TokenId IDEA::PlasmaTokenImpl::m_TokenId [private]
 


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