/// <summary> /// Computes the operator label in the relaxed planning graph. /// </summary> /// <param name="stateLabels">State 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 EvaluateOperatorPlanningGraphLabel(IStateLabels stateLabels, ForwardCostEvaluationStrategy evaluationStrategy) { double result = 0; foreach (var conditions in this) { result = Math.Max(result, conditions.EvaluateOperatorPlanningGraphLabel(stateLabels, evaluationStrategy)); } return(result); }
/// <summary> /// Computes the operator label in the relaxed planning graph. /// </summary> /// <param name="stateLabels">State 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 EvaluateOperatorPlanningGraphLabel(IStateLabels stateLabels, ForwardCostEvaluationStrategy evaluationStrategy) { StateLabels labels = (StateLabels)stateLabels; double result = 0; foreach (var assignment in this) { double variableLabel = labels[assignment]; if (evaluationStrategy == ForwardCostEvaluationStrategy.ADDITIVE_VALUE) { result += variableLabel; } else { result = Math.Max(result, variableLabel); } } return(result); }
/// <summary> /// Computes the operator label in the relaxed planning graph. /// </summary> /// <param name="substitution">Variable substitution.</param> /// <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 EvaluateOperatorPlanningGraphLabel(ISubstitution substitution, IStateLabels stateLabels, ForwardCostEvaluationStrategy evaluationStrategy) { return(EvaluationManager.EvaluateOperatorPlanningGraphLabel(this, substitution, (StateLabels)stateLabels, evaluationStrategy)); }
/// <summary> /// Computes the operator label in the relaxed planning graph. /// </summary> /// <param name="stateLabels">State 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 EvaluateOperatorPlanningGraphLabel(IStateLabels stateLabels, ForwardCostEvaluationStrategy evaluationStrategy) { return(EvaluateOperatorPlanningGraphLabel(null, stateLabels, evaluationStrategy)); }
/// <summary> /// Computes the operator label in the relaxed planning graph. /// </summary> /// <param name="stateLabels">State 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 EvaluateOperatorPlanningGraphLabel(IStateLabels stateLabels, ForwardCostEvaluationStrategy evaluationStrategy) { return(int.MaxValue); }
/// <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(Preconditions.EvaluateOperatorPlanningGraphLabel(stateLabels, evaluationStrategy)); }
/// <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)); }