# Design of Automatic Course Arrangement System for Electronic Engineering Teaching Based on Monte Carlo Genetic Algorithm

Authors: Chun-jiang Shuai
Journal: Security and Communication Networks
 (2021)

---

## Abstract

In order to overcome the problems of convergence and low satisfaction in the traditional course scheduling system, a new Electronic Engineering Teaching Automatic Course Scheduling System based on the Monte Carlo genetic algorithm is proposed in this paper. The overall structure and hardware structure of the course scheduling system are designed. The hardware includes system management, course scheduling information input, course scheduling management, and course schedule query. In the software part, the Monte Carlo genetic algorithm is used to optimize the course scheduling optimization process, and a course scheduling scheme more in line with the needs of students and teachers is obtained. The experimental results show that the Monte Carlo genetic algorithm has higher convergence and higher user satisfaction compared with the traditional genetic algorithm. Therefore, it shows that the performance of the course scheduling system has been effectively improved.


---

## Body

## 1. Introduction

Traditional course scheduling is a tedious and complex work, and the courses of electronic engineering specialty are relatively complex, which increases the difficulty of course scheduling. It is not only necessary to make reasonable organization and arrangement for students, teachers, and curriculum specialty but also under the continuous expansion and development of the scale of Electronic Engineering students every year, the education of electronic engineering specialty becomes tenser and tenser and manual course scheduling cannot meet the teaching status of electronic engineering specialty [1–3]. The use of computer course scheduling has many advantages as follows: it greatly speeds up the information retrieval speed, makes it more convenient to find information, improves the information storage cycle, reduces the use cost, and so on. It reduces the workload of course scheduling in electronic engineering colleges. Teachers and students can query the schedule almost simultaneously of entering the course, which brings great convenience to the teaching of electronic engineering. Therefore, developing an automatic course scheduling system is necessary to manage the course scheduling effectively [4].Education is the basis of developing science and technology and cultivating talents. The continuous development and popularization of information technology make the traditional education model unable to meet the development requirements of today’s society. Schools need to design and develop a set of efficient teaching system according to their own needs. As a key link in teaching management, teaching schedule arrangement often affects the teaching quality and efficiency of electronic engineering specialty. Therefore, designing a good teaching scheduling system is an urgent problem in the teaching management of electronic engineering specialty [5–7].Our contribution includes the following:(1)
This paper proposed a new Electronic Engineering Teaching Automatic Course Scheduling System based on the Monte Carlo genetic algorithm.(2)
The overall structure and hardware structure of the course scheduling system are designed. The hardware includes system management, course scheduling information input, course scheduling management, and course schedule query.(3)
The hardware includes system management, course scheduling information input, course scheduling management, and course schedule query. In the software part, the Monte Carlo genetic algorithm is used to optimize the course scheduling optimization process, and a course scheduling scheme more in line with the needs of students and teachers is obtained.


## 2. Design of Automatic Course Arrangement System for Electronic Engineering Teaching Based on Monte Carlo Genetic Algorithm

The basic constraint of electronic engineering teaching curriculum arrangement is that the course arrangement process must always meet the requirements that must be met. The business of the electronic engineering teaching arranging system mainly includes: system management (including the modification and deletion of administrator information), basic information (classroom, class, teachers, majors, departments, and so on) entry, automatic lesson scheduling (holiday entry modification explanation, lesson scheduling management, and teacher’s class arrangement), and the four main business tasks of the timetable query [8]. The overall structure of the scheduling system is shown in Figure 1.Figure 1
Overall structure of the course scheduling system.Course scheduling information mainly includes the following contents:(1)
Class(2)
Teacher(3)
Course(4)
ClassroomIn order to ensure the security of the course scheduling system and not be logged in by illegal users, the user name and password must be entered in the system login interface. You can enter the system only when the user name and password are the same as those existing in the database. The system will enter the user automatic course scheduling system only when the user name and password are exactly the same as those stored in the database [9–11]. If there is no conflict in each selection process, the course scheduling plan is successful, and then the system will update the database to save the course scheduling data. The overall course scheduling process is shown in Figure 2.Figure 2
Overall course scheduling process.


## 3. System Hardware Design

In the course arrangement design process, the specific situation of electronic engineering teaching and the relative independence of each module are fully considered, and the business analysis and design of the whole educational administration system are carried out to ensure the mutual coordination and independent operation of each business module in the system. According to the actual needs of electronic engineering teaching and the convenience of teaching management, the course scheduling system is divided into four modules: system management, course scheduling information input, course scheduling management, and course schedule query [12].


### 3.1. System Management Module

The system management module structure is shown in Figure3.Figure 3
Structure diagram of system management module.The main functions realized by the system management module are as follows.The user information module is the main function module of the system. The user information includes two submodules: adding and modifying user information and deleting user information.User information includes user code, user name, user authority, and user password.The user code is the unique identification of the user. It is automatically generated by the system and does not need to be entered manually. It is automatically increased by 1 for each additional one. The length of the code is 4 digits [13].The user name needs to be entered manually, and the length is a 10 digit string.User permissions are set by the administrator and are divided into four permissions as follows.The first level is that the administrator has all functions and can modify the permissions of other users, including adding users, deleting users, and modifying user data, and can operate all modules in the system.The second level is that academic administrators can modify their login password, add or delete users, not see user information, enter, modify, and delete course information, class information, department information, classroom information, vacation information, and teacher class comparison information, conduct course scheduling operation, and query classroom schedule and class schedule.The third level is that teachers can change their login password. You cannot add or delete users. You cannot see other people’s information. Only the curriculum query function can see your own curriculum.The fourth level is that students can modify their login password, cannot add or delete users, cannot see other people’s information, only the timetable query function, and can only see the curriculum of the class [14].Exit login module is a function of each system. Its function is to end the operation of the program.


### 3.2. Course Scheduling Information Entry

Course scheduling information entry is the basis of the course scheduling system. Without this module, the timetable cannot be arranged. It is a very important module. Academic administrators manually enter this module before the course scheduling starts every semester.The structure of information input module is shown in Figure4.Figure 4
Structure diagram of information input module.For the system’s security, this module can only be operated by managers and academic administrators, and other personnel have no right to operate.


#### 3.2.1. Entry, Modification, and Deletion of System Information

In order to avoid repeated input and ensure the uniqueness of the code, the system code is automatically generated by the system. The starting code is 001. The system automatically adds 1 for each additional code, and manual input is not required. The possibility of manual input misoperation is reduced.The system name needs to be entered manually. The system sets a maximum of 40 characters, that is, a maximum of 20 Chinese characters.Academic administrators also perform the department deletion function. To ensure the security and consistency of the system, if there is information related to professional courses under the department, the department information cannot be deleted. The department information can be deleted only after the professional information under the department is deleted [15].


#### 3.2.2. Input and Modification of Electronic Engineering Professional Information

Professional information includes department, professional code, and professional name.The department is selected and entered. It can only be selected from the entered department information and cannot be entered manually.The major code does not need to be entered manually. The major code is automatically generated. After selecting the department, the department code is taken as the first major code, and then automatically 1 is added to the class code from 001. For example, if the department code is 002, the first major code newly added to the department is 002001, the second is 002002, and so on.The specialty name needs to be entered manually. The maximum specialty name set by the system is 40 characters, that is, 20 Chinese characters at most.Professional information can be deleted only when there is no class information and teacher information under the major. Otherwise, the class information and teacher information under the major must be deleted before the professional information can be deleted.


#### 3.2.3. Class Information Entry, Modification, and Deletion

Class information includes major, class code, class name, and class number.The specialty does not need to be entered manually. It must be selected from the entered specialty information.After selecting the class information, the class code will be automatically generated. The class code also does not need to be entered manually. The generation rule of class code is to take the professional code plus the class code. The class code starts with 001 and automatically adds 1 for each additional class code. For example, for a class code with professional code 001002, the first class code is 001002001, the second class code is 001002002, and so on.


#### 3.2.4. Entry, Modification, and Deletion of Teacher Information

Teacher information includes their major, teacher code, teacher name, contact number, and teacher status.The specialty does not need to be entered manually but must be selected from the entered specialty information.After selecting a major, the system will automatically generate a teacher code, and the teacher code does not need to be entered manually. The generation rule of teacher code is to take the professional code plus teacher code. Considering that there are many teachers in each school, the starting code is set to 0001 without adding a code plus 1. For example, if the professional code is 003001, the first teacher code is 003001001, the second is 003001002, and so on.


#### 3.2.5. Classroom Information Entry, Modification, and Deletion

Classroom information includes classroom code, classroom name, classroom type, number of classroom seats, and classroom status.The classroom code does not need to be entered manually. The system automatically generates it. The starting code is 0001, and then 1 will be added automatically to avoid the problem of repeated entry.The name of the classroom needs to be entered manually. Academic administrators can choose their own name according to the information of the teaching building.Classroom type also needs manual input, which is an indispensable element for course scheduling. In order to meet the requirements of various courses, it can be divided into ordinary classroom, special classroom, laboratory, computer room, and so on.The number of classroom seats should be entered manually, and the academic staff should enter it according to the actual classroom size. This is also very important, which is related to whether the number of classes scheduled can be accommodated.The status of the classroom also needs to be entered manually. It can be divided into deactivated and available statuses, available as 1 and deactivated as 2. For example, the classroom is under decoration and other abnormal statuses.


#### 3.2.6. Input and Modification of Course Information of Electronic Specialty

Course information includes code information, course name, classroom type, and course hours.The course code does not need to be entered manually but is automatically generated by the system. The generation rule is that the starting code is 00001, and then 1 is automatically added in the future, ensuring the code’s uniqueness.The course name needs to be entered manually. Academic administrators enter it according to the actual course name.Teacher types do not need to be entered manually. Educational administrators can select and enter according to the classroom types entered in the classroom information. Those not in the classroom types cannot be entered manually.Course hours are also the main part of course scheduling. Academic administrators enter the system according to the total hours of the course in each semester.For deleting a course, if the academic administrator thinks that the course is entered incorrectly or there are no courses available, if the course has been scheduled, the operation will not succeed. Similarly, the system will prompt whether to confirm in order to avoid misoperation. If you confirm, the operation will succeed; otherwise, the operation will fail.


### 3.3. Course Arrangement Management

The main functions of this module are as follows: adding, modifying, and deleting holiday information and classroom class comparison table and completing the automatic course scheduling process.In order to ensure the security of the system, only administrators and educational administrators can view and operate the module, and other personnel cannot execute it.


#### 3.3.1. Adding, Modifying, and Deleting Holiday Information

Leave information includes leave code, leave date, and leave description.Leave code does not need to be entered manually. The system automatically generates it. The starting code is 0001, and then 1 will be added automatically.Holiday date is entered manually and is date type data, excluding Saturday and Sunday. Saturday and Sunday are automatically set as rest days.Leave description is mainly used to specify the reasons for leave and some remarks.After deleting the leave, you must reschedule the class; otherwise, the previously entered leave will not be scheduled.


#### 3.3.2. Add, Modify, and Delete Teacher Class Cross Reference Table

The teacher class comparison table is a key table of the system. The main function of the table is to assign teachers and their corresponding courses to each class. It occupies a dominant position in the course scheduling system.The teacher code does not need to be entered manually but must be selected from the teacher ID in the teacher information entered in the teacher information table to ensure one-to-one correspondence with the teacher information table and avoid repeated entry and misoperation.


#### 3.3.3. Start Arranging Classes

This is the key to course scheduling and the main direction of this system research.This part is a module in which the academic administrators automatically generate the timetable after entering the previous basic information.This module is mainly used to enter the start schedule date, the start date of each semester, and then the end date, that is, the end date of each semester. Then, click start course scheduling to generate a new course schedule. If the entered conditions are reasonable, you will be prompted to complete the course scheduling. Otherwise, the results that do not meet the conditions will be given, such as insufficient teachers, insufficient classroom resources, and too many courses.


### 3.4. Timetable Query

The main functions of this module are teachers’ timetable query and students’ timetable query.


#### 3.4.1. Teacher’s Schedule Query

This module is mainly to query the curriculum of each teacher.Only administrators, academic administrators, and teachers have the authority to query teachers’ curriculum, and teachers can only view their own curriculum, not others’ curriculum.Administrators and educational administrators can query by teacher name, date, department, specialty, and other combinations.Teachers can only query their curriculum by date.


#### 3.4.2. Student Timetable Query

This module is mainly to query the curriculum of each class.Everyone can see this module. You can query the timetable by date, department, major, and class.


## 3.1. System Management Module

The system management module structure is shown in Figure3.Figure 3
Structure diagram of system management module.The main functions realized by the system management module are as follows.The user information module is the main function module of the system. The user information includes two submodules: adding and modifying user information and deleting user information.User information includes user code, user name, user authority, and user password.The user code is the unique identification of the user. It is automatically generated by the system and does not need to be entered manually. It is automatically increased by 1 for each additional one. The length of the code is 4 digits [13].The user name needs to be entered manually, and the length is a 10 digit string.User permissions are set by the administrator and are divided into four permissions as follows.The first level is that the administrator has all functions and can modify the permissions of other users, including adding users, deleting users, and modifying user data, and can operate all modules in the system.The second level is that academic administrators can modify their login password, add or delete users, not see user information, enter, modify, and delete course information, class information, department information, classroom information, vacation information, and teacher class comparison information, conduct course scheduling operation, and query classroom schedule and class schedule.The third level is that teachers can change their login password. You cannot add or delete users. You cannot see other people’s information. Only the curriculum query function can see your own curriculum.The fourth level is that students can modify their login password, cannot add or delete users, cannot see other people’s information, only the timetable query function, and can only see the curriculum of the class [14].Exit login module is a function of each system. Its function is to end the operation of the program.


## 3.2. Course Scheduling Information Entry

Course scheduling information entry is the basis of the course scheduling system. Without this module, the timetable cannot be arranged. It is a very important module. Academic administrators manually enter this module before the course scheduling starts every semester.The structure of information input module is shown in Figure4.Figure 4
Structure diagram of information input module.For the system’s security, this module can only be operated by managers and academic administrators, and other personnel have no right to operate.


### 3.2.1. Entry, Modification, and Deletion of System Information

In order to avoid repeated input and ensure the uniqueness of the code, the system code is automatically generated by the system. The starting code is 001. The system automatically adds 1 for each additional code, and manual input is not required. The possibility of manual input misoperation is reduced.The system name needs to be entered manually. The system sets a maximum of 40 characters, that is, a maximum of 20 Chinese characters.Academic administrators also perform the department deletion function. To ensure the security and consistency of the system, if there is information related to professional courses under the department, the department information cannot be deleted. The department information can be deleted only after the professional information under the department is deleted [15].


### 3.2.2. Input and Modification of Electronic Engineering Professional Information

Professional information includes department, professional code, and professional name.The department is selected and entered. It can only be selected from the entered department information and cannot be entered manually.The major code does not need to be entered manually. The major code is automatically generated. After selecting the department, the department code is taken as the first major code, and then automatically 1 is added to the class code from 001. For example, if the department code is 002, the first major code newly added to the department is 002001, the second is 002002, and so on.The specialty name needs to be entered manually. The maximum specialty name set by the system is 40 characters, that is, 20 Chinese characters at most.Professional information can be deleted only when there is no class information and teacher information under the major. Otherwise, the class information and teacher information under the major must be deleted before the professional information can be deleted.


### 3.2.3. Class Information Entry, Modification, and Deletion

Class information includes major, class code, class name, and class number.The specialty does not need to be entered manually. It must be selected from the entered specialty information.After selecting the class information, the class code will be automatically generated. The class code also does not need to be entered manually. The generation rule of class code is to take the professional code plus the class code. The class code starts with 001 and automatically adds 1 for each additional class code. For example, for a class code with professional code 001002, the first class code is 001002001, the second class code is 001002002, and so on.


### 3.2.4. Entry, Modification, and Deletion of Teacher Information

Teacher information includes their major, teacher code, teacher name, contact number, and teacher status.The specialty does not need to be entered manually but must be selected from the entered specialty information.After selecting a major, the system will automatically generate a teacher code, and the teacher code does not need to be entered manually. The generation rule of teacher code is to take the professional code plus teacher code. Considering that there are many teachers in each school, the starting code is set to 0001 without adding a code plus 1. For example, if the professional code is 003001, the first teacher code is 003001001, the second is 003001002, and so on.


### 3.2.5. Classroom Information Entry, Modification, and Deletion

Classroom information includes classroom code, classroom name, classroom type, number of classroom seats, and classroom status.The classroom code does not need to be entered manually. The system automatically generates it. The starting code is 0001, and then 1 will be added automatically to avoid the problem of repeated entry.The name of the classroom needs to be entered manually. Academic administrators can choose their own name according to the information of the teaching building.Classroom type also needs manual input, which is an indispensable element for course scheduling. In order to meet the requirements of various courses, it can be divided into ordinary classroom, special classroom, laboratory, computer room, and so on.The number of classroom seats should be entered manually, and the academic staff should enter it according to the actual classroom size. This is also very important, which is related to whether the number of classes scheduled can be accommodated.The status of the classroom also needs to be entered manually. It can be divided into deactivated and available statuses, available as 1 and deactivated as 2. For example, the classroom is under decoration and other abnormal statuses.


### 3.2.6. Input and Modification of Course Information of Electronic Specialty

Course information includes code information, course name, classroom type, and course hours.The course code does not need to be entered manually but is automatically generated by the system. The generation rule is that the starting code is 00001, and then 1 is automatically added in the future, ensuring the code’s uniqueness.The course name needs to be entered manually. Academic administrators enter it according to the actual course name.Teacher types do not need to be entered manually. Educational administrators can select and enter according to the classroom types entered in the classroom information. Those not in the classroom types cannot be entered manually.Course hours are also the main part of course scheduling. Academic administrators enter the system according to the total hours of the course in each semester.For deleting a course, if the academic administrator thinks that the course is entered incorrectly or there are no courses available, if the course has been scheduled, the operation will not succeed. Similarly, the system will prompt whether to confirm in order to avoid misoperation. If you confirm, the operation will succeed; otherwise, the operation will fail.


## 3.2.1. Entry, Modification, and Deletion of System Information

In order to avoid repeated input and ensure the uniqueness of the code, the system code is automatically generated by the system. The starting code is 001. The system automatically adds 1 for each additional code, and manual input is not required. The possibility of manual input misoperation is reduced.The system name needs to be entered manually. The system sets a maximum of 40 characters, that is, a maximum of 20 Chinese characters.Academic administrators also perform the department deletion function. To ensure the security and consistency of the system, if there is information related to professional courses under the department, the department information cannot be deleted. The department information can be deleted only after the professional information under the department is deleted [15].


## 3.2.2. Input and Modification of Electronic Engineering Professional Information

Professional information includes department, professional code, and professional name.The department is selected and entered. It can only be selected from the entered department information and cannot be entered manually.The major code does not need to be entered manually. The major code is automatically generated. After selecting the department, the department code is taken as the first major code, and then automatically 1 is added to the class code from 001. For example, if the department code is 002, the first major code newly added to the department is 002001, the second is 002002, and so on.The specialty name needs to be entered manually. The maximum specialty name set by the system is 40 characters, that is, 20 Chinese characters at most.Professional information can be deleted only when there is no class information and teacher information under the major. Otherwise, the class information and teacher information under the major must be deleted before the professional information can be deleted.


## 3.2.3. Class Information Entry, Modification, and Deletion

Class information includes major, class code, class name, and class number.The specialty does not need to be entered manually. It must be selected from the entered specialty information.After selecting the class information, the class code will be automatically generated. The class code also does not need to be entered manually. The generation rule of class code is to take the professional code plus the class code. The class code starts with 001 and automatically adds 1 for each additional class code. For example, for a class code with professional code 001002, the first class code is 001002001, the second class code is 001002002, and so on.


## 3.2.4. Entry, Modification, and Deletion of Teacher Information

Teacher information includes their major, teacher code, teacher name, contact number, and teacher status.The specialty does not need to be entered manually but must be selected from the entered specialty information.After selecting a major, the system will automatically generate a teacher code, and the teacher code does not need to be entered manually. The generation rule of teacher code is to take the professional code plus teacher code. Considering that there are many teachers in each school, the starting code is set to 0001 without adding a code plus 1. For example, if the professional code is 003001, the first teacher code is 003001001, the second is 003001002, and so on.


## 3.2.5. Classroom Information Entry, Modification, and Deletion

Classroom information includes classroom code, classroom name, classroom type, number of classroom seats, and classroom status.The classroom code does not need to be entered manually. The system automatically generates it. The starting code is 0001, and then 1 will be added automatically to avoid the problem of repeated entry.The name of the classroom needs to be entered manually. Academic administrators can choose their own name according to the information of the teaching building.Classroom type also needs manual input, which is an indispensable element for course scheduling. In order to meet the requirements of various courses, it can be divided into ordinary classroom, special classroom, laboratory, computer room, and so on.The number of classroom seats should be entered manually, and the academic staff should enter it according to the actual classroom size. This is also very important, which is related to whether the number of classes scheduled can be accommodated.The status of the classroom also needs to be entered manually. It can be divided into deactivated and available statuses, available as 1 and deactivated as 2. For example, the classroom is under decoration and other abnormal statuses.


## 3.2.6. Input and Modification of Course Information of Electronic Specialty

Course information includes code information, course name, classroom type, and course hours.The course code does not need to be entered manually but is automatically generated by the system. The generation rule is that the starting code is 00001, and then 1 is automatically added in the future, ensuring the code’s uniqueness.The course name needs to be entered manually. Academic administrators enter it according to the actual course name.Teacher types do not need to be entered manually. Educational administrators can select and enter according to the classroom types entered in the classroom information. Those not in the classroom types cannot be entered manually.Course hours are also the main part of course scheduling. Academic administrators enter the system according to the total hours of the course in each semester.For deleting a course, if the academic administrator thinks that the course is entered incorrectly or there are no courses available, if the course has been scheduled, the operation will not succeed. Similarly, the system will prompt whether to confirm in order to avoid misoperation. If you confirm, the operation will succeed; otherwise, the operation will fail.


## 3.3. Course Arrangement Management

The main functions of this module are as follows: adding, modifying, and deleting holiday information and classroom class comparison table and completing the automatic course scheduling process.In order to ensure the security of the system, only administrators and educational administrators can view and operate the module, and other personnel cannot execute it.


### 3.3.1. Adding, Modifying, and Deleting Holiday Information

Leave information includes leave code, leave date, and leave description.Leave code does not need to be entered manually. The system automatically generates it. The starting code is 0001, and then 1 will be added automatically.Holiday date is entered manually and is date type data, excluding Saturday and Sunday. Saturday and Sunday are automatically set as rest days.Leave description is mainly used to specify the reasons for leave and some remarks.After deleting the leave, you must reschedule the class; otherwise, the previously entered leave will not be scheduled.


### 3.3.2. Add, Modify, and Delete Teacher Class Cross Reference Table

The teacher class comparison table is a key table of the system. The main function of the table is to assign teachers and their corresponding courses to each class. It occupies a dominant position in the course scheduling system.The teacher code does not need to be entered manually but must be selected from the teacher ID in the teacher information entered in the teacher information table to ensure one-to-one correspondence with the teacher information table and avoid repeated entry and misoperation.


### 3.3.3. Start Arranging Classes

This is the key to course scheduling and the main direction of this system research.This part is a module in which the academic administrators automatically generate the timetable after entering the previous basic information.This module is mainly used to enter the start schedule date, the start date of each semester, and then the end date, that is, the end date of each semester. Then, click start course scheduling to generate a new course schedule. If the entered conditions are reasonable, you will be prompted to complete the course scheduling. Otherwise, the results that do not meet the conditions will be given, such as insufficient teachers, insufficient classroom resources, and too many courses.


## 3.3.1. Adding, Modifying, and Deleting Holiday Information

Leave information includes leave code, leave date, and leave description.Leave code does not need to be entered manually. The system automatically generates it. The starting code is 0001, and then 1 will be added automatically.Holiday date is entered manually and is date type data, excluding Saturday and Sunday. Saturday and Sunday are automatically set as rest days.Leave description is mainly used to specify the reasons for leave and some remarks.After deleting the leave, you must reschedule the class; otherwise, the previously entered leave will not be scheduled.


## 3.3.2. Add, Modify, and Delete Teacher Class Cross Reference Table

The teacher class comparison table is a key table of the system. The main function of the table is to assign teachers and their corresponding courses to each class. It occupies a dominant position in the course scheduling system.The teacher code does not need to be entered manually but must be selected from the teacher ID in the teacher information entered in the teacher information table to ensure one-to-one correspondence with the teacher information table and avoid repeated entry and misoperation.


## 3.3.3. Start Arranging Classes

This is the key to course scheduling and the main direction of this system research.This part is a module in which the academic administrators automatically generate the timetable after entering the previous basic information.This module is mainly used to enter the start schedule date, the start date of each semester, and then the end date, that is, the end date of each semester. Then, click start course scheduling to generate a new course schedule. If the entered conditions are reasonable, you will be prompted to complete the course scheduling. Otherwise, the results that do not meet the conditions will be given, such as insufficient teachers, insufficient classroom resources, and too many courses.


## 3.4. Timetable Query

The main functions of this module are teachers’ timetable query and students’ timetable query.


### 3.4.1. Teacher’s Schedule Query

This module is mainly to query the curriculum of each teacher.Only administrators, academic administrators, and teachers have the authority to query teachers’ curriculum, and teachers can only view their own curriculum, not others’ curriculum.Administrators and educational administrators can query by teacher name, date, department, specialty, and other combinations.Teachers can only query their curriculum by date.


### 3.4.2. Student Timetable Query

This module is mainly to query the curriculum of each class.Everyone can see this module. You can query the timetable by date, department, major, and class.


## 3.4.1. Teacher’s Schedule Query

This module is mainly to query the curriculum of each teacher.Only administrators, academic administrators, and teachers have the authority to query teachers’ curriculum, and teachers can only view their own curriculum, not others’ curriculum.Administrators and educational administrators can query by teacher name, date, department, specialty, and other combinations.Teachers can only query their curriculum by date.


## 3.4.2. Student Timetable Query

This module is mainly to query the curriculum of each class.Everyone can see this module. You can query the timetable by date, department, major, and class.


## 4. System Software Design

The Monte Carlo method is a statistical simulation method for random sampling based on probability distribution. It was first used by French mathematician Buffon to solve the problem of PI. Later, it was first proposed by Ulam and von Neumann, members of the “Manhattan” program to develop atomic bomb in the Second World War of the United States, and named after the world-famous casino Monte Carlo. The Monte Carlo method is also called random sampling technology. It is a random simulation method. It uses random numbers to solve many calculation problems based on probability and statistical theory. It can associate the problem with a certain probability model to obtain the approximate solution of the problem. The Monte Carlo method is to generate samples, that is, Monte Carlo sampling.The genetic algorithm regards the problem as the evolution process of biological natural evolution. By simulating the change relationship between individual genes in the process of biological evolution, the next generation solution is finally generated through selection, replication, crossover, mutation, and other operations. By comparing the fitness function values of the next generation, the solutions with worse fitness function values are eliminated, and the solutions with better fitness function values are retained; after such generations of evolution, the optimal individual generated in the genetic process of the problem is finally obtained, and the satisfactory solution of the optimization problem is obtained.The main content of course scheduling problem is to arrange classes, courses, teachers, and classrooms at different times and ensure no conflict. However, in the course scheduling process, the rationality of the schedule will be affected by the uniformity of course time arrangement, classroom utilization, and the efficiency of different types of courses in different time periods. Therefore, the problem to be solved in course scheduling is to determine that the schedule of each class achieves the optimal goal under the condition of meeting various constraints.There are too many factors objectively affected in the course scheduling problem. Therefore, considering the applicability of the model, the model construction must be properly simplified. Before establishing the mathematical model of the course scheduling problem, it is necessary to analyze the constraints. The basic constraints of the course arrangement process of electronic engineering specialty are as follows:(1)
Only one course can be arranged in the same class at the same time(2)
The same teacher can only arrange one course at the same time(3)
Only one course can be arranged in the same classroom at the same time(4)
The class time of each course shall meet the requirements of teachers as much as possible(5)
The class arrangement of the same course should not be too compact(6)
The relationship between classroom utilization and class location is used rationallyThe variables are described as follows:Class collection:C=c1,c2,…,cnCourse collection:K=k12,k2e,…,kle|e∈1,2Teacher collection:T=t1,t2,…,tkTime collection:D=d1g,d2g,…,dmg|g,i∈1,2,3,4,5Classroom collection:R=r1,r2,…,rpTeachers’ satisfaction with class time:W=w1,w2,w3,w4,w5The constraints are as follows:(1)
Only one course can be arranged in the same class at the same time, that is:(1)∑l=1L∑h=1H∑p=1Pcndmklthrp≤1.It means that the same classcn can only arrange the same course kl at the same time dm, and teacher th teaches in classroom rp, where L means that there are at most L courses, H means that there are at most H teachers, and P means that there are at most P classrooms.(2)
The same teacher can only arrange one course at the same time, that is:(2)∑l=1L∑n=1N∑p=1pcndmklthrp≤1.It means that the same teacherth can only arrange the same course kl at the same time dm and teach class cn in classroom rp where L means there are at most L courses, N means there are at most N teachers, and P means there are at most P classrooms.(3)
Only one course can be arranged in the same classroom at the same time, that is:(3)∑l=1L∑n=1N∑h=1Hcndmklthrp≤1.It means that the same classroomrp can only arrange the same course kl at the same time dm, and the teacher th teaches class cn in classroom rp where L means there are at most L courses, H means there are at most H teachers, and N means there are at most N teachers.(4)
The capacity of the classroom must be greater than the number of students in the class, that is:(4)rmon≥cmon.In the formula,rmon represents the classroom capacity and cmon represents the number of students in the class.(5)
The class time of each course shall meet the requirements of teachers as much as possible;(6)
The class time of each course shall meet the requirements of teachers as much as possible;(7)
The relationship between classroom utilization and class location is used rationally.Fformulas (1)–(4) are hard constraints for course scheduling, and conditions (5)–(7) are soft constraints. The scheme satisfying the hard constraint condition is the feasible solution for course scheduling, and the soft constraint condition is the standard for judging the scheme. The course scheduling method in this paper is to obtain a satisfactory course scheduling scheme after step-by-step optimization in the process of solving the five element array of classes, courses, teachers, classrooms, and students.In the research of course scheduling problem, the system improves the genetic algorithm and designs a genetic algorithm based on Monte Carlo. For the individuals generated in the crossover and mutation stages, the Monte Carlo probability acceptance method is adopted to make up for the shortcomings of the traditional genetic algorithm, such as premature and slow convergence, avoid the algorithm falling into the local extreme value solution, and improve the quality of the schedule in the generated population. The overall process of course scheduling using the Monte Carlo genetic algorithm is as follows.


### 4.1. Code

Different coding methods will lead to different course scheduling efficiencies. A good coding method can make course scheduling more efficient. In this paper, the course scheduling problem research objects are class, course, teacher, time, and classroom. The decimal coding method is used to encode the timetable.The timetable is regarded as an individual, and the information such as the machine, course, teacher, time, and classroom are encoded as a chromosome. The coding structure is class number-course number-teacher number-class time number-teacher number, as shown in Figure5.Figure 5
Encoding schematic diagram.For example, the code 0112-0301-0202-1135-1204 indicates that the teacher with class number 0202 teaches the class with class number 0113, and “1135” indicates the class time. It stipulates that a course has two class hours a week, and the day is divided into five class time periods, so “1135” indicates the first period of Monday (i.e., the first and second classes in the morning) and the fifth period of Wednesday (i.e., classes 9 and 10 in the evening).


### 4.2. Fitness Evaluation Function

In the genetic algorithm, fitness evaluation function is an important standard to measure the quality of an individual. This paper will define the evaluation function from three aspects.


#### 4.2.1. Course Interval

For the arrangement of the same course, an appropriate time interval helps students learn and consolidate course knowledge, maintain their enthusiasm for learning, and give teachers sufficient time for lesson preparation to avoid overwork of students and teachers due to intensive courses.For the arrangement of course interval, the class time is set as a certain time period from Monday to Friday. It is defined that the time of the first class isdm1g1 and the time of the second class is dm2g2. For example, g1=1andm1=2 mean that the first class time is the second time period on Monday and g2=3andm2=1 mean that the second class time is the first time period on Wednesday. The rationality of course arrangement of each class is o; the specific calculation method is as follows:(5)f1=1n∑i=1noi,(6)o=11+1/L∑j=1Lδj−δ¯2,(7)δ¯=1L∑i=1Lδi.In the formula,f1 represents the rationality of the total curriculum, n represents the total number of classes, oi represents the rationality of the curriculum arrangement of the i-th class, L represents the total number of courses in the class, δ¯ represents the average rationality of the class, δj represents the rationality of the time interval evaluation of the course, and δi represents the rationality of the ideal evaluation.


#### 4.2.2. Classroom Spacing

The arrangement of classroom at adjacent times in a day also has a certain impact on students and teachers. Reasonable arrangement of classroom can enable students to have plenty of time to rest and preview the next course content before class so that teachers have enough time to rest and prepare the course content. Therefore, for the arrangement of classroom spacing, the specific methods are as follows:(8)f2=1n∑i=1nzi,(9)z=11+∑i=1L−1ai,j+1,(10)ai,j+1=β1b1i+1−b1i+β2b2i+1−b2i,ifs1i+1−s1i=1,0,otherwise.In the formula,f2 represents the rationality of the overall classroom arrangement, zi represents the arrangement and strength of the i-th classroom, ai,j+1 represents the evaluation value of the classroom arrangement of the previous and next courses, β1 and β2 represent the weight, b1i+1 represents the teaching building where the classroom arranged by i+1 course is located, b1i represents the teaching building where the classroom arranged by course i is located, b2i+1 represents the floor where the classroom arranged by course i+1 is located, b2i represents the floor where the classroom arranged by course i is located, s1i+1 represents the time period of the first class of course i+1, and s1i represents the time period of the second class of course i.


#### 4.2.3. Teacher Arrangement

The time and place of course arrangement shall meet the requirements of teachers as far as possible. If the time and place of class conflict with the personal arrangement of teachers, it will lead to slow teaching process and reduce teaching efficiency. Therefore, meeting teachers’ requirements for class time and place is important in teaching course scheduling. The expression of teacher rationality requirement is as follows:(11)f3=1n∑i=1nqi,q=1θ1+θ21α.In the formula,f3 represents the total teacher rationality, q represents the teacher rationality of a class, θ1 represents the corresponding satisfaction value from the teacher time satisfaction table according to the first class time period, and θ2 represents the corresponding satisfaction value from the teacher time satisfaction table according to the second class time period. For example, Table 1 represents the time satisfaction table of teacher A and α represents the satisfaction of teachers with the arranged teaching classroom, and its value is also obtained by looking up the teacher classroom satisfaction table. For example, Table 2 represents teachers A, B, C, D, and E’s satisfaction.Table 1
Teacher A’s satisfaction with class schedule.
Teacher AMondayTuesdayWednesdayThursdayFridayOne or two quarterθ111θ121θ131θ141θ151Three or four quarterθ112θ122θ132θ142θ152Five or six quarterθ113θ123θ133θ143θ153Seven or eight quarterθ114θ124θ134θ144θ154Nine and ten quarterθ115θ125θ135θ145θ155Table 2
Satisfaction with teacher classroom arrangement.
Classroom AClassroom BClassroom CClassroom DClassroom ETeacher Aθ211θ221θ231θ241θ251Teacher Bθ212θ222θ232θ242θ252Teacher Cθ213θ223θ233θ243θ253Therefore, the fitness function is constructed as follows:(12)F=∑i=13ωi×fi.In the formula,ωi represents the weight corresponding to the evaluation value fi of fitness function, where i=1,2,3, so the objective function is f=maxF.


#### 4.2.4. Population Initialization

In the process of initializing population, the traditional genetic algorithm usually uses random scheme to generate population. Considering the particularity of course scheduling, this paper adds constraints in the initialization process to generate the initialization population.According to the teaching task, the professional courses and teachers of the class have been arranged in advance, and only the class time and place need to be initialized. Firstly, the class time and place of a group of courses are randomly generated for each class. If the allocated class time, classroom location, and classroom capacity do not conflict, the information is saved as an individual chromosome; in case of conflict, reinitialize according to the above rules, complete the coding of each class in turn until all classes are successfully coded, and finally generate corresponding individuals according to the population size, to achieve population initialization.


#### 4.2.5. Select Operation

Selection operation is a natural selection process in which individuals in the population remove the inferior and preserve the superior. Individuals with strong adaptability are selected from the old population. The higher the individual fitness, the greater the possibility of being selected. In this paper, the Monte Carlo probability acceptance method is used for new selection. If the new individual generated by cross mutation is better than the old individual, the individual is accepted; otherwise, the individual is accepted with a certain probability, in which the acceptance probability is as follows:(13)σ=e−E1−E2/KT.In the formula,σ represents the acceptance probability, E1 represents the fitness of the old individual, E2 means the fitness of the new individual, and KT represents a constant.


#### 4.2.6. Cross Operation

Chromosome crossing ensures the diversity of the population and prevents genetic simplification. Parents should be selected before crossing. This paper systematically selects the individualS1 with the best fitness in the contemporary population as the parent and randomly selects individual S2 as the parent among the remaining individuals. The method of crossover is as follows:(1)
First, it is judged to execute one of the above mutation methods by generating a random number.(2)
Randomly a chromosome is selected from the individual for variation. The variation method is shown in Figure6. Randomly time and classroom number information is selected from time set D or classroom set R to replace the time and classroom number in the chromosome.(3)
It is judged whether the individual after variation has schedule conflict. If there is no conflict, it means that the variation is completed. Otherwise, move to step (2) and restore the chromosome fragment.Figure 6
Cross schematic diagram.The cross schematic diagram is shown in Figure6.


#### 4.2.7. Variation Operation

Mutation operation is a sudden process in natural selection, which expands the diversity of population. There are three ways of variation in this paper: ① variation of “time” of chromosome weight; ② variation of “classroom” in chromosome; and ③ the “time” and “classroom” genes in staining mutated together. The specific operations are as follows:(1)
First, it is judged to execute one of the above mutation methods by generating a random number.(2)
A chromosome is randomly selected from the individual for variation, and the variation mode is shown in Figure7.(3)
It is judged whether the individual after variation has schedule conflict. If there is no conflict, it means that the variation is completed. Otherwise, go to step (2) and restore the chromosome fragment.Figure 7
Variation diagram.


## 4.1. Code

Different coding methods will lead to different course scheduling efficiencies. A good coding method can make course scheduling more efficient. In this paper, the course scheduling problem research objects are class, course, teacher, time, and classroom. The decimal coding method is used to encode the timetable.The timetable is regarded as an individual, and the information such as the machine, course, teacher, time, and classroom are encoded as a chromosome. The coding structure is class number-course number-teacher number-class time number-teacher number, as shown in Figure5.Figure 5
Encoding schematic diagram.For example, the code 0112-0301-0202-1135-1204 indicates that the teacher with class number 0202 teaches the class with class number 0113, and “1135” indicates the class time. It stipulates that a course has two class hours a week, and the day is divided into five class time periods, so “1135” indicates the first period of Monday (i.e., the first and second classes in the morning) and the fifth period of Wednesday (i.e., classes 9 and 10 in the evening).


## 4.2. Fitness Evaluation Function

In the genetic algorithm, fitness evaluation function is an important standard to measure the quality of an individual. This paper will define the evaluation function from three aspects.


### 4.2.1. Course Interval

For the arrangement of the same course, an appropriate time interval helps students learn and consolidate course knowledge, maintain their enthusiasm for learning, and give teachers sufficient time for lesson preparation to avoid overwork of students and teachers due to intensive courses.For the arrangement of course interval, the class time is set as a certain time period from Monday to Friday. It is defined that the time of the first class isdm1g1 and the time of the second class is dm2g2. For example, g1=1andm1=2 mean that the first class time is the second time period on Monday and g2=3andm2=1 mean that the second class time is the first time period on Wednesday. The rationality of course arrangement of each class is o; the specific calculation method is as follows:(5)f1=1n∑i=1noi,(6)o=11+1/L∑j=1Lδj−δ¯2,(7)δ¯=1L∑i=1Lδi.In the formula,f1 represents the rationality of the total curriculum, n represents the total number of classes, oi represents the rationality of the curriculum arrangement of the i-th class, L represents the total number of courses in the class, δ¯ represents the average rationality of the class, δj represents the rationality of the time interval evaluation of the course, and δi represents the rationality of the ideal evaluation.


### 4.2.2. Classroom Spacing

The arrangement of classroom at adjacent times in a day also has a certain impact on students and teachers. Reasonable arrangement of classroom can enable students to have plenty of time to rest and preview the next course content before class so that teachers have enough time to rest and prepare the course content. Therefore, for the arrangement of classroom spacing, the specific methods are as follows:(8)f2=1n∑i=1nzi,(9)z=11+∑i=1L−1ai,j+1,(10)ai,j+1=β1b1i+1−b1i+β2b2i+1−b2i,ifs1i+1−s1i=1,0,otherwise.In the formula,f2 represents the rationality of the overall classroom arrangement, zi represents the arrangement and strength of the i-th classroom, ai,j+1 represents the evaluation value of the classroom arrangement of the previous and next courses, β1 and β2 represent the weight, b1i+1 represents the teaching building where the classroom arranged by i+1 course is located, b1i represents the teaching building where the classroom arranged by course i is located, b2i+1 represents the floor where the classroom arranged by course i+1 is located, b2i represents the floor where the classroom arranged by course i is located, s1i+1 represents the time period of the first class of course i+1, and s1i represents the time period of the second class of course i.


### 4.2.3. Teacher Arrangement

The time and place of course arrangement shall meet the requirements of teachers as far as possible. If the time and place of class conflict with the personal arrangement of teachers, it will lead to slow teaching process and reduce teaching efficiency. Therefore, meeting teachers’ requirements for class time and place is important in teaching course scheduling. The expression of teacher rationality requirement is as follows:(11)f3=1n∑i=1nqi,q=1θ1+θ21α.In the formula,f3 represents the total teacher rationality, q represents the teacher rationality of a class, θ1 represents the corresponding satisfaction value from the teacher time satisfaction table according to the first class time period, and θ2 represents the corresponding satisfaction value from the teacher time satisfaction table according to the second class time period. For example, Table 1 represents the time satisfaction table of teacher A and α represents the satisfaction of teachers with the arranged teaching classroom, and its value is also obtained by looking up the teacher classroom satisfaction table. For example, Table 2 represents teachers A, B, C, D, and E’s satisfaction.Table 1
Teacher A’s satisfaction with class schedule.
Teacher AMondayTuesdayWednesdayThursdayFridayOne or two quarterθ111θ121θ131θ141θ151Three or four quarterθ112θ122θ132θ142θ152Five or six quarterθ113θ123θ133θ143θ153Seven or eight quarterθ114θ124θ134θ144θ154Nine and ten quarterθ115θ125θ135θ145θ155Table 2
Satisfaction with teacher classroom arrangement.
Classroom AClassroom BClassroom CClassroom DClassroom ETeacher Aθ211θ221θ231θ241θ251Teacher Bθ212θ222θ232θ242θ252Teacher Cθ213θ223θ233θ243θ253Therefore, the fitness function is constructed as follows:(12)F=∑i=13ωi×fi.In the formula,ωi represents the weight corresponding to the evaluation value fi of fitness function, where i=1,2,3, so the objective function is f=maxF.


### 4.2.4. Population Initialization

In the process of initializing population, the traditional genetic algorithm usually uses random scheme to generate population. Considering the particularity of course scheduling, this paper adds constraints in the initialization process to generate the initialization population.According to the teaching task, the professional courses and teachers of the class have been arranged in advance, and only the class time and place need to be initialized. Firstly, the class time and place of a group of courses are randomly generated for each class. If the allocated class time, classroom location, and classroom capacity do not conflict, the information is saved as an individual chromosome; in case of conflict, reinitialize according to the above rules, complete the coding of each class in turn until all classes are successfully coded, and finally generate corresponding individuals according to the population size, to achieve population initialization.


### 4.2.5. Select Operation

Selection operation is a natural selection process in which individuals in the population remove the inferior and preserve the superior. Individuals with strong adaptability are selected from the old population. The higher the individual fitness, the greater the possibility of being selected. In this paper, the Monte Carlo probability acceptance method is used for new selection. If the new individual generated by cross mutation is better than the old individual, the individual is accepted; otherwise, the individual is accepted with a certain probability, in which the acceptance probability is as follows:(13)σ=e−E1−E2/KT.In the formula,σ represents the acceptance probability, E1 represents the fitness of the old individual, E2 means the fitness of the new individual, and KT represents a constant.


### 4.2.6. Cross Operation

Chromosome crossing ensures the diversity of the population and prevents genetic simplification. Parents should be selected before crossing. This paper systematically selects the individualS1 with the best fitness in the contemporary population as the parent and randomly selects individual S2 as the parent among the remaining individuals. The method of crossover is as follows:(1)
First, it is judged to execute one of the above mutation methods by generating a random number.(2)
Randomly a chromosome is selected from the individual for variation. The variation method is shown in Figure6. Randomly time and classroom number information is selected from time set D or classroom set R to replace the time and classroom number in the chromosome.(3)
It is judged whether the individual after variation has schedule conflict. If there is no conflict, it means that the variation is completed. Otherwise, move to step (2) and restore the chromosome fragment.Figure 6
Cross schematic diagram.The cross schematic diagram is shown in Figure6.


### 4.2.7. Variation Operation

Mutation operation is a sudden process in natural selection, which expands the diversity of population. There are three ways of variation in this paper: ① variation of “time” of chromosome weight; ② variation of “classroom” in chromosome; and ③ the “time” and “classroom” genes in staining mutated together. The specific operations are as follows:(1)
First, it is judged to execute one of the above mutation methods by generating a random number.(2)
A chromosome is randomly selected from the individual for variation, and the variation mode is shown in Figure7.(3)
It is judged whether the individual after variation has schedule conflict. If there is no conflict, it means that the variation is completed. Otherwise, go to step (2) and restore the chromosome fragment.Figure 7
Variation diagram.


## 4.2.1. Course Interval

For the arrangement of the same course, an appropriate time interval helps students learn and consolidate course knowledge, maintain their enthusiasm for learning, and give teachers sufficient time for lesson preparation to avoid overwork of students and teachers due to intensive courses.For the arrangement of course interval, the class time is set as a certain time period from Monday to Friday. It is defined that the time of the first class isdm1g1 and the time of the second class is dm2g2. For example, g1=1andm1=2 mean that the first class time is the second time period on Monday and g2=3andm2=1 mean that the second class time is the first time period on Wednesday. The rationality of course arrangement of each class is o; the specific calculation method is as follows:(5)f1=1n∑i=1noi,(6)o=11+1/L∑j=1Lδj−δ¯2,(7)δ¯=1L∑i=1Lδi.In the formula,f1 represents the rationality of the total curriculum, n represents the total number of classes, oi represents the rationality of the curriculum arrangement of the i-th class, L represents the total number of courses in the class, δ¯ represents the average rationality of the class, δj represents the rationality of the time interval evaluation of the course, and δi represents the rationality of the ideal evaluation.


## 4.2.2. Classroom Spacing

The arrangement of classroom at adjacent times in a day also has a certain impact on students and teachers. Reasonable arrangement of classroom can enable students to have plenty of time to rest and preview the next course content before class so that teachers have enough time to rest and prepare the course content. Therefore, for the arrangement of classroom spacing, the specific methods are as follows:(8)f2=1n∑i=1nzi,(9)z=11+∑i=1L−1ai,j+1,(10)ai,j+1=β1b1i+1−b1i+β2b2i+1−b2i,ifs1i+1−s1i=1,0,otherwise.In the formula,f2 represents the rationality of the overall classroom arrangement, zi represents the arrangement and strength of the i-th classroom, ai,j+1 represents the evaluation value of the classroom arrangement of the previous and next courses, β1 and β2 represent the weight, b1i+1 represents the teaching building where the classroom arranged by i+1 course is located, b1i represents the teaching building where the classroom arranged by course i is located, b2i+1 represents the floor where the classroom arranged by course i+1 is located, b2i represents the floor where the classroom arranged by course i is located, s1i+1 represents the time period of the first class of course i+1, and s1i represents the time period of the second class of course i.


## 4.2.3. Teacher Arrangement

The time and place of course arrangement shall meet the requirements of teachers as far as possible. If the time and place of class conflict with the personal arrangement of teachers, it will lead to slow teaching process and reduce teaching efficiency. Therefore, meeting teachers’ requirements for class time and place is important in teaching course scheduling. The expression of teacher rationality requirement is as follows:(11)f3=1n∑i=1nqi,q=1θ1+θ21α.In the formula,f3 represents the total teacher rationality, q represents the teacher rationality of a class, θ1 represents the corresponding satisfaction value from the teacher time satisfaction table according to the first class time period, and θ2 represents the corresponding satisfaction value from the teacher time satisfaction table according to the second class time period. For example, Table 1 represents the time satisfaction table of teacher A and α represents the satisfaction of teachers with the arranged teaching classroom, and its value is also obtained by looking up the teacher classroom satisfaction table. For example, Table 2 represents teachers A, B, C, D, and E’s satisfaction.Table 1
Teacher A’s satisfaction with class schedule.
Teacher AMondayTuesdayWednesdayThursdayFridayOne or two quarterθ111θ121θ131θ141θ151Three or four quarterθ112θ122θ132θ142θ152Five or six quarterθ113θ123θ133θ143θ153Seven or eight quarterθ114θ124θ134θ144θ154Nine and ten quarterθ115θ125θ135θ145θ155Table 2
Satisfaction with teacher classroom arrangement.
Classroom AClassroom BClassroom CClassroom DClassroom ETeacher Aθ211θ221θ231θ241θ251Teacher Bθ212θ222θ232θ242θ252Teacher Cθ213θ223θ233θ243θ253Therefore, the fitness function is constructed as follows:(12)F=∑i=13ωi×fi.In the formula,ωi represents the weight corresponding to the evaluation value fi of fitness function, where i=1,2,3, so the objective function is f=maxF.


## 4.2.4. Population Initialization

In the process of initializing population, the traditional genetic algorithm usually uses random scheme to generate population. Considering the particularity of course scheduling, this paper adds constraints in the initialization process to generate the initialization population.According to the teaching task, the professional courses and teachers of the class have been arranged in advance, and only the class time and place need to be initialized. Firstly, the class time and place of a group of courses are randomly generated for each class. If the allocated class time, classroom location, and classroom capacity do not conflict, the information is saved as an individual chromosome; in case of conflict, reinitialize according to the above rules, complete the coding of each class in turn until all classes are successfully coded, and finally generate corresponding individuals according to the population size, to achieve population initialization.


## 4.2.5. Select Operation

Selection operation is a natural selection process in which individuals in the population remove the inferior and preserve the superior. Individuals with strong adaptability are selected from the old population. The higher the individual fitness, the greater the possibility of being selected. In this paper, the Monte Carlo probability acceptance method is used for new selection. If the new individual generated by cross mutation is better than the old individual, the individual is accepted; otherwise, the individual is accepted with a certain probability, in which the acceptance probability is as follows:(13)σ=e−E1−E2/KT.In the formula,σ represents the acceptance probability, E1 represents the fitness of the old individual, E2 means the fitness of the new individual, and KT represents a constant.


## 4.2.6. Cross Operation

Chromosome crossing ensures the diversity of the population and prevents genetic simplification. Parents should be selected before crossing. This paper systematically selects the individualS1 with the best fitness in the contemporary population as the parent and randomly selects individual S2 as the parent among the remaining individuals. The method of crossover is as follows:(1)
First, it is judged to execute one of the above mutation methods by generating a random number.(2)
Randomly a chromosome is selected from the individual for variation. The variation method is shown in Figure6. Randomly time and classroom number information is selected from time set D or classroom set R to replace the time and classroom number in the chromosome.(3)
It is judged whether the individual after variation has schedule conflict. If there is no conflict, it means that the variation is completed. Otherwise, move to step (2) and restore the chromosome fragment.Figure 6
Cross schematic diagram.The cross schematic diagram is shown in Figure6.


## 4.2.7. Variation Operation

Mutation operation is a sudden process in natural selection, which expands the diversity of population. There are three ways of variation in this paper: ① variation of “time” of chromosome weight; ② variation of “classroom” in chromosome; and ③ the “time” and “classroom” genes in staining mutated together. The specific operations are as follows:(1)
First, it is judged to execute one of the above mutation methods by generating a random number.(2)
A chromosome is randomly selected from the individual for variation, and the variation mode is shown in Figure7.(3)
It is judged whether the individual after variation has schedule conflict. If there is no conflict, it means that the variation is completed. Otherwise, go to step (2) and restore the chromosome fragment.Figure 7
Variation diagram.


## 5. Experimental Verification

The electronic engineering teaching arranging system is an arranging system based on the B/S architecture. The software configuration requirements of the system development platform are as follows:(1)
Windows 7 or above operating system(2)
ArcGIS Pro 10.5 or above(3)
ArcGIS Enterprise 10.5 or above(4)
Tomcat 7.0 and above server(5)
JDK 1.7 and above(6)
Postgre SQL + PostGIS 9.5 and above database(7)
ArcGIS API for JavaScript version 4.6 or above(8)
IntelliJ IDEA 15.1.0 and above development tools(9)
CityEngine 2015 version and aboveThe system login interface is shown in Figure8.Figure 8
System login interface.After completing the login of the system, the course scheduling operation of electronic engineering specialty is carried out, and the course scheduling performance of the system is analyzed.


### 5.1. Comparison of Convergence Performance of Algorithms

The experimental data of 27 classes and 55 teachers majoring in Electronic Engineering in the province are selected, the teachers’ satisfaction with time and classroom to 1 is set, the population size is set to 20, the exchange probability is set to 0.5, the mutation probability is set to 0.001, and the genetic algebra is set to 144 generations. The convergence performance of the Monte Carlo genetic algorithm is compared with that of the traditional genetic algorithm, and the comparison results are shown in Figure9.Figure 9
Comparison of algorithm convergence performance.As can be seen from Figure9, during the 1–400 generations, the traditional genetic algorithm improves fitness stably, while the Monte Carlo genetic algorithm greatly impacts fitness. The change of fitness reflects the probability acceptance of individuals with cross fitness in the Monte Carlo method. In the 400–1600 generations, in terms of convergence speed, the convergence speed of the Monte Carlo genetic algorithm is better than that of the traditional genetic algorithm, which shows the optimal solution obtained by the Monte Carlo genetic algorithm. Due to the traditional genetic algorithm, adding the Monte Carlo method can avoid local extremum solution and obtain the optimal feasible scheme of the problem.


### 5.2. Course Scheduling Satisfaction

In order to verify the user satisfaction of the course scheduling system, students and teachers are invited to evaluate the course scheduling results after many iterations. The satisfaction score results of the course scheduling system are shown in Table3.Table 3
Satisfaction scoring results.
Number of iterationsSatisfaction score/pointsStudent ratingTeacher rating2009498400959860096998009597100096971200979814009799By observing the scoring results shown in Table3, it can be seen that in the process of multiple iterative experiments, the satisfaction scores of students and teachers on the course scheduling system are high, and the highest satisfaction scores of students and teachers are 97 and 99, respectively. Therefore, it shows that the designed course scheduling system can meet the class needs of students and teachers.


## 5.1. Comparison of Convergence Performance of Algorithms

The experimental data of 27 classes and 55 teachers majoring in Electronic Engineering in the province are selected, the teachers’ satisfaction with time and classroom to 1 is set, the population size is set to 20, the exchange probability is set to 0.5, the mutation probability is set to 0.001, and the genetic algebra is set to 144 generations. The convergence performance of the Monte Carlo genetic algorithm is compared with that of the traditional genetic algorithm, and the comparison results are shown in Figure9.Figure 9
Comparison of algorithm convergence performance.As can be seen from Figure9, during the 1–400 generations, the traditional genetic algorithm improves fitness stably, while the Monte Carlo genetic algorithm greatly impacts fitness. The change of fitness reflects the probability acceptance of individuals with cross fitness in the Monte Carlo method. In the 400–1600 generations, in terms of convergence speed, the convergence speed of the Monte Carlo genetic algorithm is better than that of the traditional genetic algorithm, which shows the optimal solution obtained by the Monte Carlo genetic algorithm. Due to the traditional genetic algorithm, adding the Monte Carlo method can avoid local extremum solution and obtain the optimal feasible scheme of the problem.


## 5.2. Course Scheduling Satisfaction

In order to verify the user satisfaction of the course scheduling system, students and teachers are invited to evaluate the course scheduling results after many iterations. The satisfaction score results of the course scheduling system are shown in Table3.Table 3
Satisfaction scoring results.
Number of iterationsSatisfaction score/pointsStudent ratingTeacher rating2009498400959860096998009597100096971200979814009799By observing the scoring results shown in Table3, it can be seen that in the process of multiple iterative experiments, the satisfaction scores of students and teachers on the course scheduling system are high, and the highest satisfaction scores of students and teachers are 97 and 99, respectively. Therefore, it shows that the designed course scheduling system can meet the class needs of students and teachers.


## 6. Conclusion

To improve the rationality of electronic engineering teaching scheduling, an electronic engineering teaching scheduling system based on the Monte Carlo genetic algorithm is designed, and the system’s performance is verified from theoretical and experimental aspects. The designed course scheduling system has better algorithm convergence and user satisfaction in electronic engineering teaching. Specifically, compared with the traditional genetic algorithm, the fitness value of the Monte Carlo genetic algorithm is higher, and the highest satisfaction scores of students and teachers in the course scheduling system are 97 and 99, respectively.



---

*Source: 3564722-2021-09-29.xml*