Research Article
[Retracted] Dynamic Early Warning Method of Multiclassification Financial Crisis of Listed Companies Based on Particle Swarm Optimization
Code 1
Public void particle swarm optimization (TextBox textbox, panel p, int n).
{ | List<List<double>> w = new List<List<double>>(); | Random r = new Random(); | u= new List<double>(); | For (int i =0; i < n; i++) { | double t = r.NextDouble() -0.5; | w.Add(new List<double>() {-2 t, -3 t, r.Next(1000) | t}); } | double z =0.18; | double step =0.2; | List<double> f = new List<double>(); | L = new List<List<double>>(); | G = new List<double>(); | l = new List<double>(); | g =20; | … | for (int i =0; i < w.Count; i++){ | w[i] = Particle swarm iterates over a particle(w[i], G, L[i], | step); | f[i] = Seeking fitness(w[i], w[i], w[i]); } | j = test(f, z); | draw(textbox, p, x, w, j); | Thread.Sleep(50); | count++; | } | } |
|