Esempio n. 1
0
        public static void test(string filename)
        {
            loadSchedule(filename);

            List <Generation_utils.Multilesson>[] multilessons = new List <Generation_utils.Multilesson> [5 + 1];
            for (int day = 1; day <= 5; day++)
            {
                multilessons[day] = new List <Generation_utils.Multilesson>();
            }

            Generation_utils.ScheduleGenerator4 sg = new Generation_utils.ScheduleGenerator4(groups, teachers, subjects,
                                                                                             higharchy, multilessons, superGroups);

            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();

            sw.Start();
            SchoolManager.ScheduleUtils.WeekSchedule res = sg.gen();

            if (!(res is null))
            {
                res.print();
                res.exportToExcell($"{filename}_myVersion");
            }


            System.Console.WriteLine($"Total ellapsed time = {sw.ElapsedMilliseconds}");
            sw.Stop();
        }
Esempio n. 2
0
        public static void test()
        {
            init();
            List <Group>      groups      = new List <Group>();
            List <SuperGroup> superGroups = new List <SuperGroup>();

            groups.Add(_12b());
            superGroups.Add(_vtoriEzik12BV());

            List <Generation_utils.Multilesson>[] multilessons = new List <Generation_utils.Multilesson> [5 + 1];
            for (int day = 1; day <= 5; day++)
            {
                multilessons[day] = new List <Generation_utils.Multilesson>();
            }
            //multilessons[5].Add(new Multilesson(groups[0], PerformanceTest1.teachers[4], PerformanceTest1.subjects[4], new IntInInterval(2, 2)));
            //multilessons[5].Add(new Multilesson(groups[7], PerformanceTest1.teachers[4], PerformanceTest1.subjects[4], new IntInInterval(2, 2)));
            //multilessons[5].Add(new Multilesson(groups[0], PerformanceTest1.teachers[0], PerformanceTest1.subjects[0], new IntInInterval(1, 2)));
            //multilessons[5].Add(new Multilesson(groups[0], PerformanceTest1.teachers[2], PerformanceTest1.subjects[3], new IntInInterval(1, 1)));
            //multilessons[3].Add(new Multilesson(groups[2], PerformanceTest1.teachers[5], PerformanceTest1.subjects[0], new IntInInterval(2, 3)));

            Generation_utils.ScheduleGenerator4 sg = new Generation_utils.ScheduleGenerator4(groups, teachers, subjects,
                                                                                             higharchy, multilessons, superGroups);//за общи проблеми

            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
            sw.Start();
            sg.gen();
            sw.Stop();

            Console.WriteLine($"Ellapsed total time = {sw.ElapsedMilliseconds}");
        }