public void TestMilestoneGoalRefinement() { var options = new RandomModelOptions { MinGoalBranchingFactor = 2, MaxGoalBranchingFactor = 4, NbGoals = 2, MinObstacleANDBranchingFactor = 2, MaxObstacleANDBranchingFactor = 4, }; var generator = new RandomModelGenerator(options); var model = generator.Generate(); var p1 = new PatternBasedPropagator(model); var p2 = new BDDBasedPropagator(model); Console.WriteLine("Generated goals: " + model.Goals().Count()); Console.WriteLine("Generated obstacles: " + model.Obstacles().Count()); var root = model.RootGoals().Single(); var sr1 = (DoubleSatisfactionRate)p1.GetESR(root); var sr2 = (DoubleSatisfactionRate)p2.GetESR(root); Assert.AreEqual(sr1.SatisfactionRate, sr2.SatisfactionRate, 0.0001); }
public RandomModelGenerator(RandomModelOptions options) { this._options = options; _model = new KAOSModel(); _random = new Random(); _faker = new Faker(); }