Ejemplo n.º 1
0
 /// <summary>
 /// Checks whether the operator is relevant to the given target conditions.
 /// </summary>
 /// <param name="conditions">Target conditions.</param>
 /// <returns>True if the operator is relevant to the given conditions, false otherwise.</returns>
 public bool IsRelevant(Planner.IConditions conditions)
 {
     return(LiftedOperator.IsRelevant((IConditions)conditions, Substitution));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Checks whether the operator is relevant to the given target relative state.
 /// </summary>
 /// <param name="relativeState">Target relative state.</param>
 /// <returns>True if the operator is relevant to the given relative state, false otherwise.</returns>
 public bool IsRelevant(Planner.IRelativeState relativeState)
 {
     return(LiftedOperator.IsRelevant((IRelativeState)relativeState, Substitution));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Checks whether the operator is applicable to the given state.
 /// </summary>
 /// <param name="state">Reference state.</param>
 /// <returns>True if the operator is applicable to the given state, false otherwise.</returns>
 public bool IsApplicable(Planner.IState state)
 {
     return(LiftedOperator.IsApplicable((IState)state, Substitution));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Applies the operator to the given state. The result is a new state - successor.
 /// </summary>
 /// <param name="state">Reference state.</param>
 /// <param name="directlyModify">Should the input state be directly modified? (otherwise a new node is created)</param>
 /// <returns>Successor state to the given state.</returns>
 public Planner.IState Apply(Planner.IState state, bool directlyModify = false)
 {
     return(LiftedOperator.Apply((IState)state, Substitution, directlyModify));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Constructs an instance of the grounded PDDL operator.
 /// </summary>
 /// <param name="liftedOperator">Reference to the lifted PDDL operator.</param>
 /// <param name="substitution">Concrete PDDL operator substitution.</param>
 public Operator(LiftedOperator liftedOperator, ISubstitution substitution)
 {
     LiftedOperator = liftedOperator;
     Substitution   = substitution;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Gets the operator name.
 /// </summary>
 /// <returns>Full operator name.</returns>
 public string GetName()
 {
     return(LiftedOperator.GetName(Substitution));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Gets a list of atoms that are made true by the application of this operator. Only simple positive effects are wanted.
 /// </summary>
 /// <returns>List of effective effect atoms.</returns>
 public List <IAtom> GetEffectiveEffects()
 {
     return(LiftedOperator.GetEffectiveEffects(Substitution));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Gets a list of atoms from the specified state that were necessary to make this operator applicable. We already assume that the operator is applicable to the given state.
 /// </summary>
 /// <param name="predecessorState">Preceding state.</param>
 /// <returns>List of effective precondition atoms.</returns>
 public List <IAtom> GetEffectivePreconditions(IState predecessorState)
 {
     return(LiftedOperator.GetEffectivePreconditions(Substitution, predecessorState));
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Computes the operator label in the relaxed planning graph.
 /// </summary>
 /// <param name="stateLabels">Atom labels from the predecessor layer in the graph.</param>
 /// <param name="evaluationStrategy">Evaluation strategy of the planning graph.</param>
 /// <returns>Computed operator label in the relaxed planning graph.</returns>
 public double ComputePlanningGraphLabel(IStateLabels stateLabels, ForwardCostEvaluationStrategy evaluationStrategy)
 {
     return(LiftedOperator.ComputePlanningGraphLabel(Substitution, (StateLabels)stateLabels, evaluationStrategy));
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Applies the operator backwards to the given target relative state. The result is a new relative state (or more relative states, if conditional effects are present).
 /// </summary>
 /// <param name="relativeState">Target relative state.</param>
 /// <returns>Preceding relative states.</returns>
 public IEnumerable <Planner.IRelativeState> ApplyBackwards(Planner.IRelativeState relativeState)
 {
     return(LiftedOperator.ApplyBackwards((IRelativeState)relativeState, Substitution));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Applies the operator backwards to the given target conditions. The result is a new set of conditions.
 /// </summary>
 /// <param name="conditions">Target conditions.</param>
 /// <returns>Preceding conditions.</returns>
 public Planner.IConditions ApplyBackwards(Planner.IConditions conditions)
 {
     return(LiftedOperator.ApplyBackwards((IConditions)conditions, Substitution));
 }