#include <Action.hh>
Action object used in planning. Actions are instances constructed based on ActionTemplate. A planning entity takes actions in order to change the world state.
◆ Action()
grail::planner::Action::Action |
( |
const ActionTemplate & |
actionTemplate, |
|
|
std::vector< unsigned int > && |
argumentIndices |
|
) |
| |
Creates a new Action object based on the template.
- Parameters
-
actionTemplate | - the template (family/type) of the action; see "ActionTemplate" |
argumentIndices | - IDs of specific objects that should be assigned as this action's parameters. |
◆ ApplyToState()
void grail::planner::Action::ApplyToState |
( |
WorldState & |
worldState | ) |
const |
Applies the action's logic and modifies the state.
- Parameters
-
worldState | - the state to apply the effects of action to. |
◆ GetArgumentIndices()
const std::vector< unsigned int > & grail::planner::Action::GetArgumentIndices |
( |
| ) |
const |
Returns a collection of IDs of objects that are assigned to the respective action's arguments.
- Returns
- A collection of IDs of objects that are assigned to the respective action's arguments.
◆ GetCost()
double grail::planner::Action::GetCost |
( |
const WorldState & |
worldState | ) |
const |
Returns the cost associated with this action. The costs are used by the planner's heuristic.
- Parameters
-
worldState | - the current state. |
- Returns
- The cost associated with this action.
◆ GetName()
const std::string & grail::planner::Action::GetName |
( |
| ) |
const |
Gets the name of the action.
◆ GetType()
int grail::planner::Action::GetType |
( |
| ) |
const |
Gets a unique type ID of the action.
◆ IsLegal()
bool grail::planner::Action::IsLegal |
( |
const WorldState & |
worldState | ) |
const |
Determines whether the action is legal (available) in the given state.
- Parameters
-
- Returns
- true if the action is legal.
The documentation for this class was generated from the following files:
- GrailPlanners/Planner/Action/Action.hh
- GrailPlanners/Planner/Action/Action.cpp