示例#1
0
        //------------------------------------------------------------------------------
        //
        // creates schedule by looping through all the major courses
        //
        //------------------------------------------------------------------------------
        public List <Machine> CreateSchedule()
        {
            List <Job> majorCourses = myPlan.GetList(0);

            for (int i = 0; i < majorCourses.Count; i++)
            {
                Job job = majorCourses[i];
                ScheduleCourse(job);
            }
            finalPlan = GetBusyMachines();
            return(finalPlan);
        }
示例#2
0
        //------------------------------------------------------------------------------
        //
        // creates schedule by looping through all the major courses
        //
        //------------------------------------------------------------------------------
        public List <Machine> CreateSchedule()
        {
            List <Job> majorCourses = myPlan.GetList(0); //LIST OF REQUIRED COURSES

            for (int i = 0; i < majorCourses.Count; i++)
            {
                Job job = majorCourses[i]; //GET NEXT CLASS IN LIST
                ScheduleCourse(job);       //FUNCTION CALL TO SCHEDULE LIST
            }
            finalPlan = GetBusyMachines(); //SUGGEST BETTER NAMING CONVENTION?//
            //return proposed schedule
            return(finalPlan);
        }
        //------------------------------------------------------------------------------
        // Creates a Schedule based on the required courses that need to be scheduled
        // (given by the function, InitDegreePlan().
        //
        // SPECIAL NOTE: This is most likely the entry point for where we would need
        //               to implement electives or optional courses should we need to
        //               implement those.
        //
        // Afterwards, this course returns the resulting schedule.
        //------------------------------------------------------------------------------
        public Schedule CreateSchedule(bool preferShortest)
        {
            List <Job> majorCourses = myPlan.GetList(0); //LIST OF REQUIRED COURSES

            for (int i = 0; i < majorCourses.Count; i++)
            {
                Job job = majorCourses[i];           //GET NEXT CLASS IN LIST
                ScheduleCourse(job, preferShortest); //FUNCTION CALL TO SCHEDULE LIST
            }
            finalPlan = GetBusyMachines();           //SUGGEST BETTER NAMING CONVENTION?//
            //return proposed schedule
            return(new Schedule()
            {
                Courses = this.finalPlan,
                SchedulerName = nameof(JobShopScheduler)
            });
        }