/// <summary> /// Wznawianie Algorytmu Genetycznego /// </summary> private void ResumeGA() { RunGA(() => { m_ga.Population.MinSize = Convert.ToInt32(PopulationMinUpDown.Value); m_ga.Population.MaxSize = Convert.ToInt32(PopulationMaxUpDown.Value); m_ga.Selection = m_selection; m_ga.Crossover = m_crossover; m_ga.Mutation = m_mutation; float[] globalmin = new float[testnumber]; double wynik = 0; double bestresult = 0; double worstresult = 0; double percentsucess = 0; double tmpbest = 0; double tmpworst = 0; //m_ga.CrossoverProbability = Convert.ToSingle(hslCrossoverProbability.Value); m_ga.MutationProbability = Convert.ToSingle(MutationProbTrackbar.Value); m_ga.Reinsertion = m_reinsertion; m_ga.Termination = m_termination; richTextAlGenet.AppendText("Średnie wartości funkci: " + wynik / testnumber + "\n" + "\n"); richTextAlGenet.AppendText("Najlepsza wartość funkcji: " + bestresult + "\n" + "\n"); richTextAlGenet.AppendText("Najgorsza wartość funkcji: " + worstresult + "\n" + "\n"); richTextAlGenet.AppendText("Procent sukcesu: " + percentsucess / testnumber * 100 + "%" + "\n" + "\n"); m_ga.Resume(); }); }