public static ResponsibilityNode GetResponsibilities(this KAOSModel model) { var node = new ResponsibilityNode(null); foreach (var rootGoal in model.RootGoals()) { RecursiveGetResponsibilities(node, rootGoal); } Factorize(node); Collapse(node); return(node); }
bool ConstraintsSatisfied() { foreach (var c in model.Elements.OfType <Constraint>()) { var result = new List <bool>(); foreach (var s in c.Conflict) { result.Add(model.RootGoals().Any(x => IsGoalActive(s, x))); } if (result.Count(x => x) > 1) { return(false); } } return(true); }
public void Setup() { var options = new RandomModelOptions { NbGoals = NbGoals, NbObstructions = NbObstructions, NbObstacles = NbObstacles }; var generator = new RandomModelGenerator(options); model = generator.Generate(); root = model.RootGoals().Single(); p3 = new BDDBasedPropagator(model); p3.PreBuildObstructionSet(root); }