Exemplo n.º 1
0
        private void startButton_Click(object sender, EventArgs e)
        {
            AlgorithmForm algorithmForm = new AlgorithmForm(allColumns,
                                                            Convert.ToInt32(numericUpDownIteration.Value), Convert.ToInt32(numericUpDownPopulationSize.Value),
                                                            Convert.ToInt32(numericUpDownCrossFactor.Value), Convert.ToInt32(numericUpDownBests.Value),
                                                            Convert.ToInt32(numericUpDownCrossInterval.Value), Convert.ToInt32(numericUpDownMutationCount.Value),
                                                            Convert.ToInt32(numericUpDownMutationPower.Value), Thread.CurrentThread);
            ThreadStart startingThreadDelegate = new ThreadStart(algorithmForm.RunAlgorithm);
            Thread      algorithmThread        = new Thread(startingThreadDelegate);

            algorithmForm.Show();
            algorithmThread.IsBackground = true;
            algorithmThread.Start();
        }
Exemplo n.º 2
0
 public Individual(List <int> columnsIndexes, AlgorithmForm obj)
 {
     columnsPermutation = columnsIndexes;
     columnsToDelete    = new List <int>();
     algorithmObject    = obj;
 }