Пример #1
0
 public ResultsViewer()
 {
     ChooseResultsPathCommand = new SimpleCommand(x => ChooseResultsPath());
     LoadBestChromosomeCommand = new SimpleCommand(x => LoadBestChromosome());
     ResultSets = new ObservableCollection<ResultSet>();
     ResultsPath = @"D:\Results";
     ShowAverageFitness = true;
     ShowBestChromosome = true;
     ShowCpuUsage = true;
     ShowIterationTime = true;
 }
Пример #2
0
 public Status(GeneticAlgorithm ga)
 {
     ga.ReportStatus += OnReportStatus;
     StopCommand = new SimpleCommand(x => ga.Stop());
     AvgFitness = new BlockingCollection<DataPoint>();
     BestChromosome = new BlockingCollection<DataPoint>();
     Selection = new BlockingCollection<DataPoint>();
     Crossover = new BlockingCollection<DataPoint>();
     Mutation = new BlockingCollection<DataPoint>();
     Repair = new BlockingCollection<DataPoint>();
     Transform = new BlockingCollection<DataPoint>();
     Evaluation = new BlockingCollection<DataPoint>();
 }
Пример #3
0
 protected void CreateCommands()
 {
     ExpandCommand = new SimpleCommand(x => Expand((Direction)x));
     NewCommand = new SimpleCommand(x => NewBuilding());
     AddFloorCommand = new SimpleCommand(x => AddFloor());
 }