Ejemplo n.º 1
0
        public static void Run(Options options)
        {
            int[] slotIndeces = null;
            if (options.allSlots == true)
            {
                slotIndeces = Endo.slotIndeces[options.moduleSize];
            }
            else
            {
                slotIndeces = new int[] { (int)options.slotIndex };
            }

            foreach (int i in slotIndeces)
            {
                var t = new SimulationSetup(options);
                t.slotIndex = (uint)i;
                t.Initialize();

                string suffix;
                if (options.excludeEndo == true)
                {
                    suffix = options.moduleSize;
                }
                else
                {
                    suffix = i.ToString();
                }

                JobHandler jh = new JobHandler();
                if (options.sarMode)
                {
                    Console.WriteLine("Generating simulation files in '" + Path.Combine(options.outputDirectory, "sar-" + suffix) + "'");
                    t.GenerateSarSimulationInput(Path.Combine(options.outputDirectory, "sar-" + suffix));
                    jh.RunScript(Path.GetFullPath(Path.Combine("sar-" + suffix, "run_sar.cmd")));
                }
                else
                {
                    Console.WriteLine("Generating simulation files in '" + Path.Combine(options.outputDirectory, "dir-" + suffix) + "'");
                    t.GenerateFarFieldSimulationInput(Path.Combine(options.outputDirectory, "dir-" + suffix));
                    jh.RunScript(Path.GetFullPath(Path.Combine("dir-" + suffix, "run_farfield.cmd")));
                }
            }
        }
Ejemplo n.º 2
0
        public static void Run(Options options)
        {
            int[] slotIndeces = null;
            if (options.allSlots == true)
            {
                slotIndeces = Endo.slotIndeces[options.moduleSize];
            }
            else
            {
                slotIndeces = new int[] { (int)options.slotIndex };
            }

            foreach (int i in slotIndeces)
            {
                var t = new SimulationSetup(options);
                t.slotIndex = (uint)i;
                t.Initialize();

                string suffix;
                if (options.excludeEndo == true)
                {
                    suffix = options.moduleSize;
                }
                else
                {
                    suffix = i.ToString();
                }

                JobHandler jh = new JobHandler();
                if (options.sarMode)
                {
                    Console.WriteLine("Generating simulation files in '" + Path.Combine(options.outputDirectory, "sar-" + suffix) + "'");
                    t.GenerateSarSimulationInput(Path.Combine(options.outputDirectory, "sar-" + suffix));
                    jh.RunScript(Path.GetFullPath(Path.Combine("sar-" + suffix, "run_sar.cmd")));
                }
                else
                {
                    Console.WriteLine("Generating simulation files in '" + Path.Combine(options.outputDirectory, "dir-" + suffix) + "'");
                    t.GenerateFarFieldSimulationInput(Path.Combine(options.outputDirectory, "dir-" + suffix));
                    jh.RunScript(Path.GetFullPath(Path.Combine("dir-" + suffix, "run_farfield.cmd")));
                }
            }
        }