Beispiel #1
0
        static Global()
        {
            Random      = new Random();
            _classCount = StaticSQLiteHelper.GetClassCount();
            //------------------------------设置运行参数-----------------------------------
            //运行参数

            PopulationSize = 50;                                      //种群规模

            TotalFitness = PopulationSize * (PopulationSize + 1) / 2; //种群的总适应度之和.

            TotalEvolveTime = 1000;                                   //进化的总代数,进化到这么多代后退出

            MutateRate = 60;                                          //变异概率

            CrossRate = 10;                                           //交叉概率

            //--------------------------运行参数设置,请勿随意设置--------------------------------

            DayPerWeek = 6;                //每周上课的天数

            LessonPerDay = 7;              //每天安排的节数

            LessonPerForenoon = 4;         //上午安排的节数

            NightLessonPerDay = 3;         //晚自习安排的节数

            //-------------------------------------------------------------------------------------
            if (!_empty)
            {
                LoadGradTeachers();                 //加载全年级教师信息
                LoadGradeSubjectSetting();          //加载全年级的课程设置要求
                LoadGradeClassMaster();             //加载全年级的班主任列表
                _dirty = false;
            }
        }