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

IDEA::PlasmaGoalPlanner Class Reference

First it will make decisions to insert new goal tokens from 'planBranch', because GoalLoaderDecisionManager will create token decision points for the goal tokens. One planner step per goal. First token on a timeline is merged with existing token, other are activated. There's currently no way to merge with tokens other then the first one. Then it will plan over new goals (create subgoals, etc.). If goal loading failes due to a mismatch between supplied goals and the model or the current state of the plan DB, we should backtrack and delete goal tokens inserted so far from the plan database. More...

#include <PlasmaGoalPlanner.hh>

Inheritance diagram for IDEA::PlasmaGoalPlanner:

IDEA::GoalPlanner List of all members.

Public Types

typedef std::map< std::string,
std::set< std::string > > 
ClassToAttributeMap

Public Methods

 PlasmaGoalPlanner (const PslDatabase *db, const AgentTimingService *ats, const ReactivePlanner *rp, const std::string &heuristicFile, const std::string &noBranchFile, bool controlTimes=true, bool mergeFirstToken=true, bool freezeTokenStartEndTimes=true, bool useGeneralTimelines=false)
 Constructor, takes ReactivePlanner for 2 reasons - to get access to plan database and to pass authority. If true is passed for 'controlTimes', the planner will fiddle with start/end times of tokens so that first and last token on each timeline cover the horizon boundaries, while all other token timepoints are strictly within horizon. This is the default. If false is passed, its assumed that external plan specifies token start and end time ranges. If mergeFirstToken is true, first token on each timeline will be given a chance to get merged with existing token. Otherewise new token will be activated and inserted at the end of timeline.

void setPlanner (Planner *planner, bool deleteInstance)
const PlannergetPlanner () const
 Returns the 'internal' planner of the invoking goal-planner.

bool plan (PlanReader::ObjectToTimelines const &planBranch, const Time &horizonStart, const Time &horizonEnd)
 Loads goals from 'planBranch' and attempts to generate a consistent plan.

bool ignore (const std::string &className, const std::string &attrName)
 Attribute filters: do not make decisions on attribute 'attrName' of class 'className'. By default all attributes are in scope. Returns true if given class and attribute are declared in the model, false otherwise.

bool ignoreAllBut (ClassToAttributeMap const &attributesInScope)

Protected Methods

virtual void setGoals (PlanReader::ObjectToTimelines const &planBranch)
 passes goals to GoalLoaderDecisionManager for wrapping them in token decision points.


Private Types

typedef EUROPA::Id< GoalLoaderDecisionManagerGoalLoaderDecisionManagerId
 extension of OpenDecisionManager


Private Attributes

GoalLoaderDecisionManagerId m_decisionManager

Detailed Description

First it will make decisions to insert new goal tokens from 'planBranch', because GoalLoaderDecisionManager will create token decision points for the goal tokens. One planner step per goal. First token on a timeline is merged with existing token, other are activated. There's currently no way to merge with tokens other then the first one. Then it will plan over new goals (create subgoals, etc.). If goal loading failes due to a mismatch between supplied goals and the model or the current state of the plan DB, we should backtrack and delete goal tokens inserted so far from the plan database.

class PlasmaGoalPlannerImpl


Member Typedef Documentation

typedef std::map<std::string, std::set<std::string> > IDEA::GoalPlanner::ClassToAttributeMap [inherited]
 

map class names to attributes.

typedef EUROPA::Id<GoalLoaderDecisionManager> IDEA::PlasmaGoalPlanner::GoalLoaderDecisionManagerId [private]
 

extension of OpenDecisionManager


Constructor & Destructor Documentation

IDEA::PlasmaGoalPlanner::PlasmaGoalPlanner const PslDatabase   db,
const AgentTimingService   ats,
const ReactivePlanner   rp,
const std::string &    heuristicFile,
const std::string &    noBranchFile,
bool    controlTimes = true,
bool    mergeFirstToken = true,
bool    freezeTokenStartEndTimes = true,
bool    useGeneralTimelines = false
 

Constructor, takes ReactivePlanner for 2 reasons - to get access to plan database and to pass authority. If true is passed for 'controlTimes', the planner will fiddle with start/end times of tokens so that first and last token on each timeline cover the horizon boundaries, while all other token timepoints are strictly within horizon. This is the default. If false is passed, its assumed that external plan specifies token start and end time ranges. If mergeFirstToken is true, first token on each timeline will be given a chance to get merged with existing token. Otherewise new token will be activated and inserted at the end of timeline.


Member Function Documentation

const Planner * IDEA::GoalPlanner::getPlanner   [inherited]
 

Returns the 'internal' planner of the invoking goal-planner.

bool IDEA::GoalPlanner::ignore const std::string &    className,
const std::string &    attrName
[inherited]
 

Attribute filters: do not make decisions on attribute 'attrName' of class 'className'. By default all attributes are in scope. Returns true if given class and attribute are declared in the model, false otherwise.

bool IDEA::GoalPlanner::ignoreAllBut ClassToAttributeMap const &    attributesInScope [inherited]
 

By default the planner makes decisions on all attributes of all classes. This tells the planner to make decisions only on the tokens of the specified attributes. Returns true if given classes and attributes are declared in the model, false otherwise.

bool IDEA::GoalPlanner::plan PlanReader::ObjectToTimelines const &    planBranch,
const Time   horizonStart,
const Time   horizonEnd
[inherited]
 

Loads goals from 'planBranch' and attempts to generate a consistent plan.

Returns true if a consistent plan is found, false otherwise

void IDEA::PlasmaGoalPlanner::setGoals PlanReader::ObjectToTimelines const &    planBranch [protected, virtual]
 

passes goals to GoalLoaderDecisionManager for wrapping them in token decision points.

Implements IDEA::GoalPlanner.

void IDEA::GoalPlanner::setPlanner Planner   planner,
bool    deleteInstance
[inherited]
 


Member Data Documentation

GoalLoaderDecisionManagerId IDEA::PlasmaGoalPlanner::m_decisionManager [private]
 


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