Class StateTransformer

Inheritance Relationships

Derived Types

Class Documentation

class StateTransformer

Virtual class to wrap up the functionality of applying an action to a state and updating the temporal constraints.

Subclassed by Planner::PartialOrderTransformer, Planner::TotalOrderTransformer

Public Functions

inline virtual ~StateTransformer()
virtual TemporalConstraints *cloneTemporalConstraints(const TemporalConstraints*const, const int extendBy = 0) = 0
virtual TemporalConstraints *emptyTemporalConstraints() = 0
inline virtual int stepThatMustPrecedeUnfinishedActions(const TemporalConstraints*const) const

Return the index of the step in the plan that must precede the ends of all actions that have not yet finished. Default implementation is to return -1: i.e. no such step exists.

inline virtual double latestTimePointOfActionsStartedHere(const int &tilIndexApplied) const

Return the upper bound on the time-stamp of the next snap-action applied, after the specified number of TILs have been applied. Default implementation is to return DBL_MAX, i.e. unbounded.

Parameters:

tilIndexApplied – How many TILs have been applied

Returns:

The upper bound of the time-stamp of the next action applied

virtual MinimalState &applyAction(MinimalState &s, const ActionSegment &a, const bool &inPlace, const double &minDur, const double &maxDur) = 0

Apply a given action in the given state.

Parameters:
  • s – The state in which to apply the action a

  • a – The action to apply in the state s

  • inPlace – If false, a copy of s is made, and a is applied to this. Otherwise, a is applied directly to s.

  • minDur – An optimistic minimum duration of a

  • maxDur – An optimistic maximum duration of a

Returns:

The state reached following the application of a. If inPlace=true, this refers to the same state as s.

Protected Functions

inline StateTransformer()