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; }
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>(); }
protected void CreateCommands() { ExpandCommand = new SimpleCommand(x => Expand((Direction)x)); NewCommand = new SimpleCommand(x => NewBuilding()); AddFloorCommand = new SimpleCommand(x => AddFloor()); }