CN111079976A - Course arrangement method based on improved simulated annealing and hill climbing algorithm mixed search - Google Patents

Course arrangement method based on improved simulated annealing and hill climbing algorithm mixed search Download PDF

Info

Publication number
CN111079976A
CN111079976A CN201911118987.6A CN201911118987A CN111079976A CN 111079976 A CN111079976 A CN 111079976A CN 201911118987 A CN201911118987 A CN 201911118987A CN 111079976 A CN111079976 A CN 111079976A
Authority
CN
China
Prior art keywords
solution
neighborhood
teaching
local optimal
course
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.)
Granted
Application number
CN201911118987.6A
Other languages
Chinese (zh)
Other versions
CN111079976B (en
Inventor
丁刚
沙键辉
王新源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Fengshi Technology Co Ltd
Original Assignee
Zhuhai Fengshi Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhuhai Fengshi Technology Co Ltd filed Critical Zhuhai Fengshi Technology Co Ltd
Priority to CN201911118987.6A priority Critical patent/CN111079976B/en
Publication of CN111079976A publication Critical patent/CN111079976A/en
Application granted granted Critical
Publication of CN111079976B publication Critical patent/CN111079976B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • G06Q50/205Education administration or guidance

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Tourism & Hospitality (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Marketing (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • Development Economics (AREA)
  • Evolutionary Computation (AREA)
  • Game Theory and Decision Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Medical Informatics (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a course arrangement method based on improved simulated annealing and hill climbing algorithm mixed search, which comprises the following steps: setting basic data, course arrangement requirements and rules; calculating an evaluation function and an algorithm parameter of the lesson form solution; randomly generating an initial lesson solving table; generating a local optimal solution by using a hill climbing algorithm and calculating a simulated annealing initial temperature; the local optimal solution is processed by using an improved simulated annealing algorithm, firstly, the exchange neighborhood of the solution is selected by a strategy and exchanged to generate a new neighborhood solution, the local optimal neighborhood solution is obtained by using a hill climbing algorithm for the neighborhood solution, the local optimal neighborhood solution is received by adopting probability, and the optimal local optimal solution and the exchange neighborhood selection probability are updated; and circularly executing the simulated annealing strategy to select the disturbance and hill climbing algorithm until the algorithm converges and exits, outputting a local optimal lesson solving table with the minimum punishment value, and generating a corresponding lesson arranging table. The invention has the beneficial effects that: the problem of difficulty in course arrangement of new college entrance examination is solved, teaching resources such as teachers, class hours and classrooms are saved, and course arrangement results are excellent.

Description

Course arrangement method based on improved simulated annealing and hill climbing algorithm mixed search
Technical Field
The invention belongs to the field of teaching management, and particularly relates to a course arrangement method based on improved simulated annealing and hill climbing algorithm mixed search.
Background
In 2014, the education department issues implementation opinions about the examination of the general high school academic proficiency, and announces that the general reform of the college entrance examination is carried out in the whole country from 2017, namely that 3 subjects of 6 subjects including political, geographical, historical, physical, chemical and biological subjects are selected for examination in the college entrance examination, except for 3 subjects in the whole country.
In 2019, the department of education announces that the third group of college entrance examination comprehensively reforms the province city (Hebei, Liaoning, Jiangsu, Fujian, Hubei, Hunan, Guangdong and Chongqing), and determines that the examination selection mode is '3 +1+ 2', namely '3' indicates three main lessons except the necessary number of words, '1' indicates one of history or physics, and '2' indicates two selected from biology, chemistry, geography and politics, and the total score is counted by grade assignment.
The course arrangement problem is an NP complete problem, algorithms such as genetic algorithm, simulated annealing, ant colony, exhaustion, tabu search and the like are used for solving the problems in the current industry, along with the innovation of new high-level examinations, many optional combinations are provided, course arrangement becomes more and more difficult due to teaching layering, manual course arrangement is impossible, and the traditional course arrangement method is difficult to meet the course arrangement requirement.
The prior art has the problems of increasing teaching resources of teachers, class hours, classrooms and the like and unsatisfactory course arrangement results.
Disclosure of Invention
The invention aims to solve at least one of the technical problems in the prior art, provides a course arrangement method based on improved simulated annealing and hill climbing algorithm mixed search, simultaneously refers to the algorithm thought of genetic algorithm and tabu search, integrates the mixed search course arrangement method of multiple algorithm thoughts, can save teaching resources, has better course arrangement results, solves the course arrangement problem in a new college entrance 3+3 or 3+1+2 mode, meets the requirements of all the selected subjects of the new college entrance examination on combination, multi-level teaching, no addition of teacher resources, various hard and soft teaching requirements, and realizes the personalized requirements of 100 percent course arrangement, zero conflict, zero manual intervention and zero adjustment, one course in one life, one teacher in one course and the like of the new college entrance examination.
The technical scheme of the invention comprises a course arrangement method based on improved simulated annealing and hill climbing algorithm mixed search, which is characterized by comprising the following steps: s100, setting a student selection table, a teacher arrangement table, a teaching task table, and setting course arrangement requirements and rules; s200, calculating an evaluation function of violation of hard constraint and soft constraint penalty values of a class schedule solution, calculating parameters required by a course arrangement algorithm, and performing optimization calculation on a teaching class according to the setting of S100; s300, randomly generating an initial lesson solving table; s400, generating a local optimal solution by using a hill climbing algorithm, calculating a simulated annealing initialization temperature, and taking the solution as a best local optimal solution schedule; s500, the local optimal solution is processed by using an improved simulated annealing algorithm, firstly, the exchange neighborhood of the solution is selected according to strategies and exchanged to generate a new neighborhood solution, the local optimal neighborhood solution is obtained by using a hill climbing algorithm, the local optimal neighborhood solution is accepted by adopting Metropolis criterion probability, if the neighborhood solution is accepted, the neighborhood solution is the new local optimal solution, if the neighborhood solution is not accepted, the neighborhood solution is returned to the original local optimal solution and the probability coefficient of the selected neighborhood which is selected again is reduced, if the new solution is better than the best local optimal solution, the new solution is used as the best local optimal solution class table, and the simulated annealing temperature is updated; and S600, circulating the step S500 until an exit condition is reached, outputting the best local optimal lesson solving table result, and generating a corresponding lesson arrangement table.
According to the course arrangement method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm, the S100 specifically comprises the following steps: s110, setting basic data, wherein the basic data comprises students, teachers, courses, classrooms, class hours, administrative classes, teaching classes and teaching levels; s120, setting a student selection table, a teacher scheduling table and a teaching task table; s130, setting course arrangement requirements and rules.
According to the course arrangement method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm, S130 specifically includes: the class-walking level, the teaching requirement, the work sharing of teachers, no course arrangement, single and double week courses, class combination courses, mutual exclusion courses, occupation courses and the individual requirements of schools are correspondingly set.
The course arrangement method based on the improved simulated annealing and hill climbing algorithm mixed search specifically comprises the steps of S210, calculating an evaluation function of a class schedule solution violating a hard constraint and a soft constraint penalty value, wherein the violating hard constraint penalty value represents the penalty values of student class schedule conflicts, teacher class schedule conflicts and course schedule conflicts, and the soft constraint penalty value represents the penalty values of one or more sub-items of class arrangement rules violating the class schedule, S220, calculating whether a 'elite reservation' strategy α is used in a selection strategy or not according to the course arrangement requirement and rule application and initializing weight parameters violating the hard constraint and the soft constraint penalty value evaluation function, and calculating a 'elite reservation' strategy α which can take a value of 0 or 1, selecting a strategy β by using a 'roulette' selection strategy or a 'championship' which can take a value of 0 or 1, α and β, wherein a coefficient η is related to a selected triad of a selected triad, calculating a descending coefficient gamma of a selected neighborhood probability once again, calculating a simulated annealing neighborhood probability produced disturbance, an initial temperature descending coefficient, a kappa coefficient, a maximum class descending coefficient, a lambda of a teaching cycle, a teaching unit, and a teaching unit which are optimized by a student neighborhood optimization unit, and a teaching unit which is free of a teaching task selection unit, wherein the student class schedule is composed of a teaching unit, and a teaching unit, and a teaching unit which are optimized by a teaching unit, and a teaching unit.
According to the course arrangement method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm, the step S300 specifically includes: s310, distributing teaching resource units counted according to the class hour requirements for all teaching units according to one solution of the algorithm, wherein the teaching resource units are Cartesian products of the class hour T and the classroom R; and S320, randomly generating a class schedule initial solution, namely randomly distributing teaching resource units for each teaching unit.
According to the course arrangement method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm, the step S400 specifically comprises the following steps: s410, calculating all neighborhoods of the solution; s420, calculating a neighborhood violation course arrangement rule penalty value of the solution, and storing a neighborhood with the penalty value smaller than the original solution penalty value to a more optimal neighborhood set; s430, generating a random number between 0 and 1, randomly selecting a neighborhood from the more optimal neighborhood set as a new solution if the random number is less than the fastest neighborhood coefficient theta, and otherwise selecting the optimal neighborhood solution with the minimum punishment value from the more optimal neighborhood set as a new solution; s440, the steps S410 to S430 are repeated until no more optimal neighborhood exists, namely the solution is the local optimal solution; and S450, taking the local optimal solution as a best local optimal solution class table. And S460, calculating the simulated annealing initialization temperature as a local optimal punishment value and an initial temperature coefficient Epsilon.
According to the course arrangement method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm, the neighborhood generation of the solution in the S410 comprises the following steps: two courses are exchanged, namely, one assigned teaching resource rt1 of a teaching unit tu1 is exchanged with one assigned teaching resource rt2 of another teaching unit tu2, wherein tu1 and tu2 cannot be empty at the same time, neither rt1 nor rt2 can be empty, tu1 can use rt2, tu2 can use rt 1; two classes of time are exchanged, teaching time t1 is exchanged with teaching time t2, namely
Figure RE-GDA0002410336950000031
When rt1 and rt2 are exchanged, all the exchanged courses are exchanged, and the exchange conditions are consistent with the exchange conditions of the two courses.
According to the course arrangement method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm, S500 specifically includes the step of processing the local optimal solution course table by using the improved simulated annealing algorithm, which includes: s510, calculating penalty values of all teaching units violating hard constraints and soft constraints; s520, selecting disturbance proportion zeta × TU | teaching units by a strategy; s530, executing the disturbance in claim 7 to the selected teaching unit in the class schedule solution to generate a disturbance solution, and generating a new local optimal solution by using a hill climbing algorithm; s540, adopting Metropolis criterion probability to receive the local optimal neighborhood solution as a new local optimal solution, namely: the method comprises the following steps that delta T is a new local optimal solution penalty value-an original local optimal solution penalty value, the delta T is accepted when the value is less than 0, the delta T is greater than 0, the value is accepted by a probability exp (-delta T/T), if the value is accepted, the neighborhood solution is a new local optimal solution, if the value is not accepted, the value is returned to the original local optimal solution, the probability coefficient that a selected neighborhood is selected again is reduced, and the probability penalty value that the selected teaching unit is selected again is equal to the original value multiplied by a probability reduction coefficient gamma; s550, when the new local optimal solution is superior to the best local optimal solution, the new solution is used as a best local optimal solution class list; and S560, updating the simulated annealing temperature to the original temperature multiplied by the temperature drop coefficient kappa.
According to the course arrangement method based on the improved simulated annealing and hill climbing algorithm mixed search, S520 selection strategies comprise an elite reservation strategy, when the selection strategy is adopted, the teaching unit with the largest penalty value S510 is selected, a roulette selection strategy, when the selection strategy is adopted, the probability that the teaching unit with the largest penalty value S510 is selected is in proportion to the penalty value of the teaching unit, a tournament selection strategy is adopted, when the selection strategy is adopted, η teaching units with the tournament coefficients are randomly selected at each time, then the teaching unit with the largest penalty value is selected from η teaching units, all selections are selections without putting back and repeating, whether the elite reservation strategy is adopted is determined by a parameter α, and whether the roulette or tournament selection strategy is determined by a parameter β.
According to the course arrangement method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm, the step S600 specifically comprises the following steps: s610, executing the step S500 in a circulating mode until the circulation frequency reaches the maximum circulation frequency delta, or when the continuous times without more optimal solutions in the step S500 reach the continuous times without optimal solution exit frequency lambda or the best local optimal solution punishment value is 0, and exiting in a circulating mode; s620, preferably, the local optimal solution is a course arrangement table result, and the course table information such as a student course table, a teacher course table, a classroom course table, a class course table, a grade course table, a course table and the like is output.
The invention has the beneficial effects that: the problem of difficulty in course arrangement of new college entrance examination is solved, teaching resources such as teachers, class hours and classrooms are saved, and course arrangement results are excellent.
Drawings
The invention is further described below with reference to the accompanying drawings and examples;
FIG. 1 illustrates an overall flow diagram according to an embodiment of the invention;
FIG. 2 is a flow chart of a hill climbing algorithm according to an embodiment of the present invention;
FIG. 3 illustrates a course arrangement result-student schedule according to an embodiment of the present invention;
fig. 4 shows a course arrangement result-teacher's lesson schedule according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the present preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like elements throughout.
In the description of the present invention, the meaning of a plurality of means is one or more, the meaning of a plurality of means is two or more, and larger, smaller, larger, etc. are understood as excluding the number, and larger, smaller, inner, etc. are understood as including the number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, unless otherwise explicitly defined, terms such as set, etc. should be broadly construed, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the detailed contents of the technical solutions.
FIG. 1 shows a general flow diagram according to an embodiment of the invention.
Setting a student selection table, a teacher scheduling table, a teaching task table, and setting course scheduling requirements and rules; calculating an evaluation function of violation of hard constraint and soft constraint penalty values of the school timetable solution, calculating parameters required by a course arrangement algorithm, and performing optimization calculation on a teaching class according to setting; randomly generating an initial lesson solving table; generating a local optimal solution by using a hill climbing algorithm, calculating a simulated annealing initialization temperature, and taking the solution as a best local optimal solution class table; the local optimal solution is processed by using an improved simulated annealing algorithm, firstly, the exchange neighborhood of the solution is selected according to a strategy and exchanged to generate a new neighborhood solution, the neighborhood solution is subjected to a hill climbing algorithm to obtain the local optimal neighborhood solution, the local optimal neighborhood solution is accepted by adopting Metropolis criterion probability, if the neighborhood solution is accepted, the neighborhood solution is the new local optimal solution, if the neighborhood solution is not accepted, the neighborhood solution is returned to the original local optimal solution, the probability coefficient of the selected neighborhood which is selected again is reduced, and if the new solution is better than the best local optimal solution, the new solution is used as a best local optimal solution table, and the simulated annealing temperature is updated; outputting the best local optimal lesson solving list result and generating the corresponding lesson arranging list
According to the above technical solution, the technical solution of the present invention provides a more specific embodiment, including:
1. inputting student's choosing table, teacher's schedule table, teaching task, setting course-arranging requirement and rule
1.1, the student selection table comprises student IDs, executive IDs, level IDs and course selection ID sets;
1.2, the teacher scheduling list comprises a teacher ID, a teaching course ID and the class number thereof, a teaching class ID, a subject group, at most a few classes in one day and forbidden scheduling time;
1.3, the teaching task list comprises course IDs, course types (basic courses such as English, subject courses, academic level examination courses, non-college examination courses and the like), time requirement, priority, class hours, class attendance for several days, subject groups, whether to close the class, class number, teachers capable of giving lessons, classrooms capable of giving lessons and forbidden arrangement time;
1.4 setting course arrangement requirements and rules
a. Setting a class walking level, performing layered teaching on students, and setting a level at which the students can walk without crossing layers;
b. setting the times and interval requirements of the class connection;
c. setting single and double week courses;
d. setting a class-closing course;
e. teacher who gives lessons continuously
f. Setting the sections to be shared by the teacher (the 1 st and the last 1 st sections in the morning and afternoon can be selected);
g. setting teachers not to arrange lessons;
h. setting courses not to be arranged;
i. setting mutual exclusion of teachers;
j. setting mutual exclusion of courses;
k. setting an occupying course and a scheduled course;
l, setting individual requirements of schools;
2. calculating an evaluation function of violation of hard constraint and soft constraint penalty values of the school timetable solution, calculating algorithm parameters, and calculating a teaching class;
2.1: and calculating an evaluation function of violation of hard constraint and soft constraint penalty value of the school timetable solution.
cost=∑costiThe algorithm targets the minimum cost value, costiThe cost value of each course scheduling rule comprises the following parts:
1) class-going hierarchy
Figure RE-GDA0002410336950000071
s is the number of people per class table violating the level constraint, omega1Punishing coefficients for shift-walking levels;
2) the number of classes and interval requirements
Figure RE-GDA0002410336950000072
c is number of consecutive violations, omega2Coefficient of number of successive intervals, s is a violation of successive interval constraint, ω3Is a coefficient of inter-hall spacing;
3) single and double week
Figure RE-GDA0002410336950000073
c is the number of violations of a single or double week, omega4Is a single and double cycle coefficient;
4) class-in-class
Figure RE-GDA0002410336950000074
c is the number of violations to close the shift, omega5Is the concordant shift coefficient;
5) is level with the teaching plan
Figure RE-GDA0002410336950000075
c is the number of times that the teacher is uneven in the same course of teaching plan in different classes, omega6The leveling coefficient of the teaching plan;
6) course cross teaching with teacher and progress
Figure RE-GDA0002410336950000076
c is the number of times of non-crossing of the teacher course with the same progress, omega7The cross teaching coefficients of the courses with the same progress of the teacher are obtained;
7) the course distribution is balanced
Figure RE-GDA0002410336950000077
σ is the curriculum imbalance, ω8Distributing the balance coefficients for the courses;
8) continuous lesson request
Figure RE-GDA0002410336950000078
c is the number of violations of successive classes, omega9Requiring coefficients for continuous class attendance;
9) teacher's work sharing
Figure RE-GDA0002410336950000079
c is the number of times the teacher took the last section of the first section in the morning and afternoon,
Figure RE-GDA00024103369500000710
the average number of times, omega, of the last section of the first section in the morning and afternoon of all teachers10Sharing the coefficient for the teacher work;
10) the courses are not arranged
Figure RE-GDA00024103369500000711
c is the number of times of non-course arrangement for violating course, omega11The course coefficient is not arranged;
11) the teachers do not arrange the lessons
Figure RE-GDA00024103369500000712
c is the number of times of non-course arrangement violating teacher, omega12No course arrangement coefficient for teachers;
12) mutual exclusion of curriculum
Figure RE-GDA0002410336950000081
c is the number of times of simultaneous lessons of mutual exclusion, omega13Is the mutual exclusion coefficient of the course;
13) mutual exclusion of teachers
Figure RE-GDA0002410336950000082
c is the number of times of the mutual exclusion teacher giving lessons simultaneously, omega14A mutual exclusion coefficient for the teacher;
14) conflict between students
Figure RE-GDA0002410336950000083
c is the total number of students in class, omega15Is the student conflict factor;
15) conflict with teachers
Figure RE-GDA0002410336950000084
c is the total number of conflicting teachers on class, omega16Is a teacher conflict coefficient;
16) course conflict
Figure RE-GDA0002410336950000085
c total number of conflicts, omega, for multiple classes scheduled in the same classroom at the same time17Is the course conflict coefficient;
17) number of people going to work
Figure RE-GDA0002410336950000086
c is the total number of people on class, omega18The number of people going to work is the coefficient;
18) class time priority
Figure RE-GDA0002410336950000087
ωcAs course priority coefficient, ωtIs a class time priority coefficient, omega19Is a class time priority coefficient;
19) the self-defining rule cost ∑ c ω, c is the number of times of violating the self-defining rule, and ω is a self-defining rule coefficient;
2.2: calculating algorithm parameters, applying and initializing omega according to course arrangement requirements and rules set by 2.11......ω19ctOmega, whether the selection strategy uses the Elite reservation strategy α, the roulette selection strategy or the tournament selection strategySelecting a strategy β, wherein a 'championship' coefficient η is suggested to be between 2 and 4, a probability reduction coefficient gamma of a selected neighborhood which is selected again can be between 0.0 and 1.0, calculating a disturbance proportion zeta generated by a simulated annealing neighborhood, wherein the disturbance proportion zeta is related to the number of input students, teachers and courses, the zeta is smaller when the course arrangement scale is larger, an initial temperature coefficient epsilon, a temperature reduction coefficient kappa and a maximum cycle number delta are suggested to be larger than 100, the kappa is related to the delta, the continuous non-optimal solution times lambda and the fastest neighborhood coefficient theta can be set to be between 0.0 and 1.0.
2.3: and calculating a teaching class, namely calculating all teaching units according to the input student selection list, teacher scheduling list and teaching tasks, wherein one teaching unit TU consists of three groups of courses, teachers giving lessons and students taking lessons, and the teaching class with balanced student number and minimum conflict is generated.
3. Randomly generating an initial lesson solving table;
3.1: the teaching unit TU consists of three groups of courses, teachers giving lessons and students taking lessons; the teaching resources are composed of classrooms R and time T, and one solution of the algorithm is that all teaching units are distributed with teaching resource units according to the time requirement, namely
Figure RE-GDA0002410336950000091
3.2: randomly generating a courseware initial solution, namely randomly distributing rt teaching resources for each teaching unit tu;
4. generating a local optimal solution by using a hill climbing algorithm, calculating a simulated annealing initialization temperature, and taking the solution as a best local optimal solution class table;
4.1: all neighborhoods of the solution are computed, which result from two ways: 1) exchanging two courses, namely exchanging an allocated teaching resource rt1 of a teaching unit tu1 with an allocated teaching resource rt2 of another teaching unit tu2, wherein tu1 and tu2 cannot be empty at the same time, neither rt1 nor rt2 can be empty, tu1 can use rt2, and tu2 can use rt 1; 2) two classes of lessons are exchanged, i.e. teaching lessons t1 are exchanged with t2, i.e.
Figure RE-GDA0002410336950000092
When rt1 and rt2 are exchanged, they are exchanged in the same way as in item 1).
4.2: calculating a punishment value cost of the neighborhood violation course arrangement rule of the solution, and storing a neighborhood to a better neighborhood set, wherein the neighborhood is smaller than the cost of the original solution;
4.3: generating a random number rand _ float between 0.0 and 1.0, if rand _ float < theta, and randomly selecting one neighborhood from the more optimal neighborhood set as a new solution; the else selects the optimal neighborhood solution with the minimum cost from the better neighborhood set as a new solution;
4.4: and (4.1), 4.2 and 4.3, until no more optimal neighborhood exists, namely the solution is the local optimal solution, namely all neighborhood solution cost values of the solution are larger than the cost value of the original solution.
4.5: taking the local optimal solution as a best local optimal solution class table;
4.6: calculating the simulation annealing initialization temperature as the local optimal punishment value of the initial temperature coefficient Epsilon
5. The method comprises the steps of processing a local optimal solution by using an improved simulated annealing algorithm, firstly, selecting an exchange neighborhood of the solution according to a strategy, carrying out exchange to generate a new neighborhood solution, obtaining the local optimal neighborhood solution by using a hill climbing algorithm for the neighborhood solution, adopting Metropolis criterion probability to accept the local optimal neighborhood solution, if the neighborhood solution is accepted, returning to an original local optimal solution, reducing a probability coefficient of the selected neighborhood which is selected again, if the new solution is not accepted, taking the new solution as a best local optimal solution table, and updating simulated annealing temperature.
5.1: calculating penalty values of all teaching units violating the hard constraint and the soft constraint;
5.2: strategy selection disturbance proportion ζ × | TU | teaching units;
5.2.1, determining whether the teaching unit with the maximum penalty value is selected according to the strategy parameter α of 'eligibility reservation';
5.2.2, determining a selection strategy according to the ' roulette using ' or ' tournament ' selection strategy parameter β ', wherein the probability of the selected teaching unit is zeta of the penalty value of the teaching unit/the penalty value of all teaching units when the ' roulette ' is adopted, and η teaching units are firstly selected from all teaching units each time when the ' tournament ' is adopted, and then the teaching unit with the maximum penalty value is selected from the η teaching units until the zeta | TU | teaching unit selection is completed.
5.2.3: the selection is not put back and not repeated.
5.3: and executing the disturbance in the step 4 on the teaching unit selected from the class schedule solution to generate a disturbance solution, and generating a new local optimal solution by using a hill climbing algorithm.
5.3.1: executing the disturbance of 4.1 to all the distribution schemes of the teaching units selected in the class schedule solution to generate a disturbance solution;
5.3.2: and executing the hill climbing algorithm of the step 4 on the disturbance solution to generate a new local optimal solution.
5.4: adopting Metropolis criterion probability to receive the local optimal neighborhood solution as a new local optimal solution, namely: the method comprises the following steps that delta T is a new local optimal solution penalty value-an original local optimal solution penalty value, the delta T is accepted when the value is less than 0, the delta T is greater than 0, the value is accepted by a probability exp (-delta T/T), if the value is accepted, the neighborhood solution is a new local optimal solution, if the value is not accepted, the value is returned to the original local optimal solution, the probability coefficient that a selected neighborhood is selected again is reduced, and the probability penalty value that the selected teaching unit is selected again is equal to the original value multiplied by a probability reduction coefficient gamma;
5.4.1: calculating the simulated annealing temperature difference of the new solution: Δ t ═ new local optimal penalty value — original local optimal penalty value;
5.4.2: if delta t <0, accepting the new solution as a local optimal solution; generating a random number rand _ float between 0.0 and 1.0 by else if, and receiving a new solution as a local optimal solution if the if rand _ float < exp (-delta T/T); else does not accept the new solution and rolls back to the original locally optimal solution.
5.4.3: if 5.4.2 does not accept the new solution, all selected teaching units in 5.2 are updated to select the penalty value as their current value multiplied by a probability drop coefficient γ to reduce their probability of being selected again.
5.4.4: if a new solution is accepted in 5.4.2, all teaching units select the penalty value to be restored to the original value of the penalty value.
5.6: and when the new local optimal solution is better than the best local optimal solution, the new solution is used as the best local optimal solution class table.
5.7: the simulated annealing temperature is updated to the original temperature multiplied by the temperature drop coefficient k.
6. And 5, circulating the step 5 until an exit condition is reached, and outputting a local optimal lesson solving list result.
6.1: and step 5 is executed circularly until the cycle number reaches the maximum cycle number delta, or the continuous times without more optimal solutions in step 5 reach the continuous times without optimal solution exit epsilon, or the local optimal solution punishment value is 0 preferably, and the algorithm exits, namely the algorithm exit condition.
6.2: preferably, the local optimal solution is a school timetable result, and various school timetable information required by schools, such as a student timetable, a teacher timetable, a classroom timetable, a class timetable, a grade timetable, a course timetable and the like, is output.
Fig. 2 is a flowchart illustrating a hill climbing algorithm according to an embodiment of the present invention. As shown in embodiment 4 of fig. 1.
Fig. 3 shows a course arrangement result-student schedule according to an embodiment of the present invention. The class schedule is an artist class schedule for selecting and examining historical geochemical subjects.
Fig. 4 shows a course arrangement result-teacher's lesson schedule according to an embodiment of the present invention. The school timetable is a physical teacher school timetable, wherein 2 students are selected and examined, and 2 students are examined according to the academic proficiency.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.

Claims (10)

1. A course arrangement method based on improved simulated annealing and hill climbing algorithm mixed search is characterized by comprising the following steps:
s100, setting a student selection table, a teacher arrangement table, a teaching task table, and setting course arrangement requirements and rules;
s200, calculating an evaluation function of violation of hard constraint and soft constraint penalty values of a class schedule solution, calculating parameters required by a course arrangement algorithm, and performing optimization calculation on a teaching class according to the setting of S100;
s300, randomly generating an initial lesson solving table;
s400, generating a local optimal solution by using a hill climbing algorithm, calculating a simulated annealing initialization temperature, and taking the solution as a best local optimal solution schedule;
s500, the local optimal solution is processed by using an improved simulated annealing algorithm, firstly, the exchange neighborhood of the solution is selected according to strategies and exchanged to generate a new neighborhood solution, the local optimal neighborhood solution is obtained by using a hill climbing algorithm, the local optimal neighborhood solution is accepted by adopting Metropolis criterion probability, if the neighborhood solution is accepted, the neighborhood solution is the new local optimal solution, if the neighborhood solution is not accepted, the neighborhood solution is returned to the original local optimal solution and the probability coefficient of the selected neighborhood which is selected again is reduced, if the new solution is better than the best local optimal solution, the new solution is used as the best local optimal solution class table, and the simulated annealing temperature is updated;
and S600, circulating the step S500 until an exit condition is reached, outputting the best local optimal lesson solving table result, and generating a corresponding lesson arrangement table.
2. The course arrangement method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm of claim 1, wherein the S100 specifically comprises:
s110, setting basic data, wherein the basic data comprises students, teachers, courses, classrooms, class hours, administrative classes, teaching classes and teaching levels;
s120, setting a student selection table, a teacher scheduling table and a teaching task table;
s130, setting course arrangement requirements and rules.
3. The course scheduling method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm of claim 2, wherein the S130 specifically comprises: the class-walking level, the teaching requirement, the work sharing of teachers, no course arrangement, single and double week courses, class combination courses, mutual exclusion courses, occupation courses and the individual requirements of schools are correspondingly set.
4. The course arrangement method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm of claim 1, wherein the S200 specifically comprises:
s210, calculating an evaluation function of violation hard constraint and soft constraint penalty values of the school timetable solution, wherein the violation hard constraint penalty value represents the penalty values of student school timetable conflicts, teacher school timetable conflicts and course school timetable conflicts, and the soft constraint penalty value represents the penalty values of one or more sub-items of the school timetable violation course arrangement rule;
s220, applying and initializing a weight parameter violating a hard constraint and soft constraint penalty value evaluation function according to the course arrangement requirement and rules, calculating whether an elite reservation strategy α is used in the selection strategy, whether a roulette selection strategy or a tournament selection strategy β is used, and a tournament coefficient η is used in the selection strategy, and a probability reduction coefficient gamma of the selected neighborhood which is selected again is calculated to generate a disturbance proportion zeta, an initial temperature coefficient epsilon, a temperature reduction coefficient kappa, a maximum cycle number delta, a continuous non-optimal solution exit number lambda and a fastest neighborhood coefficient theta in the simulated annealing neighborhood;
and S230, optimizing and calculating all teaching units according to the input student selection table, teacher scheduling table and teaching task table, wherein the teaching units consist of three groups of courses, teachers giving lessons and students taking lessons, and generating a teaching class with the least student number balance and conflict after optimization.
5. The course scheduling method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm of claim 1, wherein the S300 specifically comprises:
s310, distributing teaching resource units counted according to the class hour requirements for all teaching units according to one solution of the algorithm, wherein the teaching resource units are Cartesian products of the class hour T and the classroom R;
and S320, randomly generating a class schedule initial solution, namely randomly distributing teaching resource units for each teaching unit.
6. The course scheduling method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm of claim 1, wherein the S400 specifically comprises:
s410, calculating all neighborhoods of the solution;
s420, calculating a neighborhood violation course arrangement rule penalty value of the solution, and storing a neighborhood with the penalty value smaller than the original solution penalty value to a more optimal neighborhood set;
s430, generating a random number between 0 and 1, randomly selecting a neighborhood from the more optimal neighborhood set as a new solution if the random number is less than the fastest neighborhood coefficient theta, and otherwise selecting the optimal neighborhood solution with the minimum punishment value from the more optimal neighborhood set as a new solution;
s440, the steps S410 to S430 are repeated until no more optimal neighborhood exists, namely the solution is the local optimal solution;
and S450, taking the local optimal solution as a best local optimal solution class table.
And S460, calculating the simulated annealing initialization temperature as a local optimal punishment value and an initial temperature coefficient Epsilon.
7. The course arrangement method based on improved simulated annealing and hill climbing algorithm hybrid search as claimed in claim 6, wherein the neighborhood generation of the solution in S410 comprises:
two courses are exchanged, namely, one assigned teaching resource rt1 of a teaching unit tu1 is exchanged with one assigned teaching resource rt2 of another teaching unit tu2, wherein tu1 and tu2 cannot be empty at the same time, neither rt1 nor rt2 can be empty, tu1 can use rt2, tu2 can use rt 1;
two classes of time are exchanged, teaching time t1 is exchanged with teaching time t2, namely
Figure FDA0002274888600000031
When rt1 and rt2 are exchanged, all the exchanged courses are exchanged, and the exchange conditions are consistent with the exchange conditions of the two courses.
8. The course arrangement method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm of claim 1, wherein the step S500 specifically comprises:
the local optimal solution schedule is processed by using an improved simulated annealing algorithm, and the method comprises the following steps:
s510, calculating penalty values of all teaching units violating hard constraints and soft constraints;
s520, selecting disturbance proportion zeta × TU | teaching units by a strategy;
s530, executing the disturbance in claim 7 to the selected teaching unit in the class schedule solution to generate a disturbance solution, and generating a new local optimal solution by using a hill climbing algorithm;
s540, adopting Metropolis criterion probability to receive the local optimal neighborhood solution as a new local optimal solution, namely: the method comprises the following steps that delta T is a new local optimal solution penalty value-an original local optimal solution penalty value, the delta T is accepted when the value is less than 0, the delta T is greater than 0, the value is accepted by a probability exp (-delta T/T), if the value is accepted, the neighborhood solution is a new local optimal solution, if the value is not accepted, the value is returned to the original local optimal solution, the probability coefficient that a selected neighborhood is selected again is reduced, and the probability penalty value that the selected teaching unit is selected again is equal to the original value multiplied by a probability reduction coefficient gamma;
and S550, when the new local optimal solution is better than the best local optimal solution, taking the new solution as a best local optimal solution class list.
And S560, updating the simulated annealing temperature to the original temperature multiplied by the temperature drop coefficient kappa.
9. The course scheduling method based on the hybrid search of the improved simulated annealing and hill climbing algorithm of claim 8, wherein the S520 selection strategy comprises:
an 'elite reservation' strategy, wherein when the strategy is adopted, the teaching unit with the maximum punishment value in the step S510 is selected;
the wheel roulette selection strategy is adopted, and when the wheel roulette selection strategy is adopted, the probability of the teaching unit selected in S510 is in direct proportion to the penalty value of the teaching unit;
when the 'championship' selection strategy is adopted, η teaching units with the 'championship' coefficient are randomly selected in each selection, and then the teaching unit with the maximum penalty value is selected from the η teaching units.
All selections are no-play-back no-repeat selections, whether the "elite reservation" strategy is employed is determined by parameter α, and whether the "roulette" or "tournament" selection strategy is employed is determined by parameter β.
10. The course arrangement method based on the hybrid search of the improved simulated annealing and the hill climbing algorithm of claim 1, wherein the S600 specifically comprises:
s610, executing the step S500 in a circulating mode until the circulation frequency reaches the maximum circulation frequency delta, or when the continuous times without more optimal solutions in the step S500 reach the continuous times without optimal solution exit frequency lambda or the best local optimal solution punishment value is 0, and exiting in a circulating mode;
s620, preferably, the local optimal solution is a course arrangement table result, and the course table information such as a student course table, a teacher course table, a classroom course table, a class course table, a grade course table, a course table and the like is output.
CN201911118987.6A 2019-11-15 2019-11-15 Lesson arranging method based on improved simulated annealing and hill climbing algorithm mixed search Active CN111079976B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911118987.6A CN111079976B (en) 2019-11-15 2019-11-15 Lesson arranging method based on improved simulated annealing and hill climbing algorithm mixed search

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911118987.6A CN111079976B (en) 2019-11-15 2019-11-15 Lesson arranging method based on improved simulated annealing and hill climbing algorithm mixed search

Publications (2)

Publication Number Publication Date
CN111079976A true CN111079976A (en) 2020-04-28
CN111079976B CN111079976B (en) 2023-09-01

Family

ID=70311158

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911118987.6A Active CN111079976B (en) 2019-11-15 2019-11-15 Lesson arranging method based on improved simulated annealing and hill climbing algorithm mixed search

Country Status (1)

Country Link
CN (1) CN111079976B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111626423A (en) * 2020-05-21 2020-09-04 宿迁学院 Quantum register allocation method and system based on simulated annealing
CN113534042A (en) * 2021-07-14 2021-10-22 深圳市微能信息科技有限公司 TDOA (time difference of arrival) positioning algorithm based on improved reverse learning cuckoo search
CN114548611A (en) * 2022-04-27 2022-05-27 东方电气风电股份有限公司 Method for searching optimal gain parameter of wind generating set

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140032437A1 (en) * 2012-07-26 2014-01-30 Eric Steven Greenberg Travel app
CN108846782A (en) * 2018-06-05 2018-11-20 科大讯飞股份有限公司 Schedule aranging generation method and device, storage medium, electronic equipment
WO2018223530A1 (en) * 2017-06-08 2018-12-13 深圳市鹰硕技术有限公司 Method for monitoring recording and broadcasting data learning based on internet
CN109657853A (en) * 2018-12-12 2019-04-19 华中师范大学 A kind of cource arrangement method and device of dual temperature control
CN110020831A (en) * 2019-03-29 2019-07-16 北京工业大学 New college entrance examination timetabling algorithm based on particle swarm algorithm
CN110047023A (en) * 2019-03-29 2019-07-23 北京工业大学 New college entrance examination timetabling algorithm based on simulated annealing
CN110060185A (en) * 2019-03-15 2019-07-26 世纪海航(厦门)科技有限公司 A kind of Intelligent Course Scheduling method, device and equipment
CN110086350A (en) * 2019-05-30 2019-08-02 南京邮电大学 It is a kind of to be climbed the mountain the isolation type bidirectional DC-DC efficiency optimization method of hybrid algorithm based on simulated annealing-

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140032437A1 (en) * 2012-07-26 2014-01-30 Eric Steven Greenberg Travel app
WO2018223530A1 (en) * 2017-06-08 2018-12-13 深圳市鹰硕技术有限公司 Method for monitoring recording and broadcasting data learning based on internet
CN108846782A (en) * 2018-06-05 2018-11-20 科大讯飞股份有限公司 Schedule aranging generation method and device, storage medium, electronic equipment
CN109657853A (en) * 2018-12-12 2019-04-19 华中师范大学 A kind of cource arrangement method and device of dual temperature control
CN110060185A (en) * 2019-03-15 2019-07-26 世纪海航(厦门)科技有限公司 A kind of Intelligent Course Scheduling method, device and equipment
CN110020831A (en) * 2019-03-29 2019-07-16 北京工业大学 New college entrance examination timetabling algorithm based on particle swarm algorithm
CN110047023A (en) * 2019-03-29 2019-07-23 北京工业大学 New college entrance examination timetabling algorithm based on simulated annealing
CN110086350A (en) * 2019-05-30 2019-08-02 南京邮电大学 It is a kind of to be climbed the mountain the isolation type bidirectional DC-DC efficiency optimization method of hybrid algorithm based on simulated annealing-

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111626423A (en) * 2020-05-21 2020-09-04 宿迁学院 Quantum register allocation method and system based on simulated annealing
CN111626423B (en) * 2020-05-21 2024-03-08 宿迁学院 Quantum register allocation method and system based on simulated annealing
CN113534042A (en) * 2021-07-14 2021-10-22 深圳市微能信息科技有限公司 TDOA (time difference of arrival) positioning algorithm based on improved reverse learning cuckoo search
CN114548611A (en) * 2022-04-27 2022-05-27 东方电气风电股份有限公司 Method for searching optimal gain parameter of wind generating set
CN114548611B (en) * 2022-04-27 2022-07-19 东方电气风电股份有限公司 Method for searching optimal gain parameter of wind generating set

Also Published As

Publication number Publication date
CN111079976B (en) 2023-09-01

Similar Documents

Publication Publication Date Title
CN111079976A (en) Course arrangement method based on improved simulated annealing and hill climbing algorithm mixed search
CN110503269B (en) Class-dividing and class-arranging method and device under class-walking teaching
Useem Getting on the fast track in mathematics: School organizational influences on math track assignment
Hakim The Influence of Duties and Education Experience on New Personnel Duties in the Indonesian National Army's Operating Staff Environment
CN110837976A (en) Intelligent department-selecting and shift-dividing method and system under shift-walking system
CN111539581A (en) Intelligent class scheduling method and system for different shifts
CN110246065A (en) A kind of grouping-hierarchy curricula-variable cource arrangement method
Matias et al. A hybrid genetic algorithm for course scheduling and teaching workload management
Agustín-Blas et al. A hybrid grouping genetic algorithm for assigning students to preferred laboratory groups
CN111091344B (en) Course arrangement method based on mountain climbing algorithm and parallel disturbance mixed search
Barham et al. A simple heuristic to facilitate course timetabling
Hosny et al. A mutation-based genetic algorithm for room and proctor assignment in examination scheduling
Landry et al. Four strategies for driving a university pre-college computing outreach program
CN115330134A (en) Course arrangement method
Hosny A heuristic algorithm for solving the faculty assignment problem
Yang et al. Mathematical modeling and system design of timetabling problem based on improved GA
Newton Teacher evaluation: Focus on outcomes
Hansen et al. Planning of high school examinations in Denmark
Long A genetic algorithm based method for timetabling problems using linguistics of hedge algebra in constraints
Kang et al. Dynamic Matching Mechanism and Matching Stability in College Admissions: Evidence from Inner Mongolia
Wagner-Clarke Through the lens of a “have not.”
Hurmuzi et al. Course Timetabling for Distance Learning Program at SKU Using Genetic Algorithm
Gambhava et al. University Examination Timetabling using Genetic Algorithm
Smith et al. Building Community in a Competitive Undergraduate Program
Esen et al. Career Management in Tourist Guidance

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
GR01 Patent grant
GR01 Patent grant