예제 #1
0
 private void buttonSearch_Click(object sender, EventArgs e)
 {
     testingResult       = new TestingResultsOfClasterization(100);
     SGA                 = new SerialGA();
     PGA                 = new ParallelGA();
     searchClick         = true;
     progressBar.Minimum = 0;
     progressBar.Maximum = int.Parse(textBoxGenerationsNumber.Text);
     if (saveResultsFileDialog.ShowDialog() == DialogResult.OK)
     {
         resultFileName = saveResultsFileDialog.FileName;
         if (saveFileDialogTestData.ShowDialog() == DialogResult.OK)
         {
             resultTestFileName = saveFileDialogTestData.FileName;
             Thread st = new Thread(Search);
             st.IsBackground = true;
             st.Start();
         }
     }
 }
예제 #2
0
 private void buttonTestGA_Click(object sender, EventArgs e)
 {
     //Testing
     testingResult = new TestingResultsOfClasterization(100);
     SGAT          = new SerialGATest(double.Parse(textBoxTestingResultsSelectionThreshold.Text), int.Parse(textBoxTournamentGroupQuantity.Text),
                                      double.Parse(textBoxPercentOfChangeGeneInInitializationStep.Text), 100);
     PGAT = new ParallelGATest(double.Parse(textBoxTestingResultsSelectionThreshold.Text),
                               double.Parse(textBoxTransmissionRateBetweenParallelPopulations.Text), int.Parse(textBoxTournamentGroupQuantity.Text),
                               double.Parse(textBoxPercentOfChangeGeneInInitializationStep.Text), 100);
     searchClick         = true;
     progressBar.Minimum = 0;
     progressBar.Maximum = int.Parse(textBoxRunsNumber.Text);
     if (saveResultsFileDialog.ShowDialog() == DialogResult.OK)
     {
         resultFileName = saveResultsFileDialog.FileName;
         if (saveFileDialogTestData.ShowDialog() == DialogResult.OK)
         {
             resultTestFileName = saveFileDialogTestData.FileName;
             Thread st = new Thread(SearchTest);
             st.IsBackground = true;
             st.Start();
         }
     }
 }