/// <summary> /// Gets a collection of all relevant predecessors (backwards transitions) from the specified relative state. Lazy generated via yield return. /// </summary> /// <param name="relativeState">Original state.</param> /// <returns>Lazy generated collection of relevant predecessors.</returns> public IEnumerable <IPredecessor> GetPredecessors(Planner.IRelativeState relativeState) { return(TransitionsGenerator.Value.GetPredecessors((IRelativeState)relativeState)); }
/// <summary> /// Checks whether the initial state of the planning problem is meeting conditions specified by the given relative state. /// </summary> /// <param name="relativeState">Relative state to be checked.</param> /// <returns>True if the given relative state is satisfied for the initial state of the problem, false otherwise.</returns> public bool IsStartRelativeState(Planner.IRelativeState relativeState) { return(relativeState.Evaluate(InitialState)); }
/// <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(Effects.ApplyBackwards((IRelativeState)relativeState, Preconditions)); }
/// <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(Effects.IsRelevant((IRelativeState)relativeState, Preconditions)); }
/// <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)); }
/// <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)); }