CN106846193A - The controllable cource arrangement method of constraint granularity and system - Google Patents

The controllable cource arrangement method of constraint granularity and system Download PDF

Info

Publication number
CN106846193A
CN106846193A CN201611220114.2A CN201611220114A CN106846193A CN 106846193 A CN106846193 A CN 106846193A CN 201611220114 A CN201611220114 A CN 201611220114A CN 106846193 A CN106846193 A CN 106846193A
Authority
CN
China
Prior art keywords
class
tuple
row
classroom
optimal
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
Application number
CN201611220114.2A
Other languages
Chinese (zh)
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.)
Henan University of Technology
Original Assignee
Henan University of Technology
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 Henan University of Technology filed Critical Henan University of Technology
Priority to CN201611220114.2A priority Critical patent/CN106846193A/en
Publication of CN106846193A publication Critical patent/CN106846193A/en
Pending legal-status Critical Current

Links

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
    • 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

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention relates to constrain the controllable cource arrangement method of granularity and system, method is:1) free time of calculating class tuple, according to free time, between searching optimal row's class hour;2) in the interior most suitable row's class classroom of calculating of optimal row's class hour, if there is most suitable row's class classroom, the success of class tuple row class;3) clash handle otherwise, is carried out to class tuple, if clash handle success, row's class success, otherwise, by the failure of class tuple row class;4) after class tuple has been traveled through, adjustment constraint granularity return to step 1) to row's class failure class tuple again row's class or manually adjust.System includes automatic curriculum scheduling unit and adjustment unit, and automatic curriculum scheduling unit includes computing module, most suitable row's class classroom computing module and clash handle module between optimal row's class hour;Adjustment unit includes readjusting constraint granularity module or manual regulating module.The present invention can adapt to various row's class constraint granularities nestings, teaching resource complexity and the huge row's class data of teaching task.

Description

The controllable cource arrangement method of constraint granularity and system
Technical field
The invention belongs to teaching management field, and in particular to a kind of controllable cource arrangement method of constraint granularity and system.
Background technology
Existing cource arrangement method, whether artificial row's class or computer automatic curriculum scheduling is all treatment teacher, classroom or field The resource conflict problems such as ground, class.
In university and large-scale middle school, because personnel are extremely more, artificial row's class cannot increasingly be implemented.Must be by automatic curriculum scheduling Algorithm.
Existing automatic curriculum scheduling algorithm, is mainly based upon greedy algorithm, backtracking algorithm, the dynamic rule of rule and constraints Draw method and genetic algorithm etc..But these methods have certain defect.Such as recall algorithm, it is equivalent to pre-reset mechanism, and space is multiple Miscellaneous degree, particularly time complexity are very big.And algorithm is complicated in itself, variable is more, when constraints is too harsh without feasible Solution.Although greedy algorithm time complexity is easier local optimum occur, it is also possible to can not find feasible solution than relatively low. Genetic algorithm needs after generating substantial amounts of initial value again the constantly survival of the fittest, it is necessary to consume substantial amounts of space, without School timetable actively is generated according to condition, there is certain randomness, also cause the waste of plenty of time.
The content of the invention
The controllable cource arrangement method of granularity and system are constrained the invention provides a kind of, to solve existing automatic curriculum scheduling algorithm Complexity is high, efficiency is low and accuracy rate problem not high.
In order to solve the above technical problems, the controllable cource arrangement method of constraint granularity of the invention is:
1) free time of calculating class tuple, when idle between vacant all class hours more than class tuple all class hours, search Between optimal row's class hour;
2) most suitable row's class classroom is calculated in BT between optimal row's class hour, if there is most suitable row's class classroom, class The success of tuple row class;
3) clash handle otherwise, is carried out to class tuple, if clash handle success, class tuple row class success, otherwise, by this Class tuple row class fails;
4) after the completion of all class tuple row's classes, to row's class failure class tuple, adjustment constraint granularity return to step 1) again Row's class is manually adjusted.
Computational methods between optimal row's class hour are comprised the following steps:
A) the property CP that attends class of calculating class tuple, the row's class times N in all class hour CT and a week;
B) the overall situation set in lookup meet attribute (CP, CT, N) class tuple optimal row's class hour between sequence B T '=[(D1, H1), (D2, H2) ..., (DN, HN)], (D1, D2 ..., DN) is one week optimal sequence of interior number of days of attending class, (H1, H2 ..., HN) It is the optimal sequence of joint number of being attended class in a day;
C) if timeslice (D1, H1) was included in free time, calculate under the timeslice, attend class teacher and the class that attends class Time uniform distribution of forces, when time uniform distribution of forces is higher than preset value, then obtain BT=between optimal row's class hour (D1, H1), lookup terminates;If timeslice (D1, H1) is not interior at one's leisure or time uniformity coefficient is less than preset value, judge next Between whether timeslice is optimal row's class hour.
The computational methods in most suitable row's class classroom are comprised the following steps:
A) the school district CA that attends class of calculating class tuple, attend class the classroom Type C L and classroom size CS that attends class;
B) the classroom list for meeting class tuple attributes (CA, CL, CS) is searched, highest priority is chosen from the list of classroom Classroom, calculates the free time table attended class initial week in of the classroom in class tuple, when idle between table and optimal row's class hour Between being equal to optimal row's class hour after logical AND, then the classroom is most reasonably to attend class classroom, otherwise, judge next classroom whether be Most reasonably attend class classroom.
Step 3) in the method that class tuple carries out clash handle is comprised the following steps:
I) the class tuple press-in storehouse of clash handle will be needed, and searches the related class tuple of the class tuple, by related class Tuple is according to priority added to queue Queue from low to high, and it is related class tuple that record needs the class tuple of clash handle Father's class tuple;
II) the first class tuple in queue Queue is taken, row's class again is carried out, the success of row's class is carried out to his father's class tuple Reset, the success of row's class, then clash handle success;Otherwise, the related class tuple of first class tuple is added into queue Queue, by first class Unit's ejection queue is simultaneously pressed into storehouse;
Ш) repeat step II), when father's class tuple is popped and is reset successfully, then clash handle success.
The original input data includes global setting, class's information, classroom information, teacher's information, class tuple information, class Journey information, classroom constraint, teacher's constraint and the constraint of class tuple.
The controllable Course Arrangement of constraint granularity of the invention includes automatic curriculum scheduling unit and adjustment unit, the automatic curriculum scheduling Unit includes computing module, most suitable row's class classroom computing module, clash handle module between optimal row's class hour;The adjustment unit Including readjusting constraint granularity module or manual regulating module;
The automatic curriculum scheduling unit is used for according to priority height and class tuple is sorted, according to original input data, from preferential Level highest class tuple starts to carry out row's class successively;
Computing module is used to calculate free time of class tuple between optimal row's class hour, when idle between vacant all classes When more than class tuple all class hours, between searching optimal row's class hour;
Most suitable row's class classroom computing module is used to calculate most suitable row's class religion in BT between optimal row's class hour Room;
The clash handle module is used to carry out clash handle to class tuple.
The computational methods of computing module are comprised the following steps between optimal row's class hour:
A) the property CP that attends class of calculating class tuple, the row's class times N in all class hour CT and a week;
B) the overall situation set in lookup meet attribute (CP, CT, N) class tuple optimal row's class hour between sequence B T '=[(D1, H1), (D2, H2) ..., (DN, HN)], (D1, D2 ..., DN) is one week optimal sequence of interior number of days of attending class, (H1, H2 ..., HN) It is the optimal sequence of joint number of being attended class in a day;
C) if timeslice (D1, H1) was included in free time, calculate under the timeslice, attend class teacher and the class that attends class Time uniform distribution of forces, when time uniform distribution of forces is higher than preset value, then obtain BT=between optimal row's class hour (D1, H1), lookup terminates;If timeslice (D1, H1) is not interior at one's leisure or time uniformity coefficient is less than preset value, judge next Between whether timeslice is optimal row's class hour.
The computational methods of most suitable row's class classroom computing module are comprised the following steps:
A) the school district CA that attends class of calculating class tuple, attend class the classroom Type C L and classroom size CS that attends class;
B) the classroom list for meeting class tuple attributes (CA, CL, CS) is searched, highest priority is chosen from the list of classroom Classroom, calculates the free time table attended class initial week in of the classroom in class tuple, when idle between table and optimal row's class hour Between being equal to optimal row's class hour after logical AND, then the classroom is most reasonably to attend class classroom, otherwise, judge next classroom whether be Most reasonably attend class classroom.
The clash handle module is comprised the following steps to the method that class tuple carries out clash handle:
I) the class tuple press-in storehouse of clash handle will be needed, and searches the related class tuple of the class tuple, by related class Tuple is according to priority added to queue Queue from low to high, and it is related class tuple that record needs the class tuple of clash handle Father's class tuple;
II) the first class tuple in queue Queue is taken, row's class again is carried out, the success of row's class is carried out to his father's class tuple Reset, the success of row's class, then clash handle success;Otherwise, the related class tuple of first class tuple is added into queue Queue, by first class Unit's ejection queue is simultaneously pressed into storehouse;
Ш) repeat step II), when father's class tuple is popped and is reset successfully, then clash handle success.
Cource arrangement method of the invention and system generate the optimal class under ideal constraints by automatic curriculum scheduling module first Table, subsequently into adjusting module, does not arrange class tuple reason and points out by analysis manually to school timetable or Course Arrangement, adjusts again Whole constraints, calling automatic curriculum scheduling module not arrange class tuple to residue again carries out row's class of a new round, with this successive ignition, Ultimately generate the interaction optimizing school timetable under various constraintss nesting.The method of the present invention and system can adapt to various row's classes Constraint granularity is nested, and teaching resource is complicated and the huge row's class data of teaching task, and the row's of improve class efficiency and standard True rate, reduces computation complexity.
Brief description of the drawings
Fig. 1 is interaction optimizing timetabling algorithm general flow chart of the present invention;
Fig. 2 is automatic curriculum scheduling block flow diagram of the present invention;
Fig. 3 is that the present invention calculates optimal row's class time flow chart;
Fig. 4 calculates classroom flow chart of most reasonably attending class for the present invention;
Fig. 5 is present invention treatment collision algorithm flow chart;
Fig. 6 (a) is the related class tuple of trees that class tuple A of the present invention is root node;
Fig. 6 (b) is the state diagram of Queue of the present invention and Stack.
Specific embodiment
Technical scheme is further described in detail below in conjunction with the accompanying drawings.
Formulation is carried out to school timetable first.
1st, class tuple:Class tuple is each teaching task for opening up of teaching unit in term, and here is the structure class of class tuple Type is defined:
{ teacher gathers CT=, class's set, course number, starting week, all class hours, number of attending class, class tuple priority, class Cheng Xingzhi, if be reinforcing week mark, total class hour, institute of giving a course, school district of attending class, classroom requirement of attending class, the class period requires, peace Row classroom, arranges the time }
2nd, related class tuple:If A, B are the row's for the treatment of class tuples, if A is related class tuple to B, A and B has following relation:
If 1)Then A is that teacher is related to B.
If 2)Then A is that class is related to B.
If 3)Then A and B is time correlation.
3rd, class tuple priority:If A, B are the row's for the treatment of class tuples, then the priority relationship of A and B is as follows:
(1) if class tuple A is all classes of reinforcing, B is not all classes of reinforcing, then A is preferential.If A and B all for all classes of reinforcing or It is not all classes of reinforcing, then according to (2).
(2) if the class tuple precedence field in class tuple A is more than the class tuple precedence field in class tuple B, A is excellent First.If being equal to, according to (3)
(3) if first priority level of teacher given in class tuple A is more than first teacher given in class tuple B Level priorities not, then A is preferential.If being equal to, according to (4)
(4) if class's number of being attended class in class tuple A is for Aclass, course types are Acourse, all class hour number Acourse_ Time, attend class teacher number Ateache, and class's number of row's class is Bclass in class tuple B, and course types are Bcourse, all classes When number Bcourse_time, attend class teacher number Bteacher, then by the overall situation set in default coefficient c1, c2, c3, c4 calculate Go out F1 and F2, computing formula is as follows:
If F1 is more than or equal to F2, A is preferential, and otherwise B is preferential.
4th, timeslice and space-time piece:A certain big section in one week is referred to as timeslice.Each timeslice and the timeslice Corresponding place referred to as space-time piece of attending class.
5th, timetable:For the row's of raising class efficiency, timetable binary representation, 3 integer representation of Int types one week Interior free time, wherein every two binary representations, one timeslice, " 11 " represent idle, and " 00 " represents busy.In addition, Low 28 binary systems that 3 integers only take each integer are significance bit, then 3 integers can represent altogether (3*28)/2=42 Individual timeslice.
Row's class is carried out in units of class tuple, the essence of row's class be for each class tuple arranges the space-time piece that it attends class, But each class tuple may need to arrange for multiple space-time pieces.Have to meet some constraintss during row's class, claim Be row's class constraint, row's class constraint be divided into hard constraint and soft-constraint.The condition that wherein hard constraint representative must is fulfilled for, and soft-constraint It is the hommization in order that school timetable more rationalizes.
During row's class have to meet hard constraint be:
1) each class can only go up a subject in piece at the same time.
2) each teacher can only go up a subject in piece at the same time.
3) in each space-time piece, the capacity in place of attending class have to be larger than the number of attending class.
4) time interval between continuous two timeslices changes the time in classroom more than class.
5) time interval between continuous two timeslices changes the time in classroom more than teacher.
6) a class tuple comprising multiple attend class class when, the space-time piece that the class tuple is arranged each class should one Cause.
7) class hour in several bottom classes of class point, the school timetable of each bottom class can not conflict with corresponding class's school timetable.
During row's class, in order that school timetable is more reasonable, more optimize, there is provided soft-constraint, soft-constraint include teacher's constraint, Classroom constraint, course constraint and the constraint of class tuple.
Teacher's constraint includes:
1) teacher tries one's best class period piece, and teacher tries one's best and has no class timeslice and teacher necessarily has no class timeslice (its In each timeslice which big section in which week can be accurate to).
2) each teacher total class hour upper limit attended class weekly.
3) the class period piece in a week of teacher is tried one's best and is evenly distributed.
4) trying one's best makes teacher be attended class in same classroom between continuous two timeslices.
Classroom constraint includes:
1) classroom is tried one's best class period piece, and classroom is tried one's best and has no class timeslice and classroom is necessarily had no class timeslice (its In each timeslice which big section in which week can be accurate to).
2) classroom is tried one's best the classroom of the institute of giving a course for being arranged in class tuple.
3) in same timeslice, classroom capacity is more than number of attending class and as far as possible close to number of attending class.
Course constraint includes:
1) course is tried one's best class period piece, and course is tried one's best and has no class timeslice and course is necessarily had no class timeslice (its In each timeslice which big section in which week can be accurate to).
2) class more than the comparing that beats one's brains, is arranged in the morning as far as possible, and physical education should not be arranged in the section greatly of the morning first, must Repair class and try one's best and be arranged in daytime, elective course tries one's best arrangement at night.
The constraint of class tuple includes:
1) for needing to arrange for the class tuple of two or more space-time pieces in one week, each space-time piece of class tuple it Between as far as possible have certain time interval.
2) be for all class hours odd number class tuple, it should divide the Dan Shuanzhou to carry out row's class as far as possible.
3) also there is field study for some existing Theory Courses of class tuple, it should allow Theory Course to replace peace with field study as far as possible Row, and Theory Course is first gone up, then upper field study, replaced with this.
4) a part class requirement for platoon multiple timeslice of tuple should as far as possible be met.
The controllable cource arrangement method embodiment of constraint granularity of the invention
Based on above-mentioned basic conception, the cource arrangement method of the present embodiment is that according to priority height sorts to class tuple, according to first Beginning input data, carries out row's class, as shown in Figure 2 successively since the class tuple of highest priority:
1) free time of calculating class tuple, when idle between vacant all class hours more than class tuple all class hours, search Between optimal row's class hour;
2) most suitable row's class classroom is calculated in BT between optimal row's class hour, if there is most suitable row's class classroom, class The success of tuple row class;
3) clash handle otherwise, is carried out to class tuple, if clash handle success, the success of class tuple row class, otherwise, row's class Failure, row's class failure class tuple sequence is added by the class tuple;
4) after the completion of all class tuple row's classes, to row's class failure class tuple, adjustment constraint granularity return to step 1) again Row's class is manually adjusted.
Above-mentioned each step is described in detail below:
Original input data includes that (overall situation is set, class's information, teacher's information, teacher's constraint, curriculum information, and course is about Beam, classroom information, classroom constraint, class tuple information, the constraint of class tuple).
At the end of automatic curriculum scheduling, if the class tuple that can not be arranged without residue, manual regulating module is performed.If The class tuple that residue can not be arranged, may be selected to perform manual regulating module, also may be selected to readjust constraint granularity module, call The class tuple that automatic curriculum scheduling module arrangement residue can not be arranged;Finally, data outputting module is performed, output data includes teacher's class Table, class's school timetable, course school timetable, room schedule.
Need to be arranged class tuple-set and be denoted as CourseTuple={ Cr | Cr is the variable of CT, and CT is class tuple type }, It is assumed that with Constrait=C | and C be teacher constrain, course constraint, classroom constraint or class tuple constraint description row's class constraint set Close, the classroom sets for participating in row's class, timeslice set is denoted as Room={ R | R is to be needed to be arranged classroom }, Time=T | T is It is all to arrange timeslice }.Then F (CourseTuple, Classroom, Time) → CourseTable is defined as generating school timetable Function, the school timetable of generation is denoted as CourseTable.It is reasonable that W (CourseTable, Constrait) is defined as measurement school timetable The canonical function of degree, then obtain most rational school timetable, then need to obtain school timetable X, it is had following relation:
W (X, Constrait) >=Max { W (CourseTablej, Constrait) } wherein CourseTablej∈ CourseTable, j=1,2,3...
By analyze F (CourseTuple, Classroom, Time) → CourseTable and W (CourseTable, Constrait) function, is not difficult to find out, when input value class tuple-set CourseTuple is fixed with constraint set Constrait When, influence school timetable quality is Classroom, Time variables.So when the problem of row's class also just is simplified to search most suitable Null set, automatic curriculum scheduling process mainly includes three parts:
1st, optimal class period piece set BT is searched.
By curriculum character, the row's class times N in course week class hour, a week and teacher's wish of attending class between optimal row's class hour The Effects of Factors that can be represented with data structure such as between row's class hour, while in view of the class period point of attend class teacher and the class that attends class Cloth situation etc. can not use the Effects of Factors of machine description, and comprehensive all factors can just find optimal class period piece set BT. In the process, its key issue is how preferably to represent and calculating is attended class teacher, the common free time of the class that attends class.For Make that timetabling algorithm is in hgher efficiency, autgmentability is stronger, timetabling algorithm has used the data structure of brand-new expression time (newStruct), rather than the traditional time representation (oldStruct) of use.Here is two kinds of contrasts of data structure:
Assuming that having in a term one n weeks, attend class altogether m days within one week, the big sections of k of attending class altogether for a day.
(1) oldStruct is that such as 12 represent the second largest section on Monday using the array representation class period of one week, Then to represent the time in a term to need space complexity is M (n*m*k).And to obtain x class within a term Common vacant timetable, then the time complexity for needing is at least O (n*m*k*x).In addition, when deletion or increasing a time It is necessary to delete an element from array during piece, then time complexity is exactly O (L), wherein L is array length.
(2) time that newStruct is attended class for one week using the integer representation of 3 int types, wherein 3 integer binary forms Low 28 of each integer are effective, and every two binary representations, one timeslice namely big sections when showing, then Represent that timeslice is idle with " 11 ", " 00 " represents that timeslice is busy.It can be seen that representing the timetable in halves with newStruct Space complexity be M (n*3).Calculate x class common vacant timetable within a term, it is only necessary to which the time is carried out Logic "and" operation, its time complexity is O (n*3).In addition, when deleting or increasing a timeslice, as long as entering to the time Row logical "and" or logical "or" computing, time complexity used are O (1).
Obviously, when m and k increases, newStruct time complexities are unaffected with space complexity, and traditional The Space-time Complexity of data structure is doubled and redoubled.Additionally, class hour is arranged according to half timeslice (trifle) when school is in need, because One timeslice of expression of newStruct two, it is all to do any change and can just fully meet, and oldStruct needs Again 2 times of Space-time Complexity is extended, this has absolutely proved that newStruct has stronger autgmentability.
Fig. 3 gives a kind of embodiment calculated between optimal row's class hour.First, the property CP that attends class of calculating class tuple, All class hour CT and the row's class times N in a week;Then, searched in the overall situation is set and meet the optimal of the class tuple attributes and attend class Its sequence (D1, D2 ..., DN) and optimal section time sequence (H1, H2 ..., HN);If optimal day sequence and optimal section order are classified as Sky, then return to NULL, between can not find optimal row's class hour, optimal day sequence and optimal section time sequence otherwise is assembled into N number of time Piece (D1, H1), (D2, H2) ..., (DN, HN) calculates BT between optimal row's class hour;Then, BT is carried out with free time table T Logic "and" operation, if BT is not interior at one's leisure, between recalculating next suboptimum row's class hour, otherwise calculates addition BT After class period, the time uniform distribution of forces of attend class teacher and the class that attends class, if uniform distribution of forces is less than minimum predetermined value, Between then recalculating next suboptimum row's class hour, BT between optimal row's class hour is otherwise returned.
2nd, search in optimal row's class timeslice BT, the most suitable classroom sets BR that attends class.
The selection in classroom is attended class school district, classroom type, number of attending class, institute of giving a course, and teacher and class and BT The influence of the factors such as the classroom of attending class in adjacent timeslice.In order to further improve timetabling algorithm efficiency, by classroom according to upper Class school district, classroom type, 3 attributes of number of attending class carry out classified storage, so can faster navigate to the classroom of needs.So Afterwards, when have found suitable classroom, this classroom is moved on to the afterbody for storing such classroom chained list, consequently, it is possible to work as next time again When needing such classroom, the hit rate for hitting suitable classroom is greatly improved.In order to improve the rationality in classroom of attending class, looking into When looking for classroom, first look for by school district of attending class, classroom type, 3 attributes of number of attending class carry out the classroom chained list of classified storage Classroom_list, it is necessary to by classroom_list press classroom prioritization, it is specific as follows:
(1) attend class attending class between classroom and the most suitable classroom BR that attends class in teacher and the class timeslice adjacent with BT Distance, distance nearlyer priority it is higher.
(2) give a course institute classroom priority higher than other institutes classroom.
(3) under the premise of classroom capacity classroom_size is more than the number student_number that attends class, | Classroom_size-student_number | smaller priority is higher.
Fig. 4 gives a kind of embodiment for calculating most suitable classroom of attending class.Its main process is:First, calculating class unit The school district of attending class of group, classroom type of attending class, classroom size of attending class;Then, these attributes according to class tuple find and meet class unit The classroom list classroom_list that group is required, and sorted according to classroom priority relationship;Then, in the list of classroom is taken One classroom BR, if BR is sky, returns to NULL, can not find suitable classroom, otherwise calculates the free time table BRT in classroom; BT and BRT carries out logic "and" operation between optimal row's class hour again, if BRT&BT==BT, classroom is moved into classroom_ The afterbody of list, returns to BR, otherwise recalculates next rational classroom.
3rd, when (BT, BR) space-time piece is space-time, backtracking method is called to carry out clash handle (Fig. 5)
It is first node with class tuple A when class tuple A occurs arrangement collision, is with the class tuple that it has arranged correlation Second node layer, wherein the child of same father node is from left to right arranged according to the priority order from small to large of class tuple Row, are then constituted third layer node with the related class tuple of the second node layer in the same way, by that analogy, are constituted with class Tuple A is the related class tuple of trees (such as figure a) of root node.
If queue Queue is made up of related class tuple in trace-back process, while the class tuple of rearrangement will have been recalled Press-in storehouse Stack, the generation of the snowslide of backtracking is prevented by the preset maximum depth value StackDepth of storehouse.
1) class tuple A first, is pressed into storehouse Stack, by related class tuple (B, C, D, the E) enqueue of class tuple A Queue。
2) take head of the queue class tuple B and enter rearrangement, if unsuccessful, by related class tuple (F, the G) enqueue of class tuple B Queue, while class tuple B is ejected queue Queue and being pressed into storehouse Stack, now the state of Queue and Stack is as schemed b institutes Show.
3) by that analogy, when reset Z success, and if Z is not stack bottom class tuple, storehouse Stack continuously pops, until Z Father node Y eject untill, then Y is reset again, if success, then carries out row's class again by the father node of Y, with this Analogize;If rearrangement is unsuccessful, Stack is returned into state when last time class tuple is pressed into, then eject Queue head of the queue classes Tuple continuation backtracking ... ...If class tuple A resets successfully, backtracking terminates.If Queue does not reset successfully for empty and class tuple A, Or the depth of Stack be more than StackDepth when, then backtracking terminate, class tuple A treatment conflict it is unsuccessful.
If the row's for the treatment of class number of tuples is N.Best result is certainly to arrange successfully without clash handle.Worst case Under, each class tuple is needed by backtracking, when starting to recall a certain class tuple A, generates a new empty storehouse Stack, Stack is pressed into by A;No matter recall and whether be related to recall other class tuples during A, what is used is all Same Stack.It is also contemplated that the worst situation, i.e., from Queue toward before often increasing a class tuple in Stack, this Class tuple is all reset successfully, therefore need to enter rearrangement to the father node of the class tuple node in Stack;The worst situation is Each node just has a size child node in Stack, therefore adjacent element is all set membership in Stack;And set except stack bottom Reset outside element and all succeeded, the class number of tuples that need to be reset when so increasing by k-th class tuple in Stack is maximum, be k-1. Therefore class tuple (no matter success or not) is often arranged, the class number of tuples of rearrangement is not more than (StackDepth* (StackDepth-1) it is/2) individual.Therefore, arrange N number of class tuple to consume amount of calculation and will not be more than and N* is arranged in the case of Lothrus apterus The amount of calculation of (StackDepth* (StackDepth-1)/2) individual class tuple.In practice, only be able to can just go out in the later stage of row's class Existing substantial amounts of conflict backtracking, and, the limitation to Stack depth controls the expansion of backtracking well, improves efficiency.
Fig. 5 gives a kind of embodiment for the treatment of collision method.
Here is row's class treatment clash handle illustration:
Such as current class:The school timetable of CLASS67 is as shown in table 1:It can be seen that the timeslice of the section greatly of Thursday first is Through occupied.
The school timetable of the class CLASS67 of table 1
Teacher:The school timetable of T0087 is as shown in table 2:The Tuesday in classroom is also occupied with the timeslice of Thursday.
The school timetable of the teacher T0087 of table 2
Classroom:The school timetable of CR0446 is as shown in table 3:The free time piece in classroom is more.
The school timetable of the classroom CR0446 of table 3
As shown in table 4, existing a branch of instruction in school:Course ID is:COU0122 course names:Food analysis teacher ID: T0087 teachers name:Classroom type is needed for Xiao Han:Multi-media classroom
Table 4
Through calculating the course optimal row's class hour between for Tuesday first greatly section with Thursday first greatly save.And now class Level has with the time of teacher and conflicts, so carrying out clash handle to it.Conflict course (COU0122) is carried out into push operation, As shown in table 5.And correlated curriculum COU1262, COU1082 are carried out into enqueue operations, as shown in table 6, to course COU1262, COU1082 enters rearrangement, and COU0122 is come into the section greatly of Tuesday first if resetting successfully saves greatly with Thursday first.If class Journey COU1082 resets no right times, then COU1082 is carried out into pop down and the course related to COU1082 is joined the team Reset ...
The push operation of table 5
The enqueue operations of table 6
The school timetable for finally giving, as shown in table 7-9:
The class's school timetable of table 7
The room schedule of table 8
The teacher's school timetable of table 9
The controllable Course Arrangement embodiment of constraint granularity of the invention
The present embodiment system includes automatic curriculum scheduling unit and adjustment unit, and the automatic curriculum scheduling unit includes optimal row's class hour Between computing module, most suitable row's class classroom computing module, clash handle module;The adjustment unit includes readjusting constraint grain Degree module or manual regulating module;
The automatic curriculum scheduling unit is used for according to priority height and class tuple is sorted, according to original input data, from preferential Level highest class tuple starts to carry out row's class successively;
Computing module is used to calculate free time of class tuple between optimal row's class hour, when idle between vacant all classes When more than class tuple all class hours, between searching optimal row's class hour;
Most suitable row's class classroom computing module is used in optimal row's class hour interior most suitable row's class classroom of calculating; The clash handle module is used to carry out clash handle to class tuple.
Wherein, row's class flow of automatic curriculum scheduling unit is as shown in Figure 2:First, all class tuples are put into Priority Queues CourseTuple;When Priority Queues is space-time, automatic curriculum scheduling terminates, and otherwise takes head of the queue class tuple A;Then, calculating class tuple A Free time T, according to free time T, find BT (Fig. 3) between optimal row's class hour;Then, calculate within the BT times, most The suitable classroom BR (Fig. 4) that attends class;If (BT, BR) space-time piece is not sky, then class tuple A arranges successfully, to update time and school timetable. Clash handle otherwise is carried out to class tuple A, if treatment conflicts successfully, class tuple A arranges successfully, to update time and school timetable, if Treatment conflict failure, then class tuple A arrange failure, the reason for addition class tuple A can not be arranged;Then, it is class tuple A ejections is preferential Queue, takes next class tuple.
The computational methods of computing module are between optimal row's class hour:
1) the property CP that attends class of calculating class tuple, the row's class times N in all class hour CT and a week;
2) the overall situation set in lookup meet attribute (CP, CT, N) class tuple optimal row's class hour between sequence B T '=[(D1, H1), (D2, H2) ..., (DN, HN)], (D1, D2 ..., DN) is one week optimal sequence of interior number of days of attending class, (H1, H2 ..., HN) It is the optimal sequence of joint number of being attended class in a day;
If 3) timeslice (D1, H1) was included in free time, calculate under the timeslice, attend class teacher and the class that attends class Time uniform distribution of forces, when time uniform distribution of forces is higher than preset value, then obtain BT=between optimal row's class hour (D1, H1), lookup terminates;If timeslice (D1, H1) is not interior at one's leisure or time uniformity coefficient is less than preset value, judge next Between whether timeslice is optimal row's class hour.
The computational methods of most suitable row's class classroom computing module are:
1) the school district CA that attends class of calculating class tuple, attend class the classroom Type C L and classroom size CS that attends class;
2) the classroom list for meeting class tuple attributes (CA, CL, CS) is searched, highest priority is chosen from the list of classroom Classroom, calculates the free time table attended class initial week in of the classroom in class tuple, when idle between table and optimal row's class hour Between being equal to optimal row's class hour after logical AND, then the classroom is most reasonably to attend class classroom, otherwise, judge next classroom whether be Most reasonably attend class classroom.
The method that clash handle module carries out clash handle is:
1) the class tuple press-in storehouse of clash handle will be needed, and searches the related class tuple of the class tuple, by related class Tuple is according to priority added to queue Queue from low to high, and it is related class tuple that record needs the class tuple of clash handle Father's class tuple;
2) the first class tuple in queue Queue is taken, row's class again is carried out, the success of row's class is carried out to his father's class tuple Reset, the success of row's class, then clash handle success;Otherwise, the related class tuple of first class tuple is added into queue Queue, by first class Unit's ejection queue is simultaneously pressed into storehouse;
3) repeat step 2), when father's class tuple is popped and is reset successfully, then clash handle success.
At the end of automatic curriculum scheduling, if the class tuple that can not be arranged without residue, manual regulating module is performed.If The class tuple that residue can not be arranged, may be selected to perform manual regulating module, also may be selected to readjust constraint granularity module, call The class tuple that automatic curriculum scheduling module arrangement residue can not be arranged;Finally, data outputting module is performed, output data includes teacher's class Table, class's school timetable, course school timetable, room schedule.
Specific embodiment is presented above, but the present invention is not limited to described implementation method.Base of the invention This thinking is above-mentioned basic scheme, and for those of ordinary skill in the art, various changes are designed in teaching of the invention The model of shape, formula, parameter simultaneously need not spend creative work.It is right without departing from the principles and spirit of the present invention Change, modification, replacement and the modification that implementation method is carried out are still fallen within protection scope of the present invention.

Claims (9)

1. the controllable cource arrangement method of granularity is constrained, it is characterised in that the method is comprised the following steps:
1) free time of calculating class tuple, when idle between vacant all class hours more than class tuple all class hours, search it is optimal Row's class hour between;
2) most suitable row's class classroom is calculated in BT between optimal row's class hour, if there is most suitable row's class classroom, class tuple The success of row's class;
3) clash handle otherwise, is carried out to class tuple, if clash handle success, class tuple row class success, otherwise, by class unit Group row class failure;
4) after the completion of all class tuple row's classes, to row's class failure class tuple, adjustment constraint granularity return to step 1) row's class again Or manually adjusted.
2. the controllable cource arrangement method of granularity is constrained according to claim 1, it is characterised in that the meter between optimal row's class hour Calculation method is comprised the following steps:
A) the property CP that attends class of calculating class tuple, the row's class times N in all class hour CT and a week;
B) the overall situation set in lookup meet attribute (CP, CT, N) class tuple optimal row's class hour between sequence B T '=[(D1, H1), (D2, H2) ..., (DN, HN)], (D1, D2 ..., DN) is one week optimal sequence of interior number of days of attending class, and (H1, H2 ..., HN) is one The optimal sequence of joint number of being attended class in it;
C) if timeslice (D1, H1) was included in free time, calculate under the timeslice, attend class teacher and attend class class when Between uniform distribution of forces, when time uniform distribution of forces be higher than preset value, then obtain BT=(D1, H1) between optimal row's class hour, look into Look for end;If timeslice (D1, H1) is not interior at one's leisure or time uniformity coefficient is less than preset value, next timeslice is judged Between whether being optimal row's class hour.
3. the controllable cource arrangement method of granularity is constrained according to claim 1, it is characterised in that most suitable row's class classroom Computational methods comprise the following steps:
A) the school district CA that attends class of calculating class tuple, attend class the classroom Type C L and classroom size CS that attends class;
B) the classroom list for meeting class tuple attributes (CA, CL, CS) is searched, the religion of highest priority is chosen from the list of classroom Room, calculates the free time table attended class initial week in of the classroom in class tuple, when idle between patrolled between table and optimal row's class hour Collect with rear equal between optimal row's class hour, then the classroom is classroom of most reasonably attending class, and otherwise, judges whether next classroom is most Rational classroom of attending class.
4. the constraint controllable cource arrangement method of granularity according to claim 1, it is characterised in that step 3) in class tuple is carried out The method of clash handle is comprised the following steps:
I) the class tuple press-in storehouse of clash handle will be needed, and searches the related class tuple of the class tuple, by related class tuple Queue Queue is according to priority added to from low to high, and record needs father's class that the class tuple of clash handle is related class tuple Tuple;
II) the first class tuple in queue Queue is taken, row's class again is carried out, the success of row's class carries out weight to his father's class tuple Row, the success of row's class, then clash handle success;Otherwise, the related class tuple of first class tuple is added into queue Queue, by first class unit Ejection queue is simultaneously pressed into storehouse;
Ш) repeat step II), when father's class tuple is popped and is reset successfully, then clash handle success.
5. the controllable cource arrangement method of granularity is constrained according to claim 1, it is characterised in that the original input data includes Global setting, class's information, classroom information, teacher's information, class tuple information, curriculum information, classroom constraint, teacher's constraint and class Tuple is constrained.
6. the controllable Course Arrangement of granularity is constrained, it is characterised in that the system includes automatic curriculum scheduling unit and adjustment unit, described Automatic curriculum scheduling unit includes computing module, most suitable row's class classroom computing module, clash handle module between optimal row's class hour;It is described Adjustment unit includes readjusting constraint granularity module or manual regulating module;
The automatic curriculum scheduling unit is used for according to priority height and class tuple is sorted, according to original input data, from priority most Class tuple high starts to carry out row's class successively;
Computing module is used to calculate free time of class tuple between optimal row's class hour, when idle between vacant all class hours it is big In all class hours of class tuple, between searching optimal row's class hour;
Most suitable row's class classroom computing module is used to calculate most suitable row's class classroom in BT between optimal row's class hour;
The clash handle module is used to carry out clash handle to class tuple.
7. the controllable Course Arrangement of granularity is constrained according to claim 6, it is characterised in that optimal row's class Time Calculation The computational methods of module are comprised the following steps:
A) the property CP that attends class of calculating class tuple, the row's class times N in all class hour CT and a week;
B) the overall situation set in lookup meet attribute (CP, CT, N) class tuple optimal row's class hour between sequence B T '=[(D1, H1), (D2, H2) ..., (DN, HN)], (D1, D2 ..., DN) is one week optimal sequence of interior number of days of attending class, and (H1, H2 ..., HN) is one The optimal sequence of joint number of being attended class in it;
C) if timeslice (D1, H1) was included in free time, calculate under the timeslice, attend class teacher and attend class class when Between uniform distribution of forces, when time uniform distribution of forces be higher than preset value, then obtain BT=(D1, H1) between optimal row's class hour, look into Look for end;If timeslice (D1, H1) is not interior at one's leisure or time uniformity coefficient is less than preset value, next timeslice is judged Between whether being optimal row's class hour.
8. the controllable Course Arrangement of granularity is constrained according to claim 6, it is characterised in that most suitable row's class classroom The computational methods of computing module are comprised the following steps:
A) the school district CA that attends class of calculating class tuple, attend class the classroom Type C L and classroom size CS that attends class;
B) the classroom list for meeting class tuple attributes (CA, CL, CS) is searched, the religion of highest priority is chosen from the list of classroom Room, calculates the free time table attended class initial week in of the classroom in class tuple, when idle between patrolled between table and optimal row's class hour Collect with rear equal between optimal row's class hour, then the classroom is classroom of most reasonably attending class, and otherwise, judges whether next classroom is most Rational classroom of attending class.
9. the controllable Course Arrangement of granularity is constrained according to claim 6, it is characterised in that the clash handle module is to class The method that tuple carries out clash handle is comprised the following steps:
I) the class tuple press-in storehouse of clash handle will be needed, and searches the related class tuple of the class tuple, by related class tuple Queue Queue is according to priority added to from low to high, and record needs father's class that the class tuple of clash handle is related class tuple Tuple;
II) the first class tuple in queue Queue is taken, row's class again is carried out, the success of row's class carries out weight to his father's class tuple Row, the success of row's class, then clash handle success;Otherwise, the related class tuple of first class tuple is added into queue Queue, by first class unit Ejection queue is simultaneously pressed into storehouse;
Ш) repeat step II), when father's class tuple is popped and is reset successfully, then clash handle success.
CN201611220114.2A 2016-12-26 2016-12-26 The controllable cource arrangement method of constraint granularity and system Pending CN106846193A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611220114.2A CN106846193A (en) 2016-12-26 2016-12-26 The controllable cource arrangement method of constraint granularity and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611220114.2A CN106846193A (en) 2016-12-26 2016-12-26 The controllable cource arrangement method of constraint granularity and system

Publications (1)

Publication Number Publication Date
CN106846193A true CN106846193A (en) 2017-06-13

Family

ID=59137040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611220114.2A Pending CN106846193A (en) 2016-12-26 2016-12-26 The controllable cource arrangement method of constraint granularity and system

Country Status (1)

Country Link
CN (1) CN106846193A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108376381A (en) * 2018-02-22 2018-08-07 河海大学 A kind of multifactor impact Students ' break, changes the time computational methods per capita of building room
CN108830760A (en) * 2018-06-26 2018-11-16 北京师范大学什邡附属外国语中学 A kind of Course Automatic Arranging System and method
CN109102175A (en) * 2018-07-25 2018-12-28 国网宁夏电力有限公司培训中心 A kind of cource arrangement method for training education
CN109801198A (en) * 2019-01-31 2019-05-24 山大鲁能信息科技有限公司 School timetable method for trimming and system
CN109902891A (en) * 2017-12-07 2019-06-18 英业达科技有限公司 The school timetable of immediate feedback adjusts system and method
CN109993423A (en) * 2019-03-22 2019-07-09 深圳市倍思教育科技有限公司 Cource arrangement method, device, computer equipment and storage medium
CN110033239A (en) * 2019-04-16 2019-07-19 暨南大学 Row's test method, device, equipment and medium based on greedy algorithm
CN110490350A (en) * 2018-05-15 2019-11-22 懿谷智能科技(上海)有限公司 A kind of laboratory test waiting management system and method
CN114663075A (en) * 2022-05-25 2022-06-24 正方软件股份有限公司 Time conflict detection method and device, storage medium and electronic equipment
CN115496430A (en) * 2022-11-22 2022-12-20 广东银谷科技股份有限公司 Intelligent teaching management system based on Internet of things
CN117196909A (en) * 2023-11-03 2023-12-08 湖南强智科技发展有限公司 University course arrangement method, system, equipment and medium based on custom classification

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102222155A (en) * 2010-12-14 2011-10-19 贾永鑫 Method for high-efficiency class grouping and course scheduling in multi-restraint condition
CN103996154A (en) * 2014-06-06 2014-08-20 大连海事大学 Human-computer coordination heuristic course arrangement system orientated toward unified teaching resources
CN104462079A (en) * 2013-09-12 2015-03-25 郑州学生宝电子科技有限公司 Method of informationized class-grouping and course-arranging based on weighted optimization algorithm
CN104794666A (en) * 2015-04-30 2015-07-22 重庆大学 Courses arrangement algorithm

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102222155A (en) * 2010-12-14 2011-10-19 贾永鑫 Method for high-efficiency class grouping and course scheduling in multi-restraint condition
CN104462079A (en) * 2013-09-12 2015-03-25 郑州学生宝电子科技有限公司 Method of informationized class-grouping and course-arranging based on weighted optimization algorithm
CN103996154A (en) * 2014-06-06 2014-08-20 大连海事大学 Human-computer coordination heuristic course arrangement system orientated toward unified teaching resources
CN104794666A (en) * 2015-04-30 2015-07-22 重庆大学 Courses arrangement algorithm

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
曹延飞,等: "基于系统分析理论的回溯法在高校排课中的应用", 《科技信息》 *
梁平: "基于数学模型的计算机排课系统算法研究与分析", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
陈本庆,等: "改进型回溯法在高校排课中的应用", 《成都信息工程学院学报》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109902891A (en) * 2017-12-07 2019-06-18 英业达科技有限公司 The school timetable of immediate feedback adjusts system and method
CN108376381B (en) * 2018-02-22 2021-07-27 河海大学 Student class room floor change room per capita time calculation method under influence of multiple factors
CN108376381A (en) * 2018-02-22 2018-08-07 河海大学 A kind of multifactor impact Students ' break, changes the time computational methods per capita of building room
CN110490350A (en) * 2018-05-15 2019-11-22 懿谷智能科技(上海)有限公司 A kind of laboratory test waiting management system and method
CN108830760A (en) * 2018-06-26 2018-11-16 北京师范大学什邡附属外国语中学 A kind of Course Automatic Arranging System and method
CN109102175A (en) * 2018-07-25 2018-12-28 国网宁夏电力有限公司培训中心 A kind of cource arrangement method for training education
CN109801198A (en) * 2019-01-31 2019-05-24 山大鲁能信息科技有限公司 School timetable method for trimming and system
CN109993423A (en) * 2019-03-22 2019-07-09 深圳市倍思教育科技有限公司 Cource arrangement method, device, computer equipment and storage medium
CN110033239A (en) * 2019-04-16 2019-07-19 暨南大学 Row's test method, device, equipment and medium based on greedy algorithm
CN114663075A (en) * 2022-05-25 2022-06-24 正方软件股份有限公司 Time conflict detection method and device, storage medium and electronic equipment
CN115496430A (en) * 2022-11-22 2022-12-20 广东银谷科技股份有限公司 Intelligent teaching management system based on Internet of things
CN117196909A (en) * 2023-11-03 2023-12-08 湖南强智科技发展有限公司 University course arrangement method, system, equipment and medium based on custom classification
CN117196909B (en) * 2023-11-03 2024-04-05 湖南强智科技发展有限公司 University course arrangement method, system, equipment and medium based on custom classification

Similar Documents

Publication Publication Date Title
CN106846193A (en) The controllable cource arrangement method of constraint granularity and system
Müller State-of-the-art in ecosystem theory
CN109800936B (en) Scheduling method based on tree search and electronic device using the same
CN112862380B (en) Project type product assembly workshop personnel scheduling method and device based on hybrid algorithm and storage medium
CN108280159B (en) Method for converting graph database into relational database
CN103996154A (en) Human-computer coordination heuristic course arrangement system orientated toward unified teaching resources
WO2021244583A1 (en) Data cleaning method, apparatus and device, program, and storage medium
CN111737539A (en) Complex report engine method and device
Chu et al. Genetic algorithms vs. tabu search in timetable scheduling
CN115457226A (en) Vector map generation method and device, electronic equipment and readable storage medium
CN104408128B (en) A kind of reading optimization method indexed based on B+ trees asynchronous refresh
CN107515908A (en) A kind of data processing method and device
CN107392489B (en) Education management method based on distributed network
CN108596390B (en) Method for solving vehicle path problem
CN106484899B (en) Column information dynamic loading display method based on scene
CN116011787A (en) Intelligent course arrangement method and device, electronic equipment and computer readable storage medium
CN114124973B (en) Mirror image synchronization method and device for multi-cloud scene
CN109741421A (en) A kind of Dynamic Graph color method based on GPU
CN107451283A (en) The analysis method and device of data
CN111695588B (en) Distributed decision tree learning system based on cloud computing
CN113327058A (en) Comprehensive scheduling method for ordering same equipment process in root tree longitudinal and transverse pre-scheduling manner
CN106227036B (en) A kind of symmetrical discrete event system On-line Control rule reconstructing method
CN112668864A (en) Workshop production scheduling method and system based on lion group algorithm
Aggoun et al. Solving sports scheduling and timetabling problems with constraint programming
CN115130812A (en) Part-level production scheduling method based on forest node segmentation and sequencing

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170613