Class TotalOrderTransformer

Inheritance Relationships

Base Type

Class Documentation

class TotalOrderTransformer : public Planner::StateTransformer

A class wrapping up the functionality of applying an action to a state, where the actions are constrained to occur in a strict total-order. This follows, for example, the behaviour of CRIKEY and COLIN.

Public Functions

inline TotalOrderTransformer()
inline virtual ~TotalOrderTransformer()
virtual int stepThatMustPrecedeUnfinishedActions(const TemporalConstraints *const cons) const

Returns the index of the most recent step in the plan - the step which, due to the total order constraints, must precede the ends of all actions that have started but not yet finished.

@See TemporalConstraints

Parameters:

cons – The temporal constraints from which to extract the index of the appropriate step. @Return If the plan is empty, -1; otherwise, the index of the step most recently added.

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. As the plan must follow a total order, all actions before the next TIL can come no later than then.

Parameters:

tilIndexApplied – How many TILs have been applied

Returns:

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

virtual TemporalConstraints *cloneTemporalConstraints(const TemporalConstraints*const, const int extendBy = 0)
virtual TemporalConstraints *emptyTemporalConstraints()
virtual MinimalState &applyAction(MinimalState &s, const ActionSegment &a, const bool &inPlace, const double &minDur, const double &maxDur)

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 Attributes

PartialOrderTransformer t