示例#1
0
        public void GeneticAlgorithmOptimization(List <InitialFrequencyPoints> ResonantPeak)
        {
            List <Mode> VLoopModes = new List <Mode>();

            CreateModes(VLoopModes);

            GeneticAlgorithm.Range Mass_range = new GeneticAlgorithm.Range {
                MinValue = 0.001, MaxValue = 1
            };
            GeneticAlgorithm.Range Zeta_range = new GeneticAlgorithm.Range {
                MinValue = 0.01, MaxValue = 0.5
            };

            List <GeneticAlgorithm.Range> FrequencyRange = new List <GeneticAlgorithm.Range>();

            for (int i = 0; i < ResonantPeak.Count; i++)
            {
                FrequencyRange.Add(ResonantPeak[i].FrequencyRage);
            }

            FittingOPT = new FittingOptimization(Mass_range, Zeta_range, FrequencyRange);

            FittingOPT.SetOptimizationParameters(100, 1, 0.9, 50, 500);

            FittingOPT.SetReference(VClose_ref, VR, VLoopModes);

            VLoopModes = new List <Mode>();
            VLoopModes = FittingOPT.Solve();

            //Create Structure Nature Modes Object

            VR.VLoopModes = VLoopModes;

            //Evaluation
            FRF[] Close = VR.SolveCloseLoopResponse();
            //FRF[] Open = VR.SolveOpenLoopResponse();

            // draw simulated FRF in chart
            DrawLine(Close, 1);
        }
示例#2
0
        private void GeneticAlgorithmOptimization(List <FormMain.InitialFrequencyPoints> ResonantPeak)
        {
            List <Mode> VLoopModes = new List <Mode>();

            FormMain.CreateModes(VLoopModes);

            GeneticAlgorithm.Range Mass_range = new GeneticAlgorithm.Range {
                MinValue = FormMain.TryToDouble(textBoxMassMin.Text), MaxValue = FormMain.TryToDouble(textBoxMassMax.Text)
            };
            GeneticAlgorithm.Range Zeta_range = new GeneticAlgorithm.Range {
                MinValue = FormMain.TryToDouble(textBoxZetaMin.Text), MaxValue = FormMain.TryToDouble(textBoxZetaMax.Text)
            };

            List <GeneticAlgorithm.Range> FrequencyRange = new List <GeneticAlgorithm.Range>();

            for (int i = 0; i < ResonantPeak.Count; i++)
            {
                FrequencyRange.Add(ResonantPeak[i].FrequencyRage);
            }

            FittingOPT = new FormMain.FittingOptimization(Mass_range, Zeta_range, FrequencyRange);

            FittingOPT.SetOptimizationParameters((int)FormMain.TryToDouble(textBoxPop.Text), FormMain.TryToDouble(textBoxPCross.Text), FormMain.TryToDouble(textBoxPMutation.Text), (int)FormMain.TryToDouble(textBoxGen.Text), 500);

            FittingOPT.SetReference(VClose_ref, VR, VLoopModes);

            VLoopModes = new List <Mode>();
            VLoopModes = FittingOPT.Solve();

            //Create Structure Nature Modes Object

            VR.VLoopModes = VLoopModes;

            //Evaluation
            FRF[] Close = VR.SolveCloseLoopResponse();
            //FRF[] Open = VR.SolveOpenLoopResponse();

            // draw simulated FRF in chart
            FormMain.DrawLine(Close, 1, chart_mag, chart_phs);
        }
示例#3
0
 public FittingOptimization(GeneticAlgorithm.Range mass_range, GeneticAlgorithm.Range zeta_range, List <GeneticAlgorithm.Range> frequencyRange)
 {
     Mass_range     = mass_range;
     Zeta_range     = zeta_range;
     FrequencyRange = frequencyRange;
 }