public void VehicleSchedulingProblem_Apply_ShouldCreateSettings() { var settings = new PeaSettingsBuilder(); settings.AddSubProblem("Scheduling", new VehicleScheduling(2200)) .AddConflictDetector <AllRightConflictDetector>(); }
public void TravelingSalesmanProblem_Apply_ShouldCreateSettings() { var settings = new PeaSettingsBuilder(); settings.AddSubProblem("Berlin52", new TravelingSalesman(52)) .AddConflictDetector <AllRightConflictDetector>(); settings.StopWhen().TimeoutElapsed(10000); }
public void PeaSettingsBuilder_Serialize_ShouldReturnSame() { var settings = new PeaSettingsBuilder(); settings.AddSubProblem().WithEncoding <Chromosome.Permutation>("TSP"); settings.AddSubProblem().WithEncoding <Chromosome.SortedSubset>("VSP"); settings.StopWhen().TimeoutElapsed(10000); var original = settings.Build(); var result = SerializeAndDeserialize <PeaSettings>(original); result.Should().BeEquivalentTo(original); }