Class TemporalConstraints
Defined in File temporalconstraints.h
Class Documentation
-
class TemporalConstraints
Public Functions
-
TemporalConstraints()
Default constructor, initialising the temporal constraints to empty, setting
mostRecentStep
-
TemporalConstraints(const TemporalConstraints&, const int extendBy = 0)
Copy constructor, optionally extending the size of the constraints vector to reserve space for constraints on new steps.
- Parameters:
extendBy – The number of additional steps to allow space for in the constraints vector.
-
virtual ~TemporalConstraints()
-
virtual void addOrdering(const unsigned int &comesFirst, const unsigned int &comesSecond, const bool &epsilon)
Add an ordering between two snap-actions, optionally including an epsilon separation.
- Parameters:
comesFirst – Index of the step that must come before
comesSecond
comesSecond – Index of the step that must come after
comesFirst
epsilon – If
true
, comesSecond must be strictly after comesFirst separated by a gap of ‘epsilon’ (a small number).
-
virtual void extend(const int &extendBy)
Extend the vector of temporal constraints to include entries for additional plan steps.
- Parameters:
extendBy – The number of new (initially empty) entries to allow space for.
-
inline const map<int, bool> *stepsBefore(const int &i) const
Accessor function to return the steps that must come before a given step.
- Parameters:
i – The step for which the predecessors are desired
- Returns:
A map, the keys of which denote the steps which must precede
i
, and the corresponding keys, iftrue
, denote that separation of at least epsilon is needed.
-
inline const unsigned int size() const
Returns the current size of the vector of temporal constraints.
-
inline const int &getMostRecentStep() const
Returns the value of
mostRecentStep
, the index of the step most recently added to the plan.- Returns:
The value of
mostRecentStep
-
inline void setMostRecentStep(const int &last)
Updates the value of
mostRecentStep
, the index of the step most recently added to the plan.- Parameters:
last – The new value to give
mostRecentStep
Public Members
-
vector<FluentInteraction> lastStepToTouchPNE
A vector, with one entry per task numeric variable, recording the recent and current interactions between the steps in the plan and that variable.
See also
Protected Attributes
-
vector<map<int, bool>*> stepsComeBeforeThisOne
The vector of temporal constraints, for each step in the plan. Each entry
i
in the vector consists of a map, the keys of which denote the steps that must precedei
, and the corresponding keys, iftrue
denote that separation of at least epsilon is needed.
-
int mostRecentStep
The index of the step most recently added to the plan. Used by TotalOrderTransformer to impose a total ordering.
See also
-
TemporalConstraints()