A class representing an action that can be simulated by grail planner.  
 More...
#include <ActionTemplate.hh>
|  | 
|  | ActionTemplate (const std::string &name, const std::vector< unsigned int > &actionParameterTypes) | 
|  | 
|  | ActionTemplate (ActionTemplate &&other)=default | 
|  | 
| void | SetPreconditions (PreconditionFunction preconditionFunction) | 
|  | 
| void | SetEffects (EffectFunction effectFunction) | 
|  | 
| void | SetCostFunction (CostFunction costFunction) | 
|  | 
| void | SetTypeId (int id) | 
|  | 
| int | GetTypeId () const | 
|  | 
| const std::string & | GetName () const | 
|  | 
| std::vector< class Action > | GenerateActions (const class WorldState &worldState) const | 
|  | 
A class representing an action that can be simulated by grail planner. 
◆ SetCostFunction()
      
        
          | void grail::planning::ActionTemplate::SetCostFunction | ( | CostFunction | costFunction | ) |  | 
      
 
Sets a function returning execution cost of the action, given a world state 
- Parameters
- 
  
    | costFunction | - a function returing a number representing the action's cost, accepting a vector of action arguments (WorldObjects) and the current WorldState reference |  
 
 
 
◆ SetEffects()
      
        
          | void grail::planning::ActionTemplate::SetEffects | ( | EffectFunction | effectFunction | ) |  | 
      
 
Sets a function applied to a world state each time this action is performed in a planner iteration 
- Parameters
- 
  
    | effect | function - a function returning void and accepting a vector of action arguments (WorldObjects) and the current WorldState reference |  
 
 
 
◆ SetPreconditions()
      
        
          | void grail::planning::ActionTemplate::SetPreconditions | ( | PreconditionFunction | preconditionFunction | ) |  | 
      
 
Sets a precondition function that will be checked to verify legality of the action 
- Parameters
- 
  
    | preconditionFunction | - a boolean function accepting a vector of action arguments (WorldObjects) and the current WorldState reference |  
 
 
 
The documentation for this class was generated from the following files:
- GrailPlanners/Planner/Action/ActionTemplate.hh
- GrailPlanners/Planner/Action/ActionTemplate.cpp