public void RunOneSimulation() { foreach (String assignerType in Enum.GetNames(typeof(AssignerType))) { List <Home> homes = Util.HomeGenerator.GenerateSimulatedHome(this.Config); //Console.WriteLine("--------------------{0}------------------", assignerType); sim = new Simulator(Config, homes, assignerType); sim.Simulate(1, 1); //write simulation results into file //Note that the simulation result output file "reputationlist" will be the file for plotting figures SimulationResultProcess.ProcessReputationCurveResult(homes, Config.ReputationCurveSimulationOutputPath + assignerType); } }
public void runOneSimulation() { //generate home this.Homes = Util.HomeGenerator.GenerateHome(this.Config); HiResTimer timer = new HiResTimer(); //run different algorithms foreach (String assignerType in Enum.GetNames(typeof(AssignerType))) { List <Home> homes = CloneHomes(this.Homes); //Console.WriteLine("--------------------{0}------------------", assignerType); Simulator = new Simulator(Config, homes, assignerType); timer.ReStart(); Simulator.Simulate(0, Config.TotalTimeSlot - 1); double elapseTime = timer.TimeElapseInTenthsOfMilliseconds; //write simulation results into file SimulationResultProcess.ProcessHomeResult(homes, Config.SimulationOutputPath + assignerType, elapseTime); } }