public virtual ISatisfactionRate GetESR(Goal goal, IEnumerable <GoalException> activeResolutions) { ObstructionResolutionSuperset os; if (!obstructionSupersets.ContainsKey(goal.Identifier)) { os = new ObstructionResolutionSuperset(goal); } else { os = obstructionSupersets[goal.Identifier]; } var vector = new SamplingVector(_model); return(new DoubleSatisfactionRate(1.0 - os.GetProbability(vector, activeResolutions))); }
public ISatisfactionRate GetESR(Goal goal, IEnumerable <Obstacle> onlyObstacles) { ObstructionResolutionSuperset os; if (!obstructionSupersets.ContainsKey(goal.Identifier)) { os = new ObstructionResolutionSuperset(goal); } else { os = obstructionSupersets[goal.Identifier]; } var vector = new SamplingVector(_model, onlyObstacles?.Select(x => x.Identifier)?.ToHashSet()); var value = 1.0 - os.GetProbability(vector); return(new DoubleSatisfactionRate(value)); }