Beispiel #1
0
        public Form1()
        {
            InitializeComponent();

            beesUpDown.Value       = BeesAlgorithm.getBees();
            bestUpDown.Value       = BeesAlgorithm.getBest();
            eliteUpDown.Value      = BeesAlgorithm.getElite();
            iterationsUpDown.Value = BeesAlgorithm.getIterations();
            bestNeiUpDown.Value    = BeesAlgorithm.getBestNeighbourhood();
            eliteNeiUpDown.Value   = BeesAlgorithm.getEliteNeighbourhood();
            seedCheck.Checked      = BeesAlgorithm.getSeedSaving();

            beesUpDown.Minimum  = bestUpDown.Value;
            bestUpDown.Maximum  = beesUpDown.Value;
            bestUpDown.Minimum  = eliteUpDown.Value;
            eliteUpDown.Maximum = bestUpDown.Value;

            bestNeiUpDown.Maximum  = eliteNeiUpDown.Value;
            eliteNeiUpDown.Minimum = bestNeiUpDown.Value;


            chart1.Series.Clear();

            callbacks = new CallbackFields(firstLabel, finalLabel, improvementLabel, referenceLabel, errorLabel, chart1);
        }
Beispiel #2
0
 private void seedCheck_CheckedChanged(object sender, EventArgs e)
 {
     BeesAlgorithm.setSeedSaving(seedCheck.Checked);
 }
Beispiel #3
0
 private void eliteNeiUpDown_ValueChanged(object sender, EventArgs e)
 {
     bestNeiUpDown.Maximum = eliteNeiUpDown.Value;
     BeesAlgorithm.setEliteNeighbourhood(Convert.ToInt32(eliteNeiUpDown.Value));
 }
Beispiel #4
0
 private void iterationsUpDown_ValueChanged(object sender, EventArgs e)
 {
     BeesAlgorithm.setIterations(Convert.ToInt32(iterationsUpDown.Value));
 }
Beispiel #5
0
 private void eliteUpDown_ValueChanged(object sender, EventArgs e)
 {
     bestUpDown.Minimum = eliteUpDown.Value;
     BeesAlgorithm.setElite(Convert.ToInt32(eliteUpDown.Value));
 }
Beispiel #6
0
 private void bestUpDown_ValueChanged(object sender, EventArgs e)
 {
     beesUpDown.Minimum  = bestUpDown.Value;
     eliteUpDown.Maximum = bestUpDown.Value;
     BeesAlgorithm.setBest(Convert.ToInt32(bestUpDown.Value));
 }
Beispiel #7
0
 private void button1_Click(object sender, EventArgs e)
 {
     BeesAlgorithm.perform(callbacks);
 }