Class TotalOrderTransformer
Defined in File totalordertransformer.h
Inheritance Relationships
Base Type
public Planner::StateTransformer
(Class StateTransformer)
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.
See also
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 ofs
is made, anda
is applied to this. Otherwise,a
is applied directly tos
.minDur – An optimistic minimum duration of
a
maxDur – An optimistic maximum duration of
a
- Returns:
The state reached following the application of
a
. IfinPlace=true
, this refers to the same state ass
.
Protected Attributes
-
inline TotalOrderTransformer()