Exemplo n.º 1
0
        private void cbStopType_Selected(object sender, RoutedEventArgs e)
        {
            object Parsed = Enum.Parse(typeof(StoppingType), cbStopType.SelectedItem.ToString(), true);

            if (Parsed != null)
            {
                StopType = (StoppingType)Parsed;
            }
        }
Exemplo n.º 2
0
 public MainWindow()
 {
     InitializeComponent();
     NA     = 25;
     userC  = 50;
     method = 0;
     // Stopping
     stoppingType = StoppingType.GenerationNumber;
     ng           = 25;
     nev          = 25000;
     Ftr          = 0.00001;
     //clonal generation params
     beta   = 0.5;
     ro     = 0.5;
     d      = NA / 5;
     cgn    = NA / 3;
     cglssr = 0.005;
     cgln   = 5;
     // Firework params
     m    = 50;
     a    = 0.04;
     b    = 0.8;
     Amax = 40;
     mhat = NA;
     // Particle swarm params
     c0 = 0.8;
     cp = 0.2;
     cg = 0.2;
     // Genetic algorithm params
     P              = NA / 2;
     pm             = 0.6;
     crossoverCount = NA;
     // Bee algorithm params
     ExBeeCount = 10;
     MaxStep    = 5;
     // Bacterial algorithm params
     Infections  = 5;
     ClonesCount = 15;
     // Differential Evolution params
     weighf = 1.8;
     crossf = 0.9;
     // Haromony Search params
     consid_rate  = 0.95;
     adjust_rate  = 0.7;
     range        = 0.5;
     tbUserC.Text = this.userC.ToString();
 }
Exemplo n.º 3
0
        public OptimizerWindow()
        {
            InitializeComponent();

            // Number of antibodies.
            NA       = 20;
            MethodId = 0;
            // Stopping
            StopType               = StoppingType.GenerationNumber;
            StopGenerationNumber   = 100;
            StopAffinityEvaluation = 2500;
            StopFitnessTreshold    = 0.0001;
            //clonal generation params
            beta   = 0.5;
            ro     = 0.5;
            d      = NA / 5;
            cgn    = NA / 3;
            cglssr = 0.005;
            cgln   = 5;
            // Firework params
            m    = 50;
            a    = 0.04;
            b    = 0.8;
            Amax = 40;
            mhat = NA;
            // Particle swarm parrams
            c0 = 0.8;
            cp = 0.2;
            cg = 0.2;
            // Genetic algorithm params
            P              = NA / 2;
            pm             = 0.6;
            crossoverCount = NA;

            RadioBaseRatio.IsChecked = true;
            CheckOutput.IsChecked    = true;
            cbiFirework.IsSelected   = true;
            tbParamN.Text            = NA.ToString();

            cbStopType.ItemsSource   = Enum.GetValues(typeof(StoppingType));
            cbStopType.SelectedIndex = (int)StopType;
            tbStopGen.Text           = StopGenerationNumber.ToString();
            tbStopEval.Text          = StopAffinityEvaluation.ToString();
            tbStopFt.Text            = StopFitnessTreshold.ToString();
        }
Exemplo n.º 4
0
 private void miTreshold_Click(object sender, RoutedEventArgs e)
 {
     UncheckStoppingType();
     stoppingType         = StoppingType.PerformanceTreshold;
     miTreshold.IsChecked = true;
 }
Exemplo n.º 5
0
 private void miEvaluation_Click(object sender, RoutedEventArgs e)
 {
     UncheckStoppingType();
     stoppingType           = StoppingType.EvaluationNumber;
     miEvaluation.IsChecked = true;
 }
Exemplo n.º 6
0
 public MainWindow()
 {
     InitializeComponent();
     openParams = 0;
     // Lower and upper bounds for the parameters.
     lbp = new ArrayList {
         -100.0, -100.0
     };
     ubp = new ArrayList {
         100.0, 100.0
     };
     // Initial values of the parameters to be optimized.
     InitialParameters = new ArrayList {
         90.0, 90.0
     };
     // Define whether the seeked values should be restricted to integers (true) or not (false).
     Integer = new bool[] { false, false };
     //Create optimizer object.
     // Number of antibodies.
     NA         = 50;
     method     = 0;
     Slow       = false;
     Preview    = false;
     uniqueTest = false;
     // Stopping
     stoppingType = StoppingType.EvaluationNumber;
     ng           = 100;
     nev          = 50000;
     Ftr          = 0.00001;
     // Fitness function
     ffd = FitnessFunctionParabola;
     //clonal generation params
     beta   = 0.5;
     ro     = 0.5;
     d      = NA / 5;
     cgn    = NA / 3;
     cglssr = 0.005;
     cgln   = 5;
     // Firework params
     m    = 50;
     a    = 0.04;
     b    = 0.8;
     Amax = 40;
     mhat = NA;
     // Particle swarm params
     c0 = 0.8;
     cp = 0.2;
     cg = 0.2;
     // Genetic algorithm params
     P              = NA / 2;
     pm             = 0.6;
     crossoverCount = NA;
     // Bee algorithm params
     ExBeeCount = 10;
     MaxStep    = 5;
     // Bacterial algorithm params
     Infections  = 10;
     ClonesCount = 25;
     // Differential Evolution params
     weighf = 1.8;
     crossf = 0.9;
     // Haromony Search params
     consid_rate = 0.95;
     adjust_rate = 0.7;
     range       = 0.05;
 }