コード例 #1
0
ファイル: SimulatorTest.cs プロジェクト: TobiasEh/Uni
        public async Task testSimulatorBothPlugsRushhour()
        {
            Simulator sim = new Simulator()
            {
                exScenario = executedScenario3b
            };

            printDetailedBookingList(executedScenario3b.generatedBookings, 0);
            await sim.run();

            Console.WriteLine("");
            printDetailedBookingList(executedScenario3b.location.schedule.bookings, 0);
            printWorkload(executedScenario3b);
            Console.WriteLine("FullfilledRequests:");
            Console.WriteLine(executedScenario3b.getFulfilledRequests());
            validateResults((Location)executedScenario3b.location, 0);
        }
コード例 #2
0
ファイル: SimulatorTest.cs プロジェクト: TobiasEh/Uni
        private static void printWorkload(ExecutedScenario executedScenario)
        {
            Console.WriteLine("FullfilledRequests:");
            Console.WriteLine(executedScenario.getFulfilledRequests());
            Console.WriteLine("LocationWorkload: \t Count:" + executedScenario.getLocationWorkload().Count);
            foreach (double item in executedScenario.getLocationWorkload())
            {
                Console.WriteLine(item);
            }

            Console.WriteLine("StationWorkload: \t CountLists:" + executedScenario.getStationWorkload().Count);
            Console.WriteLine("StationWorkloads:");
            foreach (List <double> list in executedScenario.getStationWorkload())
            {
                Console.WriteLine("NewStation:");
                foreach (double item in executedScenario.getLocationWorkload())
                {
                    Console.WriteLine(item);
                }
            }
        }