Ejemplo n.º 1
0
        private void generate_Click(object sender, EventArgs e)
        {
            int fid = function.SelectedIndex;

            Functions.functionChoice = fid;
            checkBox1.Checked        = false;

            Evolution     gen             = new Evolution(Int32.Parse(population.Text), Int32.Parse(iteration.Text), fid, Double.Parse(min.Text), Double.Parse(max.Text));
            Climb         climb           = new Climb(Int32.Parse(iteration.Text), fid, Double.Parse(min.Text), Double.Parse(max.Text), Double.Parse(cliX.Text), Double.Parse(delta.Text));
            Harmony       harmony         = new Harmony(Int32.Parse(hsm.Text), Double.Parse(hmcr.Text), Double.Parse(par.Text), Double.Parse(min.Text), Double.Parse(max.Text), Int32.Parse(iteration.Text));
            List <String> genControls     = gen.runGen();
            List <String> climbControls   = climb.run();
            List <String> harmonyControls = harmony.run();

            genMin.Text  = genControls[0];
            genIter.Text = genControls[1];
            genX.Text    = genControls[2];
            genY.Text    = genControls[3];

            climbMin.Text  = climbControls[0];
            climbIter.Text = climbControls[1];
            climbX.Text    = climbControls[2];
            climbY.Text    = climbControls[3];

            harX.Text   = harmonyControls[0];
            harY.Text   = harmonyControls[1];
            harMin.Text = harmonyControls[2];

            checkBox1.Checked = true;
        }
Ejemplo n.º 2
0
 //
 public EvSegment(double min, double max)
 {
     x1 = Evolution.RandomFrom(min, max);
     x2 = Evolution.RandomFrom(min, max);
 }