Example #1
0
        public void runSimulator()
        {
            Console.WriteLine("Setting up Wii and Woi");
            WorldInputInterface wii = new SimulatorInputInterface(os);
            WorldOutputInterface woi = new SimulatorOutputInterface(os);

            // Here we need to check for os.Algo type!!!!
            if (os.Algo.name == "DFS")
            {
                DFSExperiment exp = new DFSExperiment(wii, woi);
                exp.SetupExperiment();
                exp.RunExperiment();
            }
            else if (os.Algo.name == "RandomWalk")
            {
                RandomWalkExperiment exp = new RandomWalkExperiment(wii, woi);
                exp.SetupExperiment();
                exp.RunExperiment();
            }
            else if (os.Algo.name == "NodeCounting")
            {
                NodeCountingExperiment exp = new NodeCountingExperiment(wii, woi);
                exp.SetupExperiment();
                exp.RunExperiment();
            }

            //exp.SetupExperiment();
            //exp.RunExperiment();
        }
Example #2
0
        public static void Run(String experimentType)
        {
            //Process roboRealmProcess = Process.Start("C:\\Documents and Settings\\cs266\\Desktop\\FINAL FIXED RoboRealm\\RoboRealm.exe");
               // System.Threading.Thread.Sleep(2000);

            //Check the type of experiment and create that experiment object
            if (experimentType == "WalkStraight")
            {
                Console.WriteLine("Setting up Wii and Woi");
                WorldInputInterface wii = new VisionInputInterface();
                WorldOutputInterface woi = new RadioOutputInterface();

                WalkStraightExperiment exp = new WalkStraightExperiment(wii, woi);
                exp.SetupExperiment();
                exp.RunExperiment();
            }
            else if (experimentType == "RandomWalk")
            {
                Console.WriteLine("Setting up Wii and Woi");
                WorldInputInterface wii = new VisionInputInterface();
                WorldOutputInterface woi = new RadioOutputInterface();

                RandomWalkExperiment exp = new RandomWalkExperiment(wii, woi);
                exp.SetupExperiment();
                exp.RunExperiment();
            }
            else if (experimentType == "NodeCounting")
            {
                Console.WriteLine("Setting up Wii and Woi");
                WorldInputInterface wii = new VisionInputInterface();
                WorldOutputInterface woi = new RadioOutputInterface();

                NodeCountingExperiment exp = new NodeCountingExperiment(wii, woi);
                exp.SetupExperiment();
                exp.RunExperiment();
            }

            //roboRealmProcess.Close();
        }