示例#1
0
 private void button5_Click(object sender, EventArgs e)
 {
     for (int i = 2; i <= 10; i++)
     {
         DropGenerator dg = new DropGenerator(i.ToString(), 10000);
         dg.SetPWindow(1.0, 3.5, 0.1);
         dg.Threads = 8;
         dg.Dir = "Fast ATest/" + i.ToString();
         dg.Run();
         while (!dg.Completed) Thread.Sleep(1000);
     }
 }
示例#2
0
 private void button3_Click(object sender, EventArgs e)
 {
     for (int i = 4; i <= 15; i++)
     {
         string sig = String.Format("{0:0}", Math.Floor((double)i / 2)) + "," + String.Format("{0:0}", Math.Ceiling((double)i / 2));
         DropGenerator dg = new DropGenerator(sig, 10000);
         dg.SetPWindow(1.0, 3.5, 0.1);
         dg.Threads = 8;
         dg.Dir = "Fast 2ATest/" + sig;
         dg.Run();
         while (!dg.Completed) Thread.Sleep(1000);
     }
 }
示例#3
0
        private void NarrowWindow(string Dir, string sig)
        {
            string dir = Dir + "\\" + sig;
            List<decimal> P = new List<decimal>();
            List<decimal> Value = new List<decimal>();
            string[] analysis = File.ReadAllLines(dir + "/analyzed.txt");
            foreach (string line in analysis)
            {
                P.Add(Convert.ToDecimal(line.Split(':')[0]));
                Value.Add(Convert.ToDecimal(line.Split(':')[1].Split('|')[0].Trim()));
            }

            decimal Step = P[1] - P[0];
            decimal Max = Value.Max();
            decimal PMid = P[Value.IndexOf(Max)];

            decimal PMin = PMid - Step;
            decimal PMax = PMid + Step;
            decimal PStep = Step / 10;

            DropGenerator dg = new DropGenerator(sig, 100);
            dg.SetPWindow(PMin, PMax, PStep);
            dg.Threads = 8;
            dg.Dir = Dir + " 0.01/" + sig;
            dg.Run();
            while (!dg.Completed) Thread.Sleep(1000);
        }
示例#4
0
 private void RunSignature(string signature, string dir)
 {
     DropGenerator dg = new DropGenerator(signature, 100);
     dg.SetPWindow(1.0m, 3.5m, 0.1m);
     dg.SetPWindow(1.0m, 3.5m, 0.1m);
     dg.Threads = 8;
     dg.Dir = dir + "/" + signature;
     dg.Run();
     while (!dg.Completed) Thread.Sleep(1000);
 }
示例#5
0
        private void NarrowWindow(string Dir)
        {
            string[] dirs = Directory.GetDirectories(Dir);
            foreach (string dir in dirs)
            {
                string[] fn = dir.Split('\\');
                string Signature = fn[fn.Length - 1];

                List<decimal> P = new List<decimal>();
                List<decimal> Value = new List<decimal>();
                string[] analysis = File.ReadAllLines(dir + "/analyzed.txt");
                foreach (string line in analysis)
                {
                    P.Add(Convert.ToDecimal(line.Split(':')[0]));
                    Value.Add(Convert.ToDecimal(line.Split(':')[1].Split('|')[0].Trim()));
                }

                decimal Step = P[1] - P[0];
                decimal Max = Value.Max();
                decimal PMid = P[Value.IndexOf(Max)];

                decimal PMin = PMid - Step;
                decimal PMax = PMid + Step;
                decimal PStep = Step / 10;

                DropGenerator dg = new DropGenerator(Signature, 100);
                dg.SetPWindow(PMin, PMax, PStep);
                dg.Threads = 8;
                dg.Dir = Dir + " 0.01/" + Signature;
                dg.Run();
                while (!dg.Completed) Thread.Sleep(1000);
            }
        }