示例#1
0
文件: Form1.cs 项目: kaskanoidas/MOAL
 // Genetic algorithm
 private void button3_Click(object sender, EventArgs e)
 {
     BackgroundWorker Work_Thread = new BackgroundWorker();
     Work_Thread.DoWork += new DoWorkEventHandler(delegate(object sender2, DoWorkEventArgs e2)
     {
         Genetic_Algorithm GA = new Genetic_Algorithm();
         e2.Result = GA.Genetic_Algorithm_Start(task, new List<Solution>() { }, 1);
     });
     Work_Thread.RunWorkerCompleted += new RunWorkerCompletedEventHandler(delegate(object sender3, RunWorkerCompletedEventArgs e3)
     {
         Create_Form("Genetic algorithm", (string)e3.Result);
     });
     Work_Thread.RunWorkerAsync();
 }
示例#2
0
文件: Form1.cs 项目: kaskanoidas/MOAL
        // Genetic algorithm
        private void button3_Click(object sender, EventArgs e)
        {
            BackgroundWorker Work_Thread = new BackgroundWorker();

            Work_Thread.DoWork += new DoWorkEventHandler(delegate(object sender2, DoWorkEventArgs e2)
            {
                Genetic_Algorithm GA = new Genetic_Algorithm();
                e2.Result            = GA.Genetic_Algorithm_Start(task, new List <Solution>()
                {
                }, 1);
            });
            Work_Thread.RunWorkerCompleted += new RunWorkerCompletedEventHandler(delegate(object sender3, RunWorkerCompletedEventArgs e3)
            {
                Create_Form("Genetic algorithm", (string)e3.Result);
            });
            Work_Thread.RunWorkerAsync();
        }
示例#3
0
文件: Form1.cs 项目: kaskanoidas/MOAL
        // Linking Simplex and Genetic algorithms
        private void button4_Click(object sender, EventArgs e)
        {
            BackgroundWorker Work_Thread = new BackgroundWorker();

            Work_Thread.DoWork += new DoWorkEventHandler(delegate(object sender2, DoWorkEventArgs e2)
            {
                Optimized_Simplex_Algorithm OSA          = new Optimized_Simplex_Algorithm();
                Tuple <string, List <Solution> > Results = OSA.Optimized_Simplex_Algorithm_Start(task, 1);
                Genetic_Algorithm GA = new Genetic_Algorithm();
                e2.Result            = GA.Genetic_Algorithm_Start(task, new List <Solution>(Results.Item2), 1);
            });
            Work_Thread.RunWorkerCompleted += new RunWorkerCompletedEventHandler(delegate(object sender3, RunWorkerCompletedEventArgs e3)
            {
                Create_Form("Linking Simplex and Genetic algorithms", (string)e3.Result);
            });
            Work_Thread.RunWorkerAsync();
        }
示例#4
0
文件: Form1.cs 项目: kaskanoidas/MOAL
 // Linking Simplex and Genetic algorithms
 private void button4_Click(object sender, EventArgs e)
 {
     BackgroundWorker Work_Thread = new BackgroundWorker();
     Work_Thread.DoWork += new DoWorkEventHandler(delegate(object sender2, DoWorkEventArgs e2)
     {
         Optimized_Simplex_Algorithm OSA = new Optimized_Simplex_Algorithm();
         Tuple<string, List<Solution>> Results = OSA.Optimized_Simplex_Algorithm_Start(task, 1);
         Genetic_Algorithm GA = new Genetic_Algorithm();
         e2.Result = GA.Genetic_Algorithm_Start(task, new List<Solution>(Results.Item2), 1);
     });
     Work_Thread.RunWorkerCompleted += new RunWorkerCompletedEventHandler(delegate(object sender3, RunWorkerCompletedEventArgs e3)
     {
         Create_Form("Linking Simplex and Genetic algorithms", (string)e3.Result);
     });
     Work_Thread.RunWorkerAsync();
 }