Class RPGBuilder
Defined in File RPGBuilder.h
Nested Relationships
Nested Types
Class Documentation
-
class RPGBuilder
Public Types
Public Static Functions
-
static inline bool canSkipToEnd(const int &i)
-
static void simplify(pair<list<double>, list<int>> &s)
-
static void makeOneSided(pair<list<double>, list<int>> &LHSvariable, pair<list<double>, list<int>> &RHSvariable, const int &negOffset)
-
static inline const vector<double> &getNonTemporalDurationToPrint()
-
static inline const vector<FakeTILAction*> &getAllTimedInitialLiterals()
-
static inline vector<list<NumericPrecondition*>> &getFixedDEs()
-
static inline vector<list<NumericPrecondition*>> &getMinDEs()
-
static inline vector<list<NumericPrecondition*>> &getMaxDEs()
-
static inline vector<RPGDuration*> &getRPGDEs(const int &a)
-
static inline vector<LinearEffects*> &getLinearDiscretisation()
-
static inline vector<list<int>> &getStartPreNumerics()
-
static inline vector<list<int>> &getInvariantNumerics()
-
static inline vector<list<int>> &getEndPreNumerics()
-
static inline vector<list<int>> &getStartEffNumerics()
-
static inline vector<list<int>> &getEndEffNumerics()
-
static inline const vector<list<ConditionalEffect>> &getActionsToConditionalEffects()
-
static inline vector<RPGNumericPrecondition> &getNumericPreTable()
@Return A reference to
rpgNumericPreconditions
, the preconditions used in the problem, in LNF.
-
static inline vector<RPGNumericEffect> &getNumericEff()
@Return A reference to
rpgNumericEffects
, the effects used in the problem, in LNF.
-
static inline const vector<list<pair<int, VAL::time_spec>>> &getRpgNumericEffectsToActions()
@Return a reference to
rpgNumericEffectsToActions
: for each numeric effects, which actions have it.
-
static inline const vector<ArtificialVariable> &getArtificialVariableTable()
@Return A const reference to
rpgArtificialVariables
, the artificial variables built so that multi-variable preconditions and can be written in terms of a single ‘artificial’ variable.
-
static void initialise()
-
static inline bool nonTemporalProblem()
-
static RPGHeuristic *generateRPGHeuristic()
-
static inline RPGHeuristic *getHeuristic()
-
static void getInitialState(LiteralSet &initialState, vector<double> &initialFluents)
-
static void getNonStaticInitialState(LiteralSet &initialState, vector<double> &initialFluents)
-
static inline instantiatedOp *getInstantiatedOp(const int &i)
-
static inline list<FakeTILAction> &getTILs()
-
static inline vector<FakeTILAction*> &getTILVec()
-
static void getEffects(instantiatedOp *op, const bool &start, list<Literal*> &add, list<Literal*> &del, list<NumericEffect> &numeric)
-
static void getPrecInv(instantiatedOp *op, const bool &start, list<Literal*> &precs, list<Literal*> &inv, list<NumericPrecondition> &numericPrec, list<NumericPrecondition> &numericInv)
-
static inline list<int> &getMentioned(const int &i)
-
static bool stepNeedsToHaveFinished(const ActionSegment &act, const MinimalState &s, set<int> &dest)
-
static double getOpMinDuration(instantiatedOp *op, const int &div)
-
static double getOpMinDuration(const int &op, const int &div)
-
static double getOpMaxDuration(instantiatedOp *op, const int &div)
-
static double getOpMaxDuration(const int &op, const int &div)
-
static pair<double, double> getOpDuration(instantiatedOp *op, const int &div, const vector<double> &minFluents, const vector<double> &maxFluents)
-
static pair<double, double> getOpDuration(const int &op, const int &div, const vector<double> &minFluents, const vector<double> &maxFluents)
-
static inline PNE *getPNE(const int &i)
-
static inline int getPNECount()
-
static inline int getAVCount()
-
static inline ArtificialVariable &getArtificialVariable(const int &i)
-
static inline list<int> &getVariableDependencies(const int &i)
-
static inline list<int> &affectsRPGNumericPreconditions(int i)
-
static inline int howManyTimes(const int &actID, const MinimalState &e)
-
static inline int howManyTimesOptimistic(const int &actID, const MinimalState &e)
-
static inline bool literalIsOneShot(const int &lID)
-
static inline bool isSelfMutex(const int &actID)
-
static inline list<pair<int, int>> &getNumericRPGGoals()
-
static inline list<NumericPrecondition> &getNumericGoals()
-
static bool isInteresting(const int &act, const map<int, PropositionAnnotation> &facts, const map<int, set<int>> &started)
-
static inline LiteralSet &getEndOneShots(const int &i)
Public Static Attributes
-
static bool doSkipAnalysis
-
static set<int> metricVars
-
static const vector<bool> &rogueActions
-
static vector<bool> realRogueActions
-
static bool sortedExpansion
-
static bool fullFFHelpfulActions
-
static bool modifiedRPG
-
static bool noSelfOverlaps
-
static bool doTemporalAnalysis
-
class ArtificialVariable
Public Functions
-
inline ArtificialVariable()
-
inline ArtificialVariable(const int &id, const int &s, const vector<double> &w, const vector<int> &f, const double &d, const double &maxIn)
-
inline double evaluate(const vector<double> &fluentTable)
-
double evaluateWCalculate(const vector<double> &fluentTable, const int &pneCount)
-
double evaluateWCalculate(const vector<double> &minFluentTable, const vector<double> &maxFluentTable, const int &pneCount)
-
bool operator<(const ArtificialVariable &v) const
-
void display(ostream &o) const
-
inline void updateMax(const double &m)
-
inline ArtificialVariable()
-
class ConditionalEffect
Class to represent a conditional effect. The class is capable of storing more fields than can currently be used by the planner - currently, only conditional effects upon metric tracking variables are supported, conditional on either propositions controlled exclusively by timed initial literals, or on numeric values.
Public Functions
-
inline ConditionalEffect()
-
inline ConditionalEffect()
-
struct Constraint
-
class DurationExpr
A class defining a single duration constraint, in LNF.
Public Functions
-
inline DurationExpr()
-
inline DurationExpr(const double &d)
Create a duration expression, with unknown operator and empty weights and variables.
- Parameters:
d – The constant term for the duration expression
-
double minOf(const vector<double> &minVars, const vector<double> &maxVars)
Evaluate the minimum possible value that satisfies this duration expression, given the provided lower- and upper-bounds on the values of the task numeric variables.
- Parameters:
minVars – Minimum values of the task variables
maxvars – Maximum values of the task variables
- Returns:
The lowest permissible duration, according to this duration expression.
-
double maxOf(const vector<double> &minVars, const vector<double> &maxVars)
Evaluate the maximum possible value that satisfies this duration expression, given the provided lower- and upper-bounds on the values of the task numeric variables.
- Parameters:
minVars – Minimum values of the task variables
maxvars – Maximum values of the task variables
- Returns:
The greatest permissible duration, according to this duration expression.
Public Members
-
vector<double> weights
The weights of the variables in the duration expression
-
vector<int> variables
The IDs of the variables in the duration expression.
See also
RPGBuilder::getPNE
-
VAL::comparison_op op
The comparison operator for this duration expression. Is one of:
VAL::E_GREATEQ
for(>= ?duration ...)
VAL::E_GREATER
for(> ?duration ...)
VAL::E_EQUALS
for(= ?duration ...)
VAL::E_LESS
for(< ?duration ...)
VAL::E_LESSEQ
for(<= ?duration ...)
-
double constant
The constant term for the duration expression
-
inline DurationExpr()
-
class FakeTILAction
Class to represent the ‘action’ whose application corresponds to a timed initial literal.
Public Functions
-
inline void mergeIn(const LiteralSet &adds, const LiteralSet &dels)
Add the specified add and delete effects to the timed initial literal action. Is used when multiple TILs are found at a given time-stamp.
- Parameters:
adds – Add effects to include in this TIL action
dels – Delete effects to include in this TIL action
-
inline FakeTILAction(const double &dur, const LiteralSet &adds, const LiteralSet &dels)
Constructor for an action corresponding to a Timed Initial Literal.
- Parameters:
dur – The time at which the timed initial occurs
adds – The facts added at time
dur
dels – The facts deleted at time
dur
-
inline void mergeIn(const LiteralSet &adds, const LiteralSet &dels)
-
class KShotFormula
Subclassed by Planner::RPGBuilder::KShotKShotFormula, Planner::RPGBuilder::OneShotKShotFormula, Planner::RPGBuilder::UnlimitedKShotFormula
Public Functions
-
inline KShotFormula()
-
virtual int getLimit(const MinimalState &s) const = 0
-
virtual int getOptimisticLimit(const MinimalState &s) const = 0
-
inline virtual ~KShotFormula()
-
inline KShotFormula()
-
class KShotKShotFormula : public Planner::RPGBuilder::KShotFormula
Public Functions
-
inline KShotKShotFormula(list<ShotCalculator> &c)
-
virtual int getLimit(const MinimalState &s) const
-
virtual int getOptimisticLimit(const MinimalState &s) const
-
inline KShotKShotFormula(list<ShotCalculator> &c)
-
class LinearEffects
A class defining the linear continuous effects of an action
Public Members
-
vector<int> vars
The IDs of the variables upon which this action has continuous effects.
See also
RPGBuilder::getPNE
-
vector<vector<EffectExpression>> effects
The effects themselves. Each entry is a vector describing the effect upon the corresponding variable in
vars
. For now, at most one such vector exists, but in the future this may change if support for piecewise-linear effects is added.
-
int divisions
The number of divisions for the continuous numeric effects of the action. At present this is always 1, i.e. the gradients of the effects remain fixed across the execution of the action, but this may change if support for piecewise-linear effects is added.
-
vector<int> vars
-
class NoDuplicatePair
Public Functions
-
inline NoDuplicatePair()
-
inline NoDuplicatePair(list<Literal*> *const listIn, LiteralSet *const setIn)
-
inline bool operator!() const
-
inline NoDuplicatePair()
-
class NumericEffect
Public Functions
-
NumericEffect(const VAL::assign_op &opIn, const int &fIn, VAL::expression *formulaIn, VAL::FastEnvironment *f, VAL::TypeChecker *t = 0)
-
double applyEffect(vector<double> &fluents) const
-
void display(ostream &o) const
-
NumericEffect(const VAL::assign_op &opIn, const int &fIn, VAL::expression *formulaIn, VAL::FastEnvironment *f, VAL::TypeChecker *t = 0)
-
class NumericPrecondition
Public Functions
-
NumericPrecondition(const VAL::comparison_op &opIn, VAL::expression *LHSformulaIn, VAL::expression *RHSformulaIn, VAL::FastEnvironment *f, VAL::TypeChecker *t = 0, const bool negated = false)
-
bool isSatisfied(vector<double> &fluents) const
-
void display(ostream &o) const
-
double evaluateRHS(vector<double> &fluentTable) const
-
pair<double, bool> constRHS() const
-
NumericPrecondition(const VAL::comparison_op &opIn, VAL::expression *LHSformulaIn, VAL::expression *RHSformulaIn, VAL::FastEnvironment *f, VAL::TypeChecker *t = 0, const bool negated = false)
-
class OneShotKShotFormula : public Planner::RPGBuilder::KShotFormula
Public Functions
-
inline OneShotKShotFormula(list<int> &toWatch)
-
virtual int getLimit(const MinimalState &s) const
-
virtual int getOptimisticLimit(const MinimalState &s) const
-
inline OneShotKShotFormula(list<int> &toWatch)
-
struct Operand
-
class ProtoConditionalEffect
Public Members
-
LiteralSet startPrecSet
-
LiteralSet invSet
-
LiteralSet endPrecSet
-
LiteralSet startNegPrecSet
-
LiteralSet negInvSet
-
LiteralSet endNegPrecSet
-
list<RPGBuilder::NumericPrecondition> startPrecNumeric
-
list<RPGBuilder::NumericPrecondition> invNumeric
-
list<RPGBuilder::NumericPrecondition> endPrecNumeric
-
LiteralSet startAddEffSet
-
LiteralSet startDelEffSet
-
list<RPGBuilder::NumericEffect> startNumericEff
-
LiteralSet endAddEffSet
-
LiteralSet endDelEffSet
-
list<RPGBuilder::NumericEffect> endNumericEff
-
LiteralSet startPrecSet
-
class RPGDuration
A class containing all the duration constraints imposed on an action.
Public Functions
-
inline RPGDuration(list<DurationExpr*> &eq, list<DurationExpr*> &low, list<DurationExpr*> &high)
-
inline const list<DurationExpr*> &operator[](const int &i) const
Return one of the lists of durations contained in the object.
- Parameters:
i – Which list of durations to return:
0 returns the
fixed
duration expressions;1 returns the
min
duration expressions;2 returns the
max
duration expressions.
- Returns:
The requested list of duration expressions.
Public Members
-
list<DurationExpr*> fixed
The fixed durations of the action, those of the form
(= ?duration ...)
-
list<DurationExpr*> min
The minimum durations of the action, those of the form
(>= ?duration ...)
or(> ?duration ...)
-
list<DurationExpr*> max
The maximum durations of the action, those of the form
(<= ?duration ...)
or(< ?duration ...)
-
inline RPGDuration(list<DurationExpr*> &eq, list<DurationExpr*> &low, list<DurationExpr*> &high)
-
class RPGNumericEffect
Public Functions
-
inline RPGNumericEffect()
-
inline RPGNumericEffect(const int &idIn, const int &fluent, const bool &ass, const vector<double> &weightsIn, const vector<int> &vars, const int &s, const double &con)
-
inline double evaluate(const vector<double> &maxFluents, const double &minDur, const double &maxDur) const
-
pair<double, double> applyEffectMinMax(const vector<double> &minFluents, const vector<double> &maxFluents, const double &minDur, const double &maxDur)
-
bool operator<(const RPGNumericEffect &e) const
-
void display(ostream &o) const
-
inline RPGNumericEffect()
-
class RPGNumericPrecondition
Public Functions
-
inline RPGNumericPrecondition()
-
inline RPGNumericPrecondition(const int &i, const int &lv, const double &lw, const VAL::comparison_op &o, const double &rw)
-
inline bool isSatisfied(vector<double> &maxFluents) const
-
bool isSatisfiedWCalculate(const vector<double> &maxFluents) const
-
bool isSatisfiedWCalculate(const vector<double> &minFluents, const vector<double> &maxFluents) const
-
bool operator<(const RPGNumericPrecondition &r) const
-
void display(ostream &o) const
-
inline RPGNumericPrecondition()
-
struct ShotCalculator
Public Functions
-
inline ShotCalculator(const int &v, const double &g, const double &d)
-
inline ShotCalculator(const int &v, const double &g, const double &d)
-
class UnlimitedKShotFormula : public Planner::RPGBuilder::KShotFormula
Public Functions
-
inline UnlimitedKShotFormula()
-
inline virtual int getLimit(const MinimalState&) const
-
inline virtual int getOptimisticLimit(const MinimalState&) const
-
inline UnlimitedKShotFormula()
-
static inline bool canSkipToEnd(const int &i)