CN113435647A - Class-moving, height-controlling and middle-class-arranging method based on evolutionary algorithm - Google Patents
Class-moving, height-controlling and middle-class-arranging method based on evolutionary algorithm Download PDFInfo
- Publication number
- CN113435647A CN113435647A CN202110709194.2A CN202110709194A CN113435647A CN 113435647 A CN113435647 A CN 113435647A CN 202110709194 A CN202110709194 A CN 202110709194A CN 113435647 A CN113435647 A CN 113435647A
- Authority
- CN
- China
- Prior art keywords
- class
- chromosome
- population
- chromosomes
- parent
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 210000000349 chromosome Anatomy 0.000 claims abstract description 120
- 108090000623 proteins and genes Proteins 0.000 claims description 33
- 230000035772 mutation Effects 0.000 claims description 22
- 230000013011 mating Effects 0.000 claims description 15
- 230000003203 everyday effect Effects 0.000 claims description 6
- 230000009286 beneficial effect Effects 0.000 description 2
- 125000004122 cyclic group Chemical group 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003442 weekly effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/12—Computing arrangements based on biological models using genetic models
- G06N3/126—Evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/20—Education
- G06Q50/205—Education administration or guidance
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Strategic Management (AREA)
- Health & Medical Sciences (AREA)
- Theoretical Computer Science (AREA)
- Human Resources & Organizations (AREA)
- Biophysics (AREA)
- Economics (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Physics & Mathematics (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Marketing (AREA)
- Educational Administration (AREA)
- Educational Technology (AREA)
- Evolutionary Biology (AREA)
- General Health & Medical Sciences (AREA)
- Operations Research (AREA)
- Primary Health Care (AREA)
- Quality & Reliability (AREA)
- Entrepreneurship & Innovation (AREA)
- Game Theory and Decision Science (AREA)
- Development Economics (AREA)
- Physiology (AREA)
- Genetics & Genomics (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a class-moving, height-controlling and middle-class-arranging method based on an evolutionary algorithm, which specifically comprises the following steps: constructing a class hour table of high and middle grades as a chromosome of an evolutionary algorithm; setting various hard constraint conditions related to courses, teachers and teachers, and soft constraint conditions which are uniformly distributed during the course connection and class; and (4) based on the constraint conditions, carrying out course arrangement by using an evolutionary algorithm to obtain an optimal course arrangement scheme. Compared with the traditional high school course arrangement method, the high school course arrangement method based on the evolutionary algorithm 'work-by-work' simultaneously considers various constraints of the course, the teacher and the classroom in the middle school, and better meets the actual requirements.
Description
Technical Field
The invention relates to a class-scheduling high-level and medium-level class-scheduling method based on an evolutionary algorithm.
Background
With the new high-school entrance examination reform carried out in each province, the courses taken by students in high school stage are not divided into two courses series of culture and study. Each student needs to select classes meeting the self development according to the self ability level and interest. The teaching mode of the 'class-walking system' means that students can learn in different teaching classes according to the course selection requirements of the students. The "class-walking" mode is in administrative class units, most of the curriculums are in class in administrative class, such as Chinese, mathematics, English, art, music, sports, and meetings, etc., and a part of the curriculums require students to go to other teaching classes for class, such as politics, history, geography, physics, chemistry, biology, etc. Under the teaching mode, the significance of limitations related to course arrangement is increased, and an intelligent and efficient automatic course arrangement method is urgently needed to obtain a reasonable course arrangement scheme.
The course scheduling problem of the 'moving class' aims to combine and optimize teaching resources such as courses, teachers, classrooms and the like so as to arrange a curriculum schedule of each class. Students only need to attend class in administrative classes in the traditional teaching mode, and the situation that students go to class does not exist, so that the class arrangement method corresponding to the class arrangement problem in the traditional teaching mode cannot solve the class arrangement problem of 'going to class'. The existing course arrangement algorithm of 'class-moving system' is usually applied to course arrangement of colleges and universities, and the resources of teachers and classrooms of the existing course arrangement algorithm are far more than those of senior high schools, so the existing course arrangement algorithm does not accord with the actual situation of course arrangement of senior high schools.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a class-moving high school course arrangement method based on an evolutionary algorithm, compared with the traditional high school course arrangement method, the class-moving high school course arrangement method based on the evolutionary algorithm simultaneously considers various constraints of middle school courses, teachers and classrooms in reality, and better meets the actual requirements.
In order to achieve the purpose, the invention adopts the following specific technical scheme:
an evolutionary algorithm-based high-school class scheduling method during shift-taking includes the following steps:
s1, constructing a class hour table of high and middle grades as a chromosome X of the evolutionary algorithm;
s101, gene encoding: setting gene x to represent class time in the course scheduling task, and the specific components of the gene x include but are not limited to course information x1Classroom number x2Whether or not there is lesson sign x3;
S102, constructing a chromosome: constructing a curriculum schedule X taking class of the whole year as a column and class/teaching time period as a row, putting the gene X as an element into the curriculum schedule X, and taking the curriculum schedule X as a chromosome;
s2, setting various hard constraint conditions related to the courses, teachers and teachers, and soft constraint conditions uniformly distributed during the course connection and class;
s3, based on the constraint conditions, using an evolutionary algorithm to arrange lessons to obtain an optimal lesson arrangement scheme;
s301, initializing a parent population with the size of P;
s302, arranging classrooms for the class lists corresponding to the chromosomes and calculating objective function values corresponding to the chromosomes in the parent population;
s303, carrying out selection operation on the parent population to generate a mating pool population;
s304, performing cross operation on the mating pool population to generate a filial generation population, and assuming that two chromosomes are selected to be X from the mating pool population without being replaced1And X2Sequentially reacting X1And X2Mating the corresponding rows, and dividing the chromosomes firstly; then, a random number r is generated every day if r is smaller than the crossover probability pcIs mixing X1And X2Corresponding row of gene x1Mating to generate corresponding rows of offspring chromosomes, otherwise, setting the genes x at the corresponding positions of the offspring chromosomes1Same as the parent; repeating the operation for P/2 times to obtain all the offspring chromosomes to form an offspring population;
s305, performing mutation operations on chromosomes in the offspring population, wherein the mutation operations include administrative shift mutation operations and teaching shift mutation operations;
s306, arranging classrooms for the class lists corresponding to each chromosome and calculating objective function values corresponding to each chromosome in the offspring population;
s307, merging the parent population and the child population, and selecting chromosomes of the P before the target function values are ranked from low to high to form a new parent population;
and S308, repeating the steps S303-307, wherein the chromosome corresponding to the minimum objective function value in the parent population is the optimal course arrangement scheme.
Preferably, the step S301 of initializing a parent population with size P specifically means that
Three elements X contained in the gene X in the chromosome X1、x2、x3Setting as 0, dividing chromosome X into several units, and according to class time condition of class1Assign a value to, and correspondingly assign x3Setting to be 1, repeating the steps until P chromosomes are generated to form an initialized parent population.
Preferably, the step of arranging classrooms for the class schedule corresponding to each chromosome in steps S302 and S306 specifically includes
Scanning ith row of chromosome X, and counting the number n of empty classrooms available for teaching class in the current classi1Then, the number n of class in the current class hour teaching class is countedi2If n isi2>ni1,fi31=ni2-ni1(ii) a If n isi2<ni1Let f i310 and arranges the empty classroom directly to each class to be attended, i.e. X in chromosome X2Assign values, and set
Scanning chromosome X column i, and counting class numbers n of classes not in the classroom of teaching class and the classroom of administration classi3And the number n thereofi4According to ni3Searching for the number of available classroom ni5If n isi4>ni5,fi32=ni4-ni5(ii) a If n isi4<ni5Let f i320 and arranges the empty classroom directly to each class to be attended, i.e. X in chromosome X2Assign values, and set
Scanning ith row of chromosome X, and counting the number n of physical classes in the current classi6If n isi6>Upper limit of number of classes that the operating place can accommodate while attending class, fi33=ni6An upper limit for the number of classes that the operator station can accommodate while attending class; if n isi6<While holding the place of operation, giving lessonsUpper limit of number of classes, order f i330 and directly arrange playground to each class to be attended with a sports class, i.e. X in chromosome X2Assign values, and set
Preferably, the step of calculating the objective function value corresponding to each chromosome in the parent/offspring population in steps S302 and S306 specifically includes
Calculating an objective function value F corresponding to each chromosome in the parent/offspring population, wherein F is F1+f2+f3+f4The number of conflicts contained in the curriculum schedule corresponding to the current chromosome is divided into the number of conflicts f in class of the student1Teacher conflict number f in class2Classroom conflict f3Conflict with continuous class attendance at noon and afternoon f4。
Preferably, the step S303 of performing the selection operation on the parent population to generate the mating pool population specifically means performing a binary tournament method on the parent population to generate a selection set number of chromosomes and compose the mating pool population.
Preferably, the executive mutation operation in step S305 specifically includes
For each row and column corresponding to the executive shift in each chromosome in the offspring population, firstly, the chromosome is divided into a plurality of units, then a random number is generated every day, and if the random number is less than the variation probability of the executive shift, the corresponding gene x of the chromosome is subjected to1Carrying out mutation, otherwise, setting the gene x at the corresponding position of the offspring chromosome1As with the parent.
Preferably, the variation operation in the teaching class in step S305 specifically includes
Generating a random number for the corresponding line of the teaching class in each chromosome in the offspring population, judging whether the random number is less than the variation probability of the teaching class, if so, performing variation, otherwise, setting the gene x of the corresponding position of the offspring chromosome1As with the parent.
Preferably, the administrative class variation probability and the teaching class variation probability are 0.25.
The invention has the beneficial effects that: compared with the traditional high school course arrangement method, the high school course arrangement method based on the class-moving system of the evolutionary algorithm simultaneously considers various constraints of the courses, teachers and classrooms in the middle school, and is more in line with the actual requirements.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a class-moving, height-controlling and middle-class-arranging method based on an evolutionary algorithm;
fig. 2 is a flowchart of step S1;
fig. 3 is a flowchart of step S3;
FIG. 4 is a chromosome crossing process;
FIG. 5 is an executive variation process;
FIG. 6 is a variation process for a teaching class.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Other embodiments, which can be derived by one of ordinary skill in the art from the embodiments given herein without any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "vertical", "upper", "lower", "horizontal", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience of describing the present invention and simplifying the description, but do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention.
In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly and may, for example, be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
As shown in fig. 1-3, the present invention provides a class-scheduling method based on an evolutionary algorithm, which specifically includes the following steps:
s1, constructing a two-dimensional (class-time) class-hour table of high and middle grades as a chromosome X of the evolutionary algorithm;
s101, gene encoding: setting gene x to represent class time in the course scheduling task, and the specific components of the gene x include but are not limited to course information x1(course number, teacher name), classroom number x2Whether or not there is lesson sign x3;
S102, constructing a chromosome: constructing a curriculum schedule X taking class of the whole year as a column and class/teaching time period as a row, putting the gene X as an element into the curriculum schedule X, and taking the curriculum schedule X as a chromosome; as shown in table 1, where u is the number of administrative classes, v is the number of teaching classes, M is the number of classes per day, and N is the number of days per week.
TABLE 1 representation of a chromosome
S2, setting various hard constraint conditions related to the courses, teachers and teachers, and soft constraint conditions uniformly distributed during the course connection and class;
s3, based on the constraint conditions, using an evolutionary algorithm to arrange lessons to obtain an optimal lesson arrangement scheme;
s301, initializing a parent population with the size of P; in this embodiment, the population size P is set to 100.
Initializing a parent population with the size P comprises the following steps: for a two-dimensional chromosome X, the gene X in X comprises three elements X1、x2、x3Is set to 0. Dividing the chromosome into M301A number of portions, each portion having N301And (4) columns. I.e. corresponding to M on a weekly basis301Class, N in each day301Lessons are saved. For each class, the corresponding class number is from 1 to M according to the class time situation of the class301The cycle sequence to 1 is given to M301X corresponding to random empty class time of each part1And whether there is lesson sign X corresponding to X is juxtaposed3Is 1. For example: on 5 days a week, 9 lessons are given every day, and 20 lessons are given for 1 class of administration, namely 4 sections of single-class Chinese, 1 section of second-class Chinese, 4 sections of single-class mathematics, 1 section of second-class mathematics, 5 sections of English and 3 sections of physics. Firstly, randomly putting two-in-one classes into the empty class in the corresponding days according to the cyclic sequence from Monday to Friday to Monday (for example, putting the Tuesday-in-two classes into the third four sections of Monday, putting the mathematics-in-two classes into the second two sections of Tuesday) and then randomly putting the single-in-one classes into the empty class in the corresponding days according to the cyclic sequence from Monday to Friday to Monday (for example, putting the Chinese-in-one classes into the first section of Monday, the fifth section of Tuesday, the sixth section of Wednesday, the seventh section of Thursday, and the mathematics-in-one classes into the first section of Friday, the second section of Monday, the sixth section of Tuesday, the seventh section of Wednesday, and the like). The generation of P chromosomes, which constitute the initialized parent population, is repeated as described above.
S302, arranging classrooms for the class lists corresponding to the chromosomes and calculating objective function values corresponding to the chromosomes in the parent population;
the classroom arrangement steps for the class schedule corresponding to each chromosome are as follows:
scanning ith row of chromosome X, and counting the number n of empty classrooms available for teaching class in the current classi1Then, the number n of class in the current class hour teaching class is countedi2If n isi2>ni1,fi31=ni2-ni1(ii) a If n isi2<ni1Let fi310 and arranges the empty classroom directly to each class to be attended, i.e. X in chromosome X2Assign values, and set
Scanning chromosome X column i, and counting class numbers n of classes not in the classroom of teaching class and the classroom of administration classi3And the number n thereofi4According to ni3Searching for the number of available classroom ni5If n isi4>ni5,fi32=ni4-ni5(ii) a If n isi4<ni5Let fi320 and arranges the empty classroom directly to each class to be attended, i.e. X in chromosome X2Assign values, and set
Scanning ith row of chromosome X, and counting the number n of physical classes in the current classi6If n isi6>Upper limit of number of classes that the operating place can accommodate while attending class, fi33=ni6An upper limit for the number of classes that the operator station can accommodate while attending class; if n isi6<Upper limit of number of classes that the operating place can accommodate while giving lessons, let f i330 and directly arrange playground to each class to be attended with a sports class, i.e. X in chromosome X2Assign values, and set
Calculating an objective function value F corresponding to each chromosome in the population, wherein the specific formula is as follows: f ═ F1+f2+f3+f4The number of conflicts contained in the curriculum schedule corresponding to the current chromosome is divided into the number of conflicts f in class of the student1Teacher conflict number f in class2Classroom conflict f3Conflict with continuous class attendance at noon and afternoon f4。
The number of conflicts of students in class can be divided into the number of conflicts f in class between teaching classes of students11And the number f of classmates between the teaching class and the administrative class12Therefore, the objective function of the student's class time conflict is set as f1=f11+f12. Counting the number f of class conflicts among teaching classes of all students in each class11I.e. by
WhereinWherein w represents the number of students,the student selects the number of the class of the teaching corresponding to the subject, wherein li2| represents the set li2The size of (2).
Scanning each row (class hour) of chromosome X, observing whether the class hour of the administration class from the student has class for all the teaching classes in the class hour, and counting the number of the administration classes with the class, namely the number f of class conflicts between the teaching class and the administration class of the student12I.e. by
WhereinIs the set of teaching classes in class j, v is the number of teaching classes,refers to the administrative class number set, | e, of the student source of the teaching class ii3| represents the set ei3The size of (2).
Each statisticThe number of times of class repetition of the teacher in one class is defined as the objective function of the class conflict of the teacher as f2I.e. by
The objective function of classroom conflict is f3I.e. f3=f31+f32+f33。
Wherein f is31Number of classrooms in class for teaching, f32For the number of classrooms of classes other than the classroom for teaching class and the classroom for administration class, e.g. art classes in art classrooms, f33The upper limit of the number of classrooms in a sports class, that is, the number of classes that can be accommodated in the operating room and that can be used for class attendance, is set to 5.
The objective function of the continuous class conflict in the morning and afternoon is f4I.e. by
Wherein O ═ { O ═ OkOk=N1+k×N,k=0,2,...,M-1},N1Which refers to the number of hours in the morning each day.
S303, carrying out selection operation on the parent population to generate a mating pool population;
the selection operation adopts a binary tournament method, which comprises the following steps:
c31: randomly selecting two chromosomes from the population;
c32: selecting a chromosome with a small objective function value from the two chromosomes;
c33: repeat N303sub-C31 to C32, N to be selected303Individual chromosomes make up the mating pool population.
S304, performing cross operation on the mating pool population to generate a filial generation population, and assuming that two chromosomes are selected to be X from the mating pool population without being replaced1And X2Sequentially reacting X1And X2Are mated, first dividing the chromosome into M columns by columns304A number of portions, each portion having N304Columns; then, a random number r is generated every day if r is smaller than the crossover probability pcIs mixing X1And X2Corresponding row of gene x1Mating to generate corresponding rows of offspring chromosomes, otherwise, setting the genes x at the corresponding positions of the offspring chromosomes1Same as the parent; repeating the operation for P/2 times to obtain all the offspring chromosomes to form an offspring population;
in this embodiment, the crossover probability p is determinedcSet to 0.85. The specific mating process is as follows: two intersections r are randomly generated for each day1And r2The other courses except the common course between the two intersections are made to correspond one to one by X1On the basis of these courses, at X2Search these courses x1The position of occurrence, randomly selecting a position and X1X corresponding to this course2And exchanging courses, and finally exchanging the positions between the two cross points one by one to obtain the corresponding lines of the filial generations. Repeating the operation P/2 times, and forming all obtained offspring chromosomes into an offspring population.
As shown in fig. 4, a specific interleaving process is explained as an example. Where 0 represents no lessons. Suppose 5 days a week, 8 lessons a day, with X1And X2Monday of administration of chromosomes class A (line j) is an example. The first step is as follows: the intersections are 2 and 6, and "nixton" between intersections is a common course, and "calendar" corresponds to "object" and "ground" corresponds to "0". In the first correspondence, the second chromosome is searched for the occurrence of the calendar at positions 8, 40, and the calendar at position 8 is randomly selected to be exchanged with the object; in the second correspondence, the second chromosome is searched for the occurrence of "ground" at positions 7, 9, 20, and the "ground" at position 9 is randomly selected to be exchanged for "0". The second step is that: will 2The chromosomes from 6 are exchanged one by one to obtain offspring.
S305, performing mutation operations on chromosomes in the offspring population, wherein the mutation operations include administrative shift mutation operations and teaching shift mutation operations;
the mutation operation is divided into an administrative shift mutation operation and a teaching shift mutation operation, and the administrative shift mutation operation comprises the following steps: for rows 1 to u of each chromosome in the offspring population, the chromosome is first divided into M sections by column, each section having N columns, i.e., M days per week and N sections per day. Then, for each day, a random number r is generated, if r is less than the executive variation probability pc1For the day gene x corresponding to the corresponding row of chromosome1Carrying out mutation, otherwise, setting the gene x at the corresponding position of the offspring chromosome1As with the parent. The specific variation process is as follows: for each day two crossover points r1 and r2 were randomly generated to represent positions of the selection variation, gene x was swapped between these two positions1(curriculum) is finished. In this embodiment, the administrative shift mutation probability pc1Set to 0.25.
As shown in fig. 5, a specific executive variation process is illustrated as an example. Where 0 represents no lessons. Suppose 5 days a week, 8 lessons a day, with X1Monday of administration of chromosomes class A (line j) is an example. The two cross points generated randomly are 4 and 6, and the child is generated by exchanging the "calendar" and "ground".
The variation operation steps of the teaching class are as follows: for the lines from u +1 to u + v of each chromosome in the offspring population, a random number r is generated, if r is smaller than the variation probability p of the teaching classc2If not, the gene x at the position corresponding to the offspring chromosome is set1As with the parent. The specific variation process is as follows: randomly generating two intersections r1 and r2 for each row represents the position gene x of the selection variation1Exchanging the genes x at these two positions1(curriculum) is finished. In this embodiment, the variation probability p of the teaching classc2Set to 0.25.
As shown in fig. 6, a specific variation process of teaching class is illustrated as an example. Where 0 represents no lessons. Suppose 5 days a week, 8 lessons a day, with X1Teaching of chromosomes A class (line j) is an example. The two cross points generated randomly are 5 and 25, and swapping "0" and "raw" yields the child.
S306, arranging classrooms for the class lists corresponding to each chromosome and calculating objective function values corresponding to each chromosome in the offspring population;
the principle of arranging classrooms for the class lists corresponding to each chromosome and calculating the objective function value corresponding to each chromosome in the offspring population in this step is the same as that in step S302, and is not described again.
S307, merging the parent population and the child population, and selecting chromosomes of the P before the target function values are ranked from low to high to form a new parent population;
and S308, repeating the steps S303-307, wherein the chromosome corresponding to the minimum objective function value in the parent population is the optimal course arrangement scheme.
The invention has the beneficial effects that: compared with the traditional high school course arrangement method, the high school course arrangement method based on the class-moving system of the evolutionary algorithm simultaneously considers various constraints of the courses, teachers and classrooms in the middle school, and is more in line with the actual requirements.
The invention considers various hard constraints of courses, teachers and classrooms, considers soft constraints which are uniformly distributed during the course connection and the class, and better meets the actual requirements. The invention provides a new method for searching a class schedule, and designs a new crossover operator and a new mutation operator. The invention can obtain the high school class schedule containing the course information and the classroom information, and the problem of classroom assignability is not considered in the prior art.
In light of the foregoing description of the preferred embodiments of the present invention, those skilled in the art can now make various alterations and modifications without departing from the scope of the invention. The technical scope of the present invention is not limited to the contents of the specification, and must be determined according to the scope of the claims.
Claims (8)
1. A class-moving, height-controlling and middle-class-arranging method based on an evolutionary algorithm is characterized by comprising the following steps:
s1, constructing a class hour table of high and middle grades as a chromosome X of the evolutionary algorithm;
s101, gene encoding: setting gene x to represent class time in the course scheduling task, and the specific components of the gene x include but are not limited to course information x1Classroom number x2Whether or not there is lesson sign x3;
S102, constructing a chromosome: constructing a curriculum schedule X taking class of the whole year as a column and class/teaching time period as a row, putting the gene X as an element into the curriculum schedule X, and taking the curriculum schedule X as a chromosome;
s2, setting various hard constraint conditions related to the courses, teachers and teachers, and soft constraint conditions uniformly distributed during the course connection and class;
s3, based on the constraint conditions, using an evolutionary algorithm to arrange lessons to obtain an optimal lesson arrangement scheme;
s301, initializing a parent population with the size of P;
s302, arranging classrooms for the class lists corresponding to the chromosomes and calculating objective function values corresponding to the chromosomes in the parent population;
s303, carrying out selection operation on the parent population to generate a mating pool population;
s304, performing cross operation on the mating pool population to generate a filial generation population, and assuming that two chromosomes are selected to be X from the mating pool population without being replaced1And X2Sequentially reacting X1And X2Mating the corresponding rows, and dividing the chromosomes firstly; then, a random number r is generated every day if r is smaller than the crossover probability pcIs mixing X1And X2Corresponding row of gene x1Mating to generate corresponding rows of offspring chromosomes, otherwise, setting the genes x at the corresponding positions of the offspring chromosomes1Same as the parent; repeating the operation for P/2 times to obtain all the offspring chromosomes to form an offspring population;
s305, performing mutation operations on chromosomes in the offspring population, wherein the mutation operations include administrative shift mutation operations and teaching shift mutation operations;
s306, arranging classrooms for the class lists corresponding to each chromosome and calculating objective function values corresponding to each chromosome in the offspring population;
s307, merging the parent population and the child population, and selecting chromosomes of the P before the target function values are ranked from low to high to form a new parent population;
and S308, repeating the steps S303-307, wherein the chromosome corresponding to the minimum objective function value in the parent population is the optimal course arrangement scheme.
2. The method for high and medium class scheduling during shift walking based on evolutionary algorithm as claimed in claim 1, wherein the step S301 of initializing the parent population with size P specifically refers to
Three elements X contained in the gene X in the chromosome X1、x2、x3Setting as 0, dividing chromosome X into several units, and according to class time condition of class1Assign a value to, and correspondingly assign x3Setting to be 1, repeating the steps until P chromosomes are generated to form an initialized parent population.
3. The method as claimed in claim 1, wherein the step of arranging classrooms for the class schedule corresponding to each chromosome in steps S302 and S306 specifically comprises
Scanning ith row of chromosome X, and counting the number n of empty classrooms available for teaching class in the current classi1Then, the number n of class in the current class hour teaching class is countedi2If n isi2>ni1,fi31=ni2-ni1(ii) a If n isi2<ni1Let fi310 and arranges the empty classroom directly to each class to be attended, i.e. X in chromosome X2Assign values, and set
Scanning chromosome X column i, and counting class numbers n of classes not in the classroom of teaching class and the classroom of administration classi3And the number n thereofi4According to ni3Searching for the number of available classroom ni5If n isi4>ni5,fi32=ni4-ni5(ii) a If n isi4<ni5Let fi320 and arranges the empty classroom directly to each class to be attended, i.e. X in chromosome X2Assign values, and set
Scanning ith row of chromosome X, and counting the number n of physical classes in the current classi6If n isi6>Upper limit of number of classes that the operating place can accommodate while attending class, fi33=ni6An upper limit for the number of classes that the operator station can accommodate while attending class; if n isi6<Upper limit of number of classes that the operating place can accommodate while giving lessons, let fi330 and directly arrange playground to each class to be attended with a sports class, i.e. X in chromosome X2Assign values, and set
4. The method for scheduling shift, work height and middle school according to claim 1 or 3, wherein the step of calculating the objective function value corresponding to each chromosome in the parent/child population in steps S302 and S306 specifically comprises
Calculating an objective function value F corresponding to each chromosome in the parent/offspring population, wherein F is F1+f2+f3+f4The number of conflicts contained in the curriculum schedule corresponding to the current chromosome is divided into the number of conflicts f in class of the student1Teacher conflict number f in class2Classroom conflict f3Conflict with continuous class attendance at noon and afternoon f4。
5. The method for class scheduling during shift-taking and height-controlling based on evolutionary algorithm as claimed in claim 1, wherein the step of performing selection operation on the parent population to generate the mating pool population in step S303 specifically means performing binary tournament method on the parent population to generate a selection set number of chromosomes and to compose the mating pool population.
6. The method as claimed in claim 1, wherein the executive overtime course scheduling operation in step S305 specifically includes an executive overtime course scheduling operation
For each row and column corresponding to the executive shift in each chromosome in the offspring population, firstly, the chromosome is divided into a plurality of units, then a random number is generated every day, and if the random number is less than the variation probability of the executive shift, the corresponding gene x of the chromosome is subjected to1Carrying out mutation, otherwise, setting the gene x at the corresponding position of the offspring chromosome1As with the parent.
7. The evolutionary algorithm-based executive high-school course scheduling method according to claim 6, wherein the variation operation of the teaching class in step S305 specifically comprises
Generating a random number for the corresponding line of the teaching class in each chromosome in the offspring population, judging whether the random number is less than the variation probability of the teaching class, if so, performing variation, otherwise, setting the gene x of the corresponding position of the offspring chromosome1As with the parent.
8. The evolutionary algorithm-based executive high-school course scheduling method according to claim 7, wherein the executive class variation probability and the teaching class variation probability are 0.25.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110709194.2A CN113435647A (en) | 2021-06-25 | 2021-06-25 | Class-moving, height-controlling and middle-class-arranging method based on evolutionary algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110709194.2A CN113435647A (en) | 2021-06-25 | 2021-06-25 | Class-moving, height-controlling and middle-class-arranging method based on evolutionary algorithm |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113435647A true CN113435647A (en) | 2021-09-24 |
Family
ID=77755285
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110709194.2A Pending CN113435647A (en) | 2021-06-25 | 2021-06-25 | Class-moving, height-controlling and middle-class-arranging method based on evolutionary algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113435647A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003073342A1 (en) * | 2002-02-27 | 2003-09-04 | Nanyang Polytechnic | System, method and product for rostering using genetic algorithms |
CN108280549A (en) * | 2018-01-30 | 2018-07-13 | 福州大学 | A kind of senior middle school cource arrangement method under the class's of walking system based on improved adaptive GA-IAGA |
CN109961189A (en) * | 2019-03-29 | 2019-07-02 | 北京工业大学 | New college entrance examination timetabling algorithm based on genetic algorithm |
CN110738430A (en) * | 2019-10-25 | 2020-01-31 | 深圳软通动力信息技术有限公司 | Course arrangement method and device, computer equipment and storage medium |
CN111815252A (en) * | 2019-04-11 | 2020-10-23 | 上海梯启信息科技有限公司 | Optimized course arrangement algorithm based on DNA genetic evolution algorithm |
-
2021
- 2021-06-25 CN CN202110709194.2A patent/CN113435647A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003073342A1 (en) * | 2002-02-27 | 2003-09-04 | Nanyang Polytechnic | System, method and product for rostering using genetic algorithms |
CN108280549A (en) * | 2018-01-30 | 2018-07-13 | 福州大学 | A kind of senior middle school cource arrangement method under the class's of walking system based on improved adaptive GA-IAGA |
CN109961189A (en) * | 2019-03-29 | 2019-07-02 | 北京工业大学 | New college entrance examination timetabling algorithm based on genetic algorithm |
CN111815252A (en) * | 2019-04-11 | 2020-10-23 | 上海梯启信息科技有限公司 | Optimized course arrangement algorithm based on DNA genetic evolution algorithm |
CN110738430A (en) * | 2019-10-25 | 2020-01-31 | 深圳软通动力信息技术有限公司 | Course arrangement method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Todd et al. | Empirical refinements of a molecular genetics learning progression: The molecular constructs | |
Penland | Self-initiated learning | |
CN110047023B (en) | Novel college entrance examination course arrangement algorithm based on simulated annealing algorithm | |
Carrasco et al. | A multiobjective genetic algorithm for the class/teacher timetabling problem | |
Alghamdi et al. | A review of optimization algorithms for university timetable scheduling | |
Reis et al. | From High Potential to Gifted Performance: Encouraging Academically Talented Urban Students 26 | |
CN110837976A (en) | Intelligent department-selecting and shift-dividing method and system under shift-walking system | |
CN116468416A (en) | Intelligent shift-walking course-arranging method based on genetic algorithm | |
Thanh | Solving timetabling problem using genetic and heuristic algorithms | |
Chen et al. | A Novel Optimization Approach for Educational Class Scheduling with considering the Students and Teachers’ Preferences | |
Khonggamnerd et al. | On improvement of effectiveness in automatic university timetabling arrangement with applied genetic algorithm | |
Henning et al. | Designing a curriculum for clinical experiences. | |
Alnowaini et al. | Genetic Algorithm for solving university course timetabling problem using dynamic chromosomes | |
Avery et al. | This is why we do it! Using a design based approach to optimize student learning in an online discussion based course | |
CN113435647A (en) | Class-moving, height-controlling and middle-class-arranging method based on evolutionary algorithm | |
Adams et al. | Assessment of an international freshmen research and design experience: A triangulation study | |
Mousa et al. | Design and implementation of course timetabling system based on genetic algorithm | |
CN114781806A (en) | Multi-combination course arrangement method and device based on multi-objective evolutionary algorithm and readable medium | |
Yang et al. | Mathematical modeling and system design of timetabling problem based on improved GA | |
Long | A genetic algorithm based method for timetabling problems using linguistics of hedge algebra in constraints | |
Niknamian | Proposing a Novel Mathematical Model and Meta-Heuristic Algorithm for University Course Timetabling with an Educational Quality Approach | |
Fernandes et al. | Infected Genes Evolutionary Algorithm for School Timetabling | |
Lukas et al. | Genetic algorithm and heuristic search for solving timetable problem case study: Universitas Pelita Harapan timetable | |
Young et al. | Virtual Learning, Concrete Option: How Virtual Differs from Remote Learning during the Pandemic. White Paper No. 241. | |
Chen et al. | Research Article A Novel Optimization Approach for Educational Class Scheduling with considering the Students and Teachers’ Preferences |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210924 |
|
RJ01 | Rejection of invention patent application after publication |