Example #1
0
        static void Run(string fileName, int repeats, int frequency, string outputPath,
                        bool repAll, bool matchAll, bool ageAll, bool lrnThrshAll, bool accAll,
                        bool chanForAll, bool chanInvAll)
        {
            Stopwatch Local = new Stopwatch();

            Local.Start();
            //Get Parameters and run appropriate Simulation
            SimParams Par = new SimParams(reload: true, path: fileName);
            WriteData Temp;
            WriteData Full = Simulations.Interval(Par, frequency, repAll,
                                                  matchAll, ageAll, lrnThrshAll, accAll, chanForAll, chanInvAll);

            for (int j = 1; j < repeats; j++)
            {
                Temp = Simulations.Interval(Par, frequency, repAll,
                                            matchAll, ageAll, lrnThrshAll, accAll, chanForAll, chanInvAll);
                Full.ConCat(Par, Temp);
            }

            //Save data
            string Tag = Utils.GetTag(fileName);

            Full.Output(Par, outputPath, Tag, true);
            Console.WriteLine("{0}-{1}", fileName, Local.ElapsedMilliseconds);
        }
Example #2
0
        static void Run(string fileName, int repeats, int frequency, string outputPath,
                        bool repAll, bool matchAll, bool ageAll, bool lrnThrshAll, bool accAll,
                        bool chanForAll, bool chanInvAll)
        {
            Stopwatch Local = new Stopwatch();

            Local.Start();
            Console.WriteLine("Begin-{0}", fileName);
            //Get Parameters and run appropriate Simulation
            SimParams Par  = new SimParams(reload: true, path: fileName);
            WriteData Full = new WriteData();
            WriteData Temp;
            int       Success = 0;

            while (Success == 0)
            {
                try{
                    Full = Simulations.Interval(Par, frequency, repAll,
                                                matchAll, ageAll, lrnThrshAll, accAll, chanForAll, chanInvAll);
                    Success += 1;
                }catch { Console.WriteLine("Fail-{0}, {1}", fileName, Success); }
            }
            while (Success < repeats)
            {
                try{
                    Temp = Simulations.Interval(Par, frequency, repAll,
                                                matchAll, ageAll, lrnThrshAll, accAll, chanForAll, chanInvAll);
                    Full.ConCat(Par, Temp);
                    Success += 1;
                }catch { Console.WriteLine("Fail-{0}, {1}", fileName, Success); }
            }

            //Save data
            string Tag = Utils.GetTag(fileName);

            Full.Output(Par, outputPath, Tag, true);
            Console.WriteLine("{0}-{1}", fileName, Local.ElapsedMilliseconds);
        }