PBL Report1
PBL Report1
PROJECT REPORT
ON
“ Online-Security-Guard-Hiring-System ”
SUBMITTED TO
COMPUTER ENGINEERING
SUBMITTED BY
Bhamare Vaibhav Popat [72037252G]
Deore Krushna Anil [72037260H]
Bhamare Raj Hitesh [72037275F]
Sarode Kishor Nanasaheb [
Sonawane Anand Sharad [72177493J]
i
MAULANA MUKHTAR AHMAD NADVI TECHNICAL CAMPUS
CERTIFICATE
This is to certify that,
Bhamare Vaibhav Popat, Deore Krushna Anil ,Bhamare Raj Hitesh ,Sarode Kishor Nanasaheb
Sonawane Anand Sharad has satisfactorily completed the Project Phase-II Work entitled “Online-
Security-Guard-Hiring-System”. This work is being submitted in the partial fulfilment of
the requirements for the award of degree of Bachelor of Engineering in Computer Engineering
for the Academic Year 2022- 2024.
The project has made a significant contribution to the field of study and has been
implemented with utmost dedication, diligence and creativity. The findings and
conclusions of the project are original and made significant contribution to the existing
knowledge.
Date :
Place : Malegaon.
ii
MAULANA MUKHTAR AHMAD NADVI TECHNICAL CAMPUS
CERTIFICATE OF APPROVAL
The Dissertation entitled “Online-Security-Guard-Hiring-System”
being submitted by ACF, YHJ, IOP, WER has been examined by us and is hereby
approved in partial fulfillment for the award of degree of Bachelor of Engineering in
Computer Engineering.
iii
MAULANA MUKHTAR AHMAD NADVI TECHNICAL CAMPUS
DECLARATION
We declare that this written submission represents our ideas in our own words
and we have adequately cited and referenced the original sources. We also declare that
We have adhered to all principles of academic honesty and integrity and have not
misrepresented or fabricated any idea/data/fact/source in our submission. We
understand that any violation of the above will be cause for disciplinary action by the
Institute and can also evoke penal action from the sources which have not
been properly cited.
Date:
Place: Malegaon.
iv
ABSTRACT
The traditional method of scheduling time table, with satisfactory and efficient
output was very challenging. Genetic algorithms, inspired by the principles of natural
evolution, have emerged as a powerful tool for solving optimization problems. In this
study, the utilization of genetic algorithms is explored for addressing problem that arise
in timetable scheduling. The main objective is to develop an efficient algorithm that can
generate high-quality timetables while satisfying the diverse constraints and objectives
involved.
The results obtained from the experiments demonstrate the effectiveness of the
genetic algorithm in generating high-quality timetables within reasonable
computational time. The algorithm successfully balances conflicting objectives, such as
minimizing clashes and maximizing resource utilization. Moreover, the limitations and
potential extensions of the genetic algorithm approach, including the integration of
additional constraints and the incorporation of advanced search strategies.
vi
ACKNOWLEDGEMENT
It is our great pleasure to acknowledge sense of gratitude to all, who have made it
possible for us to complete this Project work with success. It gives us great pleasure to expressour
deep gratitude to our Project guide Dr. Md. Salman Baig for his support and help fromtime to
time during Project work.
We would like to express our gratitude towards our dear parents for their support, and
constant encouragement.
At last, but not in least, we would like to thank everyone who directly and indirectly
helped and motivated us to work on this project.
vi
TABLE OF CONTENTS
Chapter Title Page No.
- CERTIFICATE ii
- DECLARATION iv
- Abstract V
- Acknowledgement Vi
- List of Figures X
- List of Tables Xi
1 INTRODUCTION 1
1.1 Motivation 2
1.2 Importance of Automatic Timetable Generation in various fields 3
1.3 Traditional Methods for Creating Timetables 4
1.4 Project Requirements 5
1.4.1 Hardware Requirements 5
1.4.2 Software Requirements 5
1.4.3 Eclipse 6
1.4.4 The Java Programming Language 7
1.4.5 MySQL 7
1.4.6 Interfaces 8
1.5 Problem Statement 8
1.6 Objectives 9
2 LITERATURE SURVEY 10
2.1 A Multistage Evolutionary Algorithm for the Timetable Problem 10
2.2 Stochastic Optimization Timetabling Tool for University Course Scheduling 10
2.3 A Two-Phase Heuristic Evolutionary Algorithm for Personalizing 11
2.4 Paperless Master Timetable Scheduling System 11
2.5 A Greedy-based Algorithm in Optimizing Student’s Recommended 11
2.6 GATT: A Genetic Algorithm-based Tool for Automating Timetable 12
2.7 Existing systems 14
2.7.1 Drawbacks of Existing Systems 14
2.7.2 Advantages of Proposed System 15
3 BACKGROUND & METHODOLOGIES 16
3.1 Genetic Algorithm 16
vii
3.2 Working of Genetic Algorithm 16
3.3 Key Features of Genetic Algorithm 18
3.4 Genetic Algorithms as a Powerful Optimization Technique 20
3.5 Automatic Timetable Generation 20
3.6 Examples of successful applications of genetic algorithms in various fields 21
3.7 Constraints 23
3.7.1 Hard Constraints 23
3.7.2 Soft Constraints 24
3.8 Key Challenges of Generating Timetables using Genetic Algorithms 24
4 SYSTEM DESIGN & DATA FLOW DIAGRAMS 26
4.1 Use Case Diagram 26
4.2 Flowchart 28
4.2.1 Master Module 29
4.2.2 Allotment Module 29
4.2.3 Timetable Generation Module 29
4.2.4 Print and Export Module 29
4.3 Class Diagram 29
4.4 Dataflow Diagrams 30
4.4.1 Function Symbol 31
4.4.2 External Entity Symbol 31
4.4.3 Data Flow Symbol 31
4.4.4 Output Symbol 31
4.5 Context Diagram 31
5 SYSTEM IMPLEMENTATION 32
5.1 Genetic Algorithm Implementation 32
5.2 Vaadin Framework Integration 32
5.3 Genetic Algorithm Customization 33
5.4 Testing and Refinement 33
5.5 Implementation 34
5.6 Detail Design 34
5.6.1 Database Design 34
5.6.2 Normalization 35
5.7 Activity Diagram 35
5.8 Entity-Relationship Diagram 37
6 RESULTS & DISCUSSION 38
6.1 Comparison with Existing systems 38
6.1.1 Quality 38
6.1.2 Efficiency 38
6.1.3 Scalability 38
6.2 Analysis of the Fitness Function and its Impact on the Results 39
viii
7 CONCLUSION & FUTURE WORK 50
7.1 Conclusion 50
7.2 Future Work 50
REFERENCES 52
APPENDIX-A (Coding) 55
APPENDIX-B (Conference Certificate) 79
viii
LIST OF FIGURES
Figure No. Figure Name Page No.
6.4.11 User 46
6.4.12 Allotment 46
6.4.13 Timetable view 47
6.4.14 Classwise view 47
x
LIST OF TABLES
2 Literature Survey 13
xi
eTimeTabler Using Genetic Algorithm
CHAPTER 1
INTRODUCTION
Online Security Guard Hiring System” is a web-based technology which manages security guards details.
In this project it is easy to get security guards for any farm or individual only by filling one form and get
response quickly by admin. When user fill the security guard required form they get booking number by
which they search what is status of their security booking. This web application provides a way to
effectively control record & track the booking application and security guard details. An “Online Security
Guard Hiring System” effectively manages and handles all the functioning of a security hiring farms. The
software system can store the data of security guard and booking application. Online Security Guards
Hiring System is developed using PHP with MySQLi extension. It’s a web-based application used to hire
security guards.
Advantages:
• It helps the security farms to handle and manage guard details and booking details of guards.
•Reduce time consumption.
• Reduce error scope.
• All system managements are automated.
• Centralized database management.
• Easy operations for operator of the system.
• No paper work requirement.
Disadvantages:
• The system can only handle Single security farms.
Applications:
• To be used in security farms
1.1 Motivation
The motivation behind developing an online security guard hiring system project
stems from the need to streamline the hiring process, improve efficiency, and enhance
security standards by providing a centralized platform for finding, vetting, and managing
security personnel.
Centralized Management:
A single platform can centralize all information related to security guard hiring,
including applications, resumes, background checks, and performance records, making it
easier to manage and track security personnel.
Online systems can facilitate rigorous background checks, skills assessments, and
training certifications, ensuring that only qualified and trustworthy individuals are hired for
security positions.
Cost Reduction:
By automating tasks and streamlining the hiring process, an online system can
reduce administrative overhead and associated costs, such as advertising and recruitment
fees.
Enhanced Security:
A well-designed online system can help ensure that security personnel are properly
vetted and trained, leading to a more secure environment for businesses and individuals.
Accessibility:
An online system provides accessibility for security guard applicants and employers,
regardless of their location, allowing for a wider pool of candidates and a more efficient
hiring process.
Scalability:
Data Analysis:
The system can collect and analyze data related to hiring, performance, and security
incidents, providing valuable insights for improving security practices and making informed
decisions.
A robust security guard hiring system is crucial for businesses and organizations
because it ensures the selection of competent, reliable individuals, leading to
enhanced property protection, improved safety, and a more secure environment for
employees and customers.
1. . Enhanced Security and Protection:
Deterrence of Crime:
The presence of security guards, especially those hired through a well-structured
system, can deter potential criminals and vandals, reducing the risk of theft,
vandalism, and other security breaches.
Asset Protection:
Security guards, trained and equipped through a good hiring system, can effectively
safeguard valuable assets, both physical and intellectual, from theft, damage, or
unauthorized access.
Emergency Response:
A well-hired security team is equipped to handle emergencies and security incidents
effectively, ensuring a swift and appropriate response to minimize damage and
ensure the safety of personnel.
2. Improved Safety and Well-being:
Safe and Secure Environment:
A strong security presence, facilitated by a reliable hiring system, creates a sense of
safety and security for employees, customers, and visitors, promoting a productive
and positive environment.
Reduced Stress and Anxiety:
Knowing that a competent security team is in place can significantly reduce stress
and anxiety for both employees and management, allowing them to focus on their
work and responsibilities.
Enhanced Customer Service:
Well-trained security personnel, hired through a good system, can also contribute to
positive customer experiences by providing assistance, answering questions, and
ensuring a safe and welcoming environment.
.
Define Scope:
Clearly outline the features and functionalities of the system, including user roles
(admin, security guard, client), application capabilities (job posting, application
submission, communication), and any specific requirements.
2. Technology Stack:
Choose the technologies to use, such as PHP for server-side logic, MySQL for the
database, and HTML/CSS/JavaScript for the front-end.
3. Database Design:
Plan the database schema, including tables for users, jobs, applications, and other
relevant data.
The minimum hardware and software required to run/develop the system is as listed
below. The only runtimes are required to run on production mode. Tools are required to be
installed on development machine only.
1.4.3 Eclipse
The Eclipse platform which provides the foundation for the Eclipse IDE is composed
of plug-ins and is designed to be extensible using additional plug-ins. Developed using Java,
the Eclipse platform can be used to develop rich client applications, integrated development
environments and other tools. Eclipse can be used as an IDE for any programming language
for which a plug-in is available.
The Java Development Tools (JDT) project provides a plug-in that allows Eclipse
to be used as a Java IDE, PyDev is a plugin that allows Eclipse to be used as a Python IDE,
C/C++ Development Tools (CDT) is a plug-in that allows Eclipse to be used for developing
application using C/C++, the Eclipse Scala plug-in allows Eclipse to be used an IDE to
develop Scala applications and PHP eclipse is a plug-in to eclipse that provides complete
development tool for PHP.
Simple
Object-Oriented
Distributed
Multi-threaded
Dynamic
Portable
In Java programming language all source code is written in plain text files
ending with Java extension. Those source files then compiled into class files by the Java
compiler. A. class file does not contain code that is native to your processer: it instead
contains byte codes- the machine language of Java Virtual.
1.4.5 MySQL
MySQL is a popular choice of database for use in web applications, and is a central
component of the widely used LAMP open-source web application software stack—LAMP
1.4.6 Interfaces
The problem of automatic timetable generation involves creating a schedule that assigns
resources, such as classrooms, teachers, and time slots, to a set of activities, such as courses,
exams, or meetings, while satisfying multiple constraints and objectives.
Time and duration constraints: Events often have specific time windows during
which they can be scheduled. Moreover, events may have fixed durations that need
to be accounted for when creating the timetable.
Resource availability: The availability of resources such as teachers, classrooms,
and equipment need to be considered. Each event must be assigned to an available
resource at a suitable time slot.
Precedence and sequencing: Certain events may have dependencies or sequencing
requirements. For example, a lab session may require a preceding lecture. Such
dependencies need to be incorporated into the timetable. Instructor availability and
preferences: In educational settings, instructors may have specific availability times
or preferences regarding the scheduling of their classes, which need to be taken into
account.
Breaks and downtime: Adequate breaks and downtime need to be incorporated
into the timetable to ensure that instructors and students have time to rest and
transition between events.
1.6 Objectives
To develop an efficient and effective system that generates an accurate timetable based
on user inputs. To save time and effort and reduce errors. To develop a user interface that
provides smooth integration as well as paperless environment, which is user friendly, takes
input from the user, and generate the time table.
CHAPTER 2
LITERATURE SURVEY
E. K. Burke and J. P. Newall [9] use the Evolutionary Algorithm to solve the
timetable problem. This advanced search method can be breakdown larger problems into
smaller components, and these components can be handled effectively by EA. Evolutionary
Algorithms not only can be reduced the execution time but also improve the quality of the
solution. Where timetabling problem is nothing but a problem that assigns several events to
a finite number of different time intervals in which all compulsory constraints are fulfilled.
In this problem, optimizing the number of conflicts between the periods is the most onerous
task to perform. This problem occurs because of time limits and the availability of rooms.
timetable which is obtained is normally called a hard constraint and the feasibility of the
solution not found is called a soft constraint. These methods highlighted the constraint-
based approach and solve the timetabling problem. Graph colouring algorithm called
sequential method is called an emerging algorithm which consists of heuristic and
metaheuristic algorithms is applied for large classroom scheduling problems.
Paul Godwin Daniel et al [22] in his paper we use Quicksort algorithm as logarithmic
algorithm. The algorithm focusses on elimination of conflicts that arise in the algorithm and
make the function in a parallel way. The splatted the process in 6 parts and made them all
function together at the same time. Paul Godwin Danie et al [23] paper focused on Aims, to
scheduled time table system semester course and examination to make the application easy,
fast and efficient to avoid venue and lectures differences.
This design system provides GUI (graphical user interface). It provides the user
access to register and access the system. This system will collect the information from
different sources and generate the tameable. Making results there are some test cases are
used to run the system. Some test case run independently and some anode the whole system
to reedy before execution. Unit test are done on components before integration of
components to evaluate the performance of the algorithm.
In this paper the Greedy algorithm-based methodology is divided into 4 parts. First,
we gather the information second, we design the system third deployment and the last is
system validation. Gathering Information: In gather information we conduct the real
problem faced by them.
Many universities faced the challenges of course scheduling problem. Where the
constraints are nothing but the rules and policies are assigned to the algorithm. The main
goal is to minimize conflicts between the constraints. This paper describes that the Time
Table problems are NP- Hard (Nondeterministic Polynomial) problem [26]. Such type of
problems having no specific solutions to figure out the number of calculations needed for
the solution. Therefore, to find the successful solution for NP- hard problems, there are
many metaheuristics techniques are used to produce the optimize solutions. They have used
Genetic Algorithm to successfully solve the NP-hard problem where Genetic Algorithm is
a search heuristic technique [27]. Genetic algorithms are used to solve the complex
optimization problem like TimeTable scheduling problems [29]. In GA all solutions are
correspond to the chromosomes and genes which refers to the parameters. Genetic
Algorithm contain four main components such as Fitness function, Initial population,
Selection, Crossover and Mutation [28].
Sr Author Algorithm
Title Merits Demerits
no. & year Used
A Multistage E. K. Evolutionary i. Reduce the amount of It is dependent on another
Evolutionary Burke and Algorithm time taken to find the algorithm for optimal solution.
Algorithm for the J. P. solution.
Timetable Problem Newall ii. Improved the quality
1. 1999 of solution.
iii. More convenient than
conventional method.
Automatic timetable generation using a genetic algorithm offers several advantages over
traditional manual methods. Here are some key advantages:
CHAPTER 3
Genetic algorithm are optimization techniques that simulate the process of natural
selection and evolution. They are based on the concept of chromosomes, which represent
possible solutions to the optimization problem. Each chromosome is composed of genes,
which represent the parameters or variables of the problem. The genes are encoded using a
binary or real-valued representation. The chromosomes are evaluated using a fitness
function, which measures the quality of the solution based on specific objectives and
constraints.
Genetic algorithm has several advantages over other optimization techniques. They
are able to explore a large search space efficiently, handle complex constraints and
objectives, and avoid local optima. They are also flexible and can be adapted to different
types of optimization problems.
The following are the key steps in the working of genetic algorithm:[32]
The key advantages of genetic algorithm, has the ability to explore a large search space
efficiently, handle complex constraints and objectives, and avoid local optima. They are
also flexible and can be adapted to different types of optimization problems. However,
genetic algorithm can be computationally expensive and require careful tuning of the
parameters to achieve optimal performance.
solved. The fitness score determines the probability of a chromosome being selected
for further processing.
3) Selection mechanism: In a genetic algorithm, a selection mechanism is used to
determine which chromosomes are selected for reproduction in the next generation.
The selection mechanism is usually based on the fitness scores of the chromosomes,
with fitter chromosomes having a higher probability of being selected. Some
common selection mechanisms include roulette wheel selection, tournament
selection, and rank selection.
4) Reproduction mechanism: Once the selection mechanism has identified the fittest
chromosomes, they are used to generate the next generation of solutions. This is
typically achieved through a combination of crossover and mutation. Crossover
involves exchanging some genetic material between two chromosomes, while
mutation involves randomly changing some of the genetic material of a
chromosome.
5) Termination criteria: The genetic algorithm continues to generate new generations
of solutions until a termination criterion is met. Termination criteria can be based on
a maximum number of generations, a minimum fitness level, or a fixed amount of
computational time.
6) Population size: The population size is the number of chromosomes that are
evaluated in each generation. A larger population size increases the diversity of the
solutions and helps to prevent premature convergence, but it also increases the
computational complexity of the algorithm.
7) Parameters: Genetic algorithms typically have several parameters that can be
adjusted to improve their performance, such as the mutation rate, crossover rate,
selection mechanism, and population size. The optimal values for these parameters
depend on the problem being solved.
Genetic algorithms are a powerful optimization technique that has been widely used
in various fields, including automatic timetable generation. This technique mimics the
process of natural selection and evolution to find the best solution to a given problem. In
the context of timetable generation, genetic algorithms work by creating a population of
potential timetables and iteratively improving them through a process of selection,
crossover, and mutation, until an optimized solution is found.
Genetic algorithms have several advantages over traditional methods for creating
timetables. They are highly efficient, able to generate high-quality timetables in a short
amount of time. They are also flexible, able to handle complex constraints and changes to
the timetable without the need for significant manual effort. Furthermore, genetic
algorithms can optimize multiple objectives simultaneously, such as minimizing conflicts
and maximizing resource utilization, which traditional methods may struggle to achieve.
The problem of automatic timetable generation has been studied extensively in the
literature. Traditional methods include manual scheduling and rule-based systems.
However, these methods are time-consuming, error-prone, and may not guarantee optimal
solutions. Optimization techniques, such as linear programming, simulated annealing, and
tabu search, have been used to tackle the problem. However, these techniques may not be
able to handle complex constraints and objectives or scale to large instances.
Engineering design: Genetic algorithm has been used to optimize the design of
complex engineering systems, such as aircraft wings, heat exchangers, and antennas.
By exploring a large design space and considering multiple design objectives and
constraints, genetic algorithms can generate high-quality designs that are difficult to
achieve using traditional methods.
Robotics: Genetic algorithm has been used to optimize the behaviour and control of
robots, such as obstacle avoidance, path planning, and grasping. By evolving the
robot's behaviour through multiple generations of selection, crossover, and
mutation, genetic algorithms can generate adaptive and robust solutions that can
handle different environments and tasks.
Finance: Genetic algorithm has been used to optimize investment portfolios by
selecting the best combination of assets that maximize returns while minimizing
risks. By considering multiple investment objectives and constraints, such as asset
allocation, diversification, and liquidity, genetic algorithms can generate portfolios
that outperform traditional methods.
Transportation: Genetic algorithm has been used to optimize traffic flow and
routing in transportation systems, such as road networks, public transit, and logistics.
By considering multiple objectives and constraints, such as travel time, congestion,
emissions, and safety, genetic algorithms can generate optimal solutions that
improve efficiency and reduce costs.
Manufacturing: Genetic algorithm has been used to optimize the scheduling and
routing of manufacturing processes, such as assembly lines, machining centres, and
supply chains. By considering multiple objectives and constraints, such as
throughput, lead time, inventory, and resource utilization, genetic algorithms can
generate optimal solutions that improve productivity and reduce costs.
Image processing: Genetic algorithm has been used to optimize image processing
algorithms, such as edge detection, segmentation, and classification. By evolving
the parameters and structures of the algorithms through multiple generations of
selection, crossover, and mutation, genetic algorithm can generate solutions that
improve accuracy and reduce computation time.
3.7 Constraints
In automatic timetable generation, constraints can be classified into two categories: hard
constraints and soft constraints.
Hard constraints are the constraints that must be satisfied without exception. If a
hard constraint is violated, the solution is considered infeasible and is discarded. Hard
constraints are often related to the availability, capacity, and conflict avoidance of resources.
Conflict avoidance: A teacher cannot be scheduled to teach two courses at the same time.
Soft constraints are constraints that are desirable but not strictly necessary. If a soft
constraint is violated, the solution is still considered feasible but is penalized in the fitness
function. Soft constraints are often related to optimization objectives, such as resource
utilization, teacher workload, and student preferences.
Resource utilization: The timetable should maximize the utilization of resources, such as
classrooms and teachers.
Teacher workload: The timetable should balance the workload of teachers, such that no
teacher is assigned too many or too few courses.
Student preferences: The timetable should consider student preferences, such as avoiding
early morning or late afternoon classes.
The distinction between hard and soft constraints is essential in automatic timetable
generation, as it allows for the trade-off between different objectives. Hard constraints must
always be satisfied, while soft constraints can be relaxed to improve other optimization
objectives. The penalty function used to penalize the violation of soft constraints can be
adjusted to reflect the relative importance of the constraint. For example, violating a soft
constraint related to student preferences may be penalized less severely than violating a soft
constraint related to resource utilization.
CHAPTER 4
The most creative and challenging phase of the life cycle is system design. The term
design describes a final system and the process by which it is developed. It refers to the
technical specifications that will be applied in implementations of the system. The
importance of software design can be stated in a single word “Quality”. Design provides us
with representations of software that can be assessed for quality. Design is the only way
where we can accurately translate user requirements into a complete software product or
system. Without design we risk building an unstable system that might fail if small changes
are made. It may as well be difficult to test, or could be one who’s quality can’t be tested.
So, it is an essential phase in the development of a software product. [23]
4.2 Flowchart
Flowchart is presented in figure 4.2 that describe several sequential steps require
to generate an optimise timetable. Flowchart, the starts with login page. The master modules
are created. Master modules contains subject, class, teacher & weekdays. Then allotment is
done among the master modules and constraints are set Genetic Algorithm is applied and
timetable is generated any modification in the timetable can be done and genetic algorithm
is applied and a new timetable get generated. The generated timetable is viewed according
to Classwise, Teacherwise and Schoolwise and the last gets printed.
Subject
Class
Teacher
Weekdays
Allotment of class and subject to the teacher. And allotment is done among the master
modules and constraints are set. Then Genetic Algorithm is applied and timetable is
generated any modification in the timetable can be done and genetic algorithm is applied
and a new timetable get generated.
It is the important part of project which generate Timetable automatically. This will
be generated by admin and viewed by Principal and Faculty who's are the users of the
system.
4.2.4 Print and Export Module: Printing time table in different formats and export.
The figure 4.3 shows the class diagram. Class diagram is to model the objects that
make up the system to display the relationship between the objects, and to describe what
those objects do and the services they provide. The process begins with user identification.
In login view there is User ID, password, which add both User ID and password for
authentication. The main user Interface contain subject view, class view, organization
window, Allotment view, timetable and class teacher view. All above views contain
multiple operation for filling the required details.
The DFD is also known as the bubble chart. It is a simple graphical formalism that can
be used to represent a system in terms of the input data to the system, various processing
carried out in these data and the output data generated by the system. Starting with a set of
high-level functions, the systems performance of DFD model is hierarchically represents by
various sub functions. In a normal convention, logical DFD can be completed using only
four notations:
A directed arc or an arrow is used as a Data Flow Symbol. This represents the data
flow occurring between two processes or between an external entity and a process in
direction of the Data Flow Arrow.
The output symbol is used when a hardcopy is produced and the user of the copies
cannot be clearly specified or there are several users of the output. The DFD at the simplest
level is referred to as the Context Analysis Diagram. These are expanded by level, each
explaining in process in detail. Processes are numbered for easy identification and are
normally labelled in block letters. Each data flow is labelled for easy understanding.
` The context diagram is the most abstract data flow representation of a system. It
represents the entire system as a single bubble. This bubble is labelled according to the main
function of the system. The various external entities with the system interact and the data
input to the system and the data output from the system are represented as incoming and
outgoing arrows. These data flow arrows should be annotated with the corresponding data
names.
CHAPTER 5
SYSTEM IMPLEMENTATION
The java programming language and relevant libraries can be integrated with the
specific problem being solved. For example, if the genetic algorithm is being used to
generate a timetable for a school, the code would need to incorporate the specific constraints
and objectives of the problem, such as the availability of teachers, classrooms, and students,
and the need to minimize conflicts and maximize utilization.
The core logic of the genetic algorithm can be implemented using Java programming
language. This involves creating classes and methods to generate the initial population of
chromosomes, evaluate the fitness of each chromosome, select the fittest chromosomes for
reproduction, and apply crossover and mutation to generate the next generation of solutions.
The Java code can use object-oriented programming principles to encapsulate the genetic
algorithm logic in classes and methods, making the code more modular, reusable, and
maintainable. [32]
The Vaadin framework is a Java web application framework that can be used to
create user interfaces for web applications. To implement the genetic algorithm, the Vaadin
framework can be used to create a user interface that allows users to input the problem
parameters, such as the number of classes, teachers, and students, and view the timetable
generated by the algorithm. The Vaadin framework provides a set of UI components, such
as buttons, input fields, and tables, that can be used to create the user interface. The Java
code can be integrated with the Vaadin UI code to allow users to interact with the genetic
algorithm and view the results. [27]
The Java code and Vaadin UI code can be customized to suit the specific problem
being solved, such as generating a timetable for a school. This involves modifying the
genetic algorithm code to incorporate the specific constraints and objectives of the problem,
such as the availability of teachers, classrooms, and students, and the need to minimize
conflicts and maximize utilization. The Vaadin UI code can be customized to provide an
intuitive and user-friendly interface for inputting the problem parameters and viewing the
timetable results. [32]
The implementation of the genetic algorithm using Java and Vaadin involves
multiple iterations of testing and refinement to ensure that it is effective and efficient for the
specific problem being solved. This might involve tweaking the parameters of the algorithm,
optimizing the fitness function, or incorporating additional features or constraints. The
Vaadin UI code can be tested for usability and accessibility, and refined to improve the user
experience. [25]
System Analysis
At this step the developers decide a roadmap of their plan and try to bring up the
best software model suitable for the project. System analysis includes Understanding of
5.6.2 Normalization
Normalization is the process of analyzing the given relation schemas based on their
Functional Dependencies and primary keys to achieve the desirable properties of
Minimizing Redundancy, Minimizing the insertion, deletion and updating anomalies.
Normalization is carried out for the following reasons:
Normalization consists of various levels:
1. First Normal Form (1NF):
A table is in 1NF if there are no duplicate rows in the table. Each cell is single valued.
Entries in a column are of the same kind.
2. Second Normal Form (2NF):
Second Normal form is based on the concept of full functional dependency. A table
(relation) is in 2NF if. It is in First Normal Form and if all non-key attributes are dependent
on the key. Dependent on only a part of the (composite) key, the definition of 2NF is
sometimes phrased as, "A table is in 2nF if it is in 1NF and if it has no partial dependencies.”
3. Third Normal Form (3NF):
The figure 5.8 shows the Entity Relationship (ER) diagram represents the
relationship among the entites. The ER diagram has user type of timetable uses in
organization. The module subject and teacher contains relation with class acording to the
allotment of subject to teachers the relation is displayed with consideration of teacher and
class modules class teacher are assigned. The three main modules techer, class and subject
are related to the module day and together combine to make timetable of a particular class
with alloted teacher for ythe subject of that class with respect to the working days.
CHAPTER 6
It is essential to consider several factors such as quality, efficiency, and scalability. While
comparing Automatic Timetable Generation using Genetic Algorithm with existing system.
6.1.1 Quality:
The quality of the generated timetables is crucial as it directly affects the educational
institution's ability to meet the constraints and requirements of the timetable. The genetic
algorithm approach can generate high-quality timetables by optimizing the fitness function,
which considers various constraints such as course offerings, teacher availability, and room
allocation. Additionally, the genetic algorithm approach allows for the inclusion of
additional constraints and preferences, which can lead to the generation of more
personalized timetables for students and teachers.
6.1.2 Efficiency:
6.1.3 Scalability:
6.2 Analysis of the Fitness Function and its Impact on the Results
The fitness function is a critical component of the genetic algorithm approach used
for automatic timetable generation. It is the function that evaluates the quality of the solution
represented by a particular chromosome and determines its fitness score. The fitness score
is used to select the best chromosomes for the next generation, ensuring the algorithm's
convergence towards the optimal solution.
The fitness function's design is essential as it determines the quality of the generated
timetables and impacts the algorithm's efficiency and convergence. Therefore, a thorough
analysis of the fitness function's design and its impact on the results is necessary.
The fitness function design should incorporate various constraints such as course
offerings, teacher availability, room allocation, and student preferences. Additionally, it
should prioritize certain constraints over others based on their importance and relevance to
the institution. For example, course offerings may be more critical than room allocation or
student preferences.
Furthermore, the fitness function should also consider the fairness of the generated
timetables by minimizing the number of conflicts and ensuring an equal distribution of
course offerings among teachers and students. The fairness component can be incorporated
by introducing a penalty term in the fitness function that penalizes the chromosomes with a
higher number of conflicts or uneven distribution of course offerings.
The impact of the fitness function design on the results is significant as it directly
affects the generated timetables' quality and the algorithm's efficiency and convergence. A
well-designed fitness function can lead to the generation of high-quality timetables that
satisfy the institution's requirements and constraints. On the other hand, a poorly designed
fitness function can result in the generation of low-quality timetables that may not meet the
requirements or constraints.
In conclusion, the fitness function's design is crucial to the success of the genetic
algorithm approach used for automatic timetable generation. It is necessary to carefully
consider the constraints and preferences relevant to the institution and prioritize them
appropriately. Additionally, fairness considerations should be incorporated to ensure equal
distribution and minimize conflicts. A well-designed fitness function can lead to the
generation of high-quality timetables, while a poorly designed one can led to suboptimal
results.
The genetic algorithm approach for automatic timetable generation has been proven
to be an effective and efficient solution. The approach's effectiveness can be attributed to
several factors such as flexibility, scalability, and the ability to handle various constraints
and preferences.
Flexibility:
The genetic algorithm approach is flexible and can accommodate various constraints
and preferences, making it suitable for different educational institutions. The algorithm can
be customized to incorporate specific constraints and preferences that are relevant to the
institution, leading to the generation of more personalized and optimized timetables.
Scalability:
The genetic algorithm approach can handle large-scale problems, making it suitable
for institutions with a large number of courses, teachers, and students. The algorithm's
parallel evaluation of fitness function and exploration of a large solution space in a relatively
short amount of time make it computationally efficient and scalable.
The genetic algorithm approach can handle various constraints and preferences such
as course offerings, teacher availability, room allocation, and student preferences. The
algorithm's ability to prioritize constraints and preferences based on their importance and
relevance to the institution leads to the generation of high-quality timetables that meet the
institution's requirements.
6.4 Results
6.4.1 Login view
The figure 6.4.1 shows the user login page. In this view of timetable, a user login
page that allow users to access the timetable system by entering their username and
password. The page typically serves as a security measure to ensure that only authorized
user can access the timetable system.
The figure 6.4.2, an organization page that display information regarding the organization
and institution. The page contains some required fields such as name of the timetable and
organization name.
The above figure 6.4.3 shows dashboard view, a dashboard view provides an overview of
the timetable system which helps user to easily understand the functionality of the system.
The dashboard typically displays important information such as the user schedule, day,
subject period, class, teacher, allotment and generate the timetable. The timetable system,
can help user to easily access and manage their schedules.
The figure 6.4.4 shows Day View, day refers to the scheduling of the activities or classes
with in a specific time periods. A school day consist of several periods of time, with each
period being assigned to a specific subject or activity, the day may be divided in to multiple
session such as morning, afternoon, and evening with each session having a different set of
activities.
The figure 6.4.5 refer to the number of time slot or class period that are scheduled with in a
single day. The number of periods in a single day is depending upon the preference of the
institution or organization. But typically, it ranges from 4 to 8 periods per day.
The figure 6.4.6 show the subject view, in this view we can add Subject title, subject code,
and priority of the subject and assign the subjects to the session. And we can also add
different colour codes for more clarifications.
The figure 6.4.7 refer to the allotment of the subject to the class with respect to the priority
of the subject. When designing a timetable, it is important to assigned each subject to its
appropriate time slot and the consideration of availability of teachers and classrooms.
In figure 6.4.8 shows teacher view, there are several fields such as teacher’s name, teacher’s
short name, designation of the teacher qualification etc. In this module the teacher’s name,
teacher’s short name and designation is mandatory.
In figure 6.4.9, the class view shows the class, division and strength of the class.
In figure 6.4.10 class teacher view shows that which teacher assign to which class and which
division.
The figure 6.4.11 shows user view, in user view module they are having three field such as
user id, password and user type that means the activity status of the user and it also shows
the activeness of the users.
The figure 6.4.12 shows the allotment page. The allotment is done weekly, so that the
allotment module shows teacher name and total lecture on a week. This view shows which
teacher allotted to which class and which subject they have to be taken.
The figure 6.4.13 shows timetable view, the timetable would show the schedules of all
classes, teachers, resources for a given period of time. The timetable shows which teacher
taken which subject in which class and division.
The figure 6.4.14 shows the timetable for students, this timetable helps the students to view
their daily schedule.
The figure 6.4.15 shows the timetable for teachers, in this view the teacher can use their
schedule appropriately and take their lectures on respective class without any conflicts.
The figure 6.4.16 shows the timetable for school, the timetable would show the
schedules of all classes, teachers, resources for a given period of time. The school wise
timetable includes information on other activities such as breaks, lunchtime and extra
curriculum activities. A Schoolwise timetable can also help teachers to coordinate their
schedules, collaborate with one another and ensure that all classes are taught effectively and
efficiently.
The results obtained from the experiments conducted using the genetic algorithm
approach demonstrate its effectiveness in generating high-quality timetable. The algorithm
successfully balances conflicting objectives, such as minimizing clashes and maximizing
resource utilization, resulting in timetables that meet various constraints and requirements.
Utilization of genetic algorithms in eTimetables optimization demonstrates their
effectiveness in generating high-quality timetables. This approach offers improved
efficiency, adaptability, and scalability compared to traditional methods. The given results
satisfied the constraints, generated the timetable without any empty space and an optimised
timetable is obtained in less time.
CHAPTER 7
7.1 Conclusion
Through the use of genetic operators such as selection, crossover, and mutation, the
algorithm iteratively improves the generated timetables over successive generations. The
selection process favors solutions with higher fitness, ensuring that only the best timetables
are carried forward. Crossover and mutation introduce diversity and exploration, allowing
the algorithm to search a wide range of possible solutions.
Additionally, the genetic algorithm is highly adaptable and flexible, capable of
handling various constraints and objectives simultaneously. It can incorporate constraints
such as room availability, instructor preferences, and student course preferences, ensuring
that the generated timetables satisfy multiple criteria. This versatility makes it an invaluable
tool for generating optimal timetables in complex and dynamic scheduling environments.
In conclusion, the utilization of genetic algorithm in the automatic timetable
generation process offers significant advantages in terms of efficiency, adaptability, and
scalability.
Incorporating new constraints and preferences: While the genetic algorithm approach
can handle various constraints and preferences, there may be additional constraints or
preferences that are relevant to specific institutions that are not yet incorporated into the
algorithm.
Optimization of fitness function: The fitness function is a crucial component of the genetic
algorithm approach, and optimizing it can lead to the generation of more efficient and
effective timetables. Investigating and developing new fitness function designs or refining
existing designs can lead to improved results.
Comparison with other machine learning approaches: While the genetic algorithm
approach has been shown to be effective, comparing it with other machine learning
approaches such as neural networks, decision trees, or support vector machines can provide
a better understanding of its effectiveness and identify areas for improvement.
This project will be a great helpful for the institution’s because, it is a great difficult
task that to manage many Faculties and allocating subjects for them at a time manually and
this project will help to manage it properly. This manage timetable for faculty with
considering maximum and minimum workload, and can be managed easily.
In future, this work can be included, in the timetable generation using genetic algorithm.
Adding the future work in upcoming time will make the project more robust and
scalable. The report concludes, with user friendly generating timetable using genetic
algorithm, optimizing fitness function, and comparing it with other machine learning
approaches.
REFERENCES
[1] Burke EK, Ross P. The Practice and Theory of Automatic Timetabling: Selected Papers from the First
International Conference, Edinburgh, 1995, Lecture Notes in Computer Science, Vol. 1153. Berlin: Springer;1996.
[2] Burke EK, Carter MW. The Practice and Theory of Automatic Timetabling: Selected Papers from the Second
International Conference, Toronto, 1997, Lecture Notes in Computer Science, Vol. 1408. Berlin: Springer; 1998.
[3] Burke EK, Carter MW. The Practice and Theory of Automatic Timetabling: Selected Papers from the Third
International Conference, Konstanz, 2000, Lecture Notes in Computer Science, Vol. 2079. Berlin: Springer;
2001.
[4] Carter MW, Laporte G. Recent developments in practical course timetabling. In: Burke EK, Carter MW.The
Practice and Theory of Automatic Timetabling: Selected Papers from the Second International Conference,
Toronto,1997, Lecture Notes in Computer Science, Vol. 1408. Berlin: Springer; 1998. p. 3–19.
[5] Burke EK, Petrovic S. Recent research directions in automated timetabling. European Journal ofOperational
Research 2002;140(2):266–80.
[7] Mooney EL, Rardin RL, Parmenter WJ. Large-scale classroom scheduling. IIE Transactions
1996;28(5):369–78.
[8] Colorni A, Dorigo M, Maniezzo V. Metaheuristics for high-school timetabling. Computational Optimization
and Applications 1998;9(3):275–98.
[9] Burke, Edmund K., and James P. Newall. "A multistage evolutionary algorithm for the timetable
problem." IEEE transactions on evolutionary computation 3.1 (1999): 63-74.
[10] E. K. Burke, D. G. Elliman, and R. F. Weare, “A hybrid genetic algorithm for highly constrained
timetabling problems,” in Genetic Algorithms: Proceedings of the 6th International Conference, L. J. Eshelman,
Ed. San Francisco,CA: Morgan Kaufmann, 1995, pp. 605–610.
[11] E. K. Burke, J. P. Newall, and R. F. Weare, “A memetic algorithm for university exam timetabling,” inThe
Practice and Theory of Automated Timetabling: Selected Papers from the 1st International Conference (Lecture
Notes in Computer Science 1153), E. Burke and P. Ross, Eds. Berlin, Germany: Springer-Verlag, 1996, pp. 241–
250.
[12] D. Corne, P. Ross, and H. Fang, "Fast practical evolutionary timetabling," in Lecture Notes in
Computer Science 865 (AISB Workshop on Evolutionary Computing), T. C. Fogarty, Ed. Berlin: Springer-Verlag,
1994, pp. 250–263.
[13] B. Paechter, A. Cumming, and H. Luchian, “The use of local search suggestion lists for improving the
solution of timetable problems with evolutionary algorithms,” in Lecture Notes in Computer Science 993 (AISB
Workshop on Evolutionary Computing), T. C. Fogarty, Ed. Berlin: Springer-Verlag, 1995, pp. 86–93.
[15] D. J. A. Welsh and M. B. Powell, “An upper bound for the chromatic number of a graph and its application
to timetable problems,” Comput. J., vol. 10, pp. 85–86, 1967.
[16] J. M. Thompson and K. A. Dowsland, “General cooling schedules for a simulated annealing based
timetabling system,” in The Practice and Theory of Automated Timetabling: Selected Papers from the 1 st
International Conference (Lecture Notes in Computer Science 1153), P. Ross and E. Burke, Eds. Berlin:
Springer-Verlag, 1996, pp. 345–364.
[17] A. Hertz, “Tabu search for large scale timetabling problems,” Eur. J. Oper. Res., vol. 54, pp. 39–47, 1991.
[18] Pongcharoen, Pupong, et al. "Stochastic optimization timetabling tool for university course
scheduling." International journal of production economics 112.2 (2008): 903-918.
[19] Alvarez-Valdes, R., Crespo, E., Tamarit, J.M., 2002. Design and implementation of a course scheduling
system using tabu search. European Journal of Operational Research 137 (3), 512-523.
[20] Santiago-Mozos, Ricardo, et al. "A two-phase heuristic evolutionary algorithm for personalizing
course timetables: a case study in a Spanish university." Computers & operations research 32.7
(2005): 1761-1776.
[21] Burke EK, Elliman DG, Weare RF. A hybrid genetic algorithm for highly constrained timetabling
problems. In: Proceedings of the Sixth International Conference on Genetic Algorithms. San Francisco, CA:
Morgan Kaufmann;1995.
[22] Daniel, Paul Godwin, Alimi Olasunkanmi Maruf, and Bala Modi. "Paperless Master Timetable
Scheduling System.& quot; International Journal of Applied 8.2 (2018).
[23] R.K,.Ojha, D., Mohapatra D.P., and Patra, M.R. (2017).Automatic Generation and Optimization of
CourseTimetable using a Hybrid Approach. Journal of Theoretical and Applied Information Technology,
95(1):68-77, 15th January 2017.
[24] Samah, Khyrina Airin Fariza Abu, et al. "A Greedy-based Algorithm in Optimizing Student’s
Recommended Timetable Generator with Semester Planner." International Journal of Advanced Computer
Science and Applications 13.1 (2022).
[25] Singh, Harnirvair, Ritu Sibal, and Sulabh Tyagi. "GATT: A Genetic Algorithm-based Tool for
Automating Timetable Scheduling at Netaji Subhas University of Technology." 2021 Thirteenth
International Conference on Contemporary Computing (IC3-2021). 2021
[27] Burke EK, Carter MW. The Practice and Theory of Automatic Timetabling: Selected Papers from the
Second International Conference, Toronto, 1997, Lecture Notes in Computer Science, Vol. 1408. Berlin:
Springer; 1998.
[28] Gueret C, Jussien N, Boizumault P, Prins C. Building university timetables using constraint logic
programming. In: Burke EK, Ross P, editors. The Practice and Theory of Automatic Timetabling: Selected
Papers from the First International Conference, Edinburgh, 1995, Lecture Notes in Computer Science, Vol. 1153.
Berlin: Springer; 1996. p.130 – 45.
[29] White GM. Constrained satisfaction, not so constrained satisfaction and the timetabling problem. In: Burke
EK, Carter MW, editors. The Practice and Theory of Automatic Timetabling: Selected Papers from the Third
International Conference, Konstanz, 2000, Lecture Notes in Computer Science, Vol. 2079. Berlin: Springer;
2001. p. 32– 47.
[30] https://www.tutorialspoint.com/eclipse/eclipse_overview.htm
[32] Oladipo, Williams Kehinde, Ajayi Olutayo Bamidele, and Ajinaja Micheal Olalekan. "Automatic Timetable
Generation using Genetic Algorithm." International Journal of Applied Information Systems (IJAIS) 12 (2019):
19.
[33] https://www.google.com/search?q=automatic+timetable+generator+using+genetic+algorithm&rlz=1C1
ONGR_enIN1055IN1055&sxsrf=APwXEdeh9ZrUqsx_hVobmw1gDElHRJBaQ:1684510767218&source=l
nms&tbm=isch&sa=X&ved=2ahUKEwijuJnP24H_AhWBnmMGHeY0AYcQ_AUoAnoECAEQBA&biw=
1366&bih=657&dpr=1#imgrc=9hspvh8nIufjZM&imgdii=Og0GCG4zAi5RGM
APPENDIX-A (Coding)
i. Login view:
package com.eneuron.views;
import java.io.File;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.List;
import com.eneuron.MainLayout;
import com.eneuron.backend.OrganizationRepository;
import com.eneuron.util.Base64;
com.vaadin.flow.component.Html;import
com.vaadin.flow.component.Text; import
com.vaadin.flow.component.UI;
import com.vaadin.flow.component.html.H1;
import com.vaadin.flow.component.html.H3;
import com.vaadin.flow.component.html.Image;
import com.vaadin.flow.component.html.Label;
import com.vaadin.flow.component.login.LoginForm;
import com.vaadin.flow.component.login.LoginOverlay;
import com.vaadin.flow.component.login.AbstractLogin.LoginEvent;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.component.page.Viewport;
import com.vaadin.flow.router.PageTitle;
import com.vaadin.flow.router.Route;
import com.vaadin.flow.router.Router;
import com.vaadin.flow.server.PWA;
import com.vaadin.flow.server.VaadinSession;
import bean.User;
@Route("login")
@PageTitle("Login - eTimeTabler")
@Viewport(Constants.VIEWPORT)
LoginOverlay component;
this.organizationrepository = organizationrepository;
setMargin(false);
component.setForgotPasswordButtonVisible(true);
title.setSizeFull();
title.add(img);
component.setTitle(title); component.setDescription("TimeTable
(euser!=null) {
MainLayout.euser = euser;
try {
ois.close()
if(listcompany.isEmpty()) {
}else {
MainLayout.organization = organizationrepository.findByOrganizationid(1);
component.close();
}catch(Exception e2) {
e2.printStackTrace();
} component.close();
} else {
component.setError(true);
});component.setOpened(true);
setAlignItems(Alignment.CENTER);
setSizeFull();
try {
if(user.getId().equals(e.getUsername())&&user.getPassword().equals(Base64.encode(e.getPasswor
d()))) {
return user;
}return null;
}catch(Exception e1) {
e1.printStackTrace();
return null;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.eneuron.data.AbstractEntity;
@Entity
@Table(name = "organization")
public class Organization extends AbstractEntity{
@NotEmpty
@NotNull
@Column(unique=true, nullable = false, length = 50)
private String name;
@NotEmpty
@NotNull
@Column(nullable = false, length = 50)
private String address;
@NotEmpty
@NotNull
@Column(nullable = true, length = 50)
private String city;
@NotNull
private Integer pincode;
@NotEmpty
@NotNull
@Column( length = 50)
private String email;
@NotEmpty
@NotNull
@Column( length = 15)
private String Mobile;
@NotNull
@Column( nullable = true)
private Integer regNo;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public Integer getPincode() {
return pincode;
}
public void setPincode(Integer pincode) {
this.pincode = pincode;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMobile() {
return Mobile;
}
public void setMobile(String mobile) {
Mobile = mobile;
}
public String getWebsite() {
return website;
}
public void setWebsite(String website) {
this.website = website;
}
public Integer getRegNo() {
return regNo;
}
public void setRegno(Integer regNo) {
this.regNo = regNo;
}
@Override
public String toString() {
return "Organization [name=" + name + ", address=" + address + ", city=" + city + ", pincode=" + pincode
+ ", email=" + email + ", Mobile=" + Mobile + ", website=" + website + ", regNo=" + regNo + "]";
}
@Override
public int hashCode() {
return Objects.hash(Mobile, address, city, email, name, pincode, regNo, website);
}
@Override
public boolean equals(Object obj) {if
(this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Organization other = (Organization) obj;
import com.eneuron.MainLayout;
import com.vaadin.flow.component.Html;
import com.vaadin.flow.component.html.H3;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.router.BeforeEnterEvent;
import com.vaadin.flow.router.BeforeEnterObserver;
import com.vaadin.flow.router.Route;
import com.vaadin.flow.server.VaadinSession;
import entity.Organization;
public MainView() {
@Override
public void beforeEnter(BeforeEnterEvent event) {
if(MainLayout.euser==null) {
event.forwardTo(LoginView.class);
}
if(MainLayout.organization==null) {
}else {
MainLayout.lcompany.setText(MainLayout.organization.getOrganizationname());
}
}
}
iv. Day:
package com.eneuron.data.entity;
import java.util.List;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.eneuron.data.AbstractEntity;
@Entity
@Table(name = "day")
public class Day extends AbstractEntity{
@NotEmpty
@NotNull
@Column(unique=true, nullable = false, length = 50)
private String name;
@NotNull
@Column( nullable = false, length = 20)
private Integer noofPeroid;
@Column( nullable = false) private
Integer shortReccess;
@Column( nullable = false) private
Integer longReccess;
@Column( nullable = false)
@NotNull
private Boolean isholiday;
@OneToMany(mappedBy = "day")
private List<TimeTable>timetableList;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getNoofPeroid() {
return noofPeroid;
}
public void setNoofPeroid(Integer noofPeroid) {
this.noofPeroid = noofPeroid;
}
public Integer getShortReccess() {
return shortReccess;
}
public void setShortReccess(Integer shortReccess) {
this.shortReccess = shortReccess;
}
public Integer getLongReccess() {
return longReccess;
}
public void setLongReccess(Integer longReccess) {
this.longReccess = longReccess;
}
import java.util.Objects;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import com.eneuron.data.AbstractEntity;
@Entity
@Table(name = "remainingperiod")
public class RemainingPeriod extends AbstractEntity{
@Override
public String toString() {
return "RemainingPeriod [allotment=" + allotment + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + Objects.hash(allotment);
return result;
}
@Override
public boolean equals(Object obj) {if
(this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
RemainingPeriod other = (RemainingPeriod) obj;
return Objects.equals(allotment, other.allotment);
}
}
vi. Subject:
package com.eneuron.data.entity;
import java.util.List;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.eneuron.data.AbstractEntity;
@Entity
@Table(name = "subject")
public class Subject extends AbstractEntity {
@NotEmpty
@NotNull
@Column(nullable = false, unique=true , length = 50)
private String name;
@NotEmpty
@NotNull
@NotNull
@Column(nullable = false)
private int sessionPeriod;
@NotEmpty
@NotNull
@Column(nullable = false, unique=true ,length = 7)
private String colorCode;
@OneToMany(mappedBy = "subject")
private List<SubjectTeacher> subjectteacherList;
@OneToMany(mappedBy = "subject")
private List<SubjectPeriod> subjectperiodList;
@OneToMany(mappedBy = "subject")
private List<Allotment> allotmentList;
@OneToMany(mappedBy = "subject")
private List<TimeTable> timetableList;
@Override
public boolean equals(Object obj) {if
(this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
Subject other = (Subject) obj;
return Objects.equals(allotmentList, other.allotmentList) &&
Objects.equals(code, other.code)
&& Objects.equals(colorCode, other.colorCode) &&
Objects.equals(name, other.name)
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import com.eneuron.data.AbstractEntity;
@Entity
@Table(name = "subjectperiod")
public class SubjectPeriod extends AbstractEntity {
@NotNull
@Column(nullable = false)
private int weigtage;
public Subject getSubject() {
return subject;
}
public void setSubject(Subject subject) {
this.subject = subject;
}
public Class getClasss() {
return classs;
}
public void setClasss(Class classs) {
this.classs = classs;
}
public int getWeigtage() {
return weigtage;
}
public void setWeigtage(int weigtage) {
this.weigtage = weigtage;
}
@Override
public String toString() {
return "SubjectPeriod [subject=" + subject + ", classs=" + classs + ", weigtage=" + weigtage
+ "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + Objects.hash(classs, subject, weigtage);
return result;
}
@Override
public boolean equals(Object obj) {if
(this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
SubjectPeriod other = (SubjectPeriod) obj;
return Objects.equals(classs, other.classs) && Objects.equals(subject, other.subject)
&& weigtage == other.weigtage;
}
}
viii. Teacher:
package com.eneuron.data.entity;
import java.time.LocalDate;
import java.util.Date; import
java.util.List;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.eneuron.data.AbstractEntity;
@Entity
@Table(name = "teacher")
public class Teacher extends AbstractEntity {
@NotEmpty
@NotNull
@Column(nullable = false, length = 50)
private String name;
@NotEmpty
@NotNull
@Column(unique=true, nullable = false, length = 20)
private String shortname;
@Column(nullable = true)
privateteger seniorityno;
@Column(nullable = true)
private LocalDate dob;
@Column(nullable = true)
private LocalDate doj;
@Column(nullable = true)
private LocalDate dor;
@Column(length = 100)
private String qualification;
@NotEmpty
@NotNull
@Column(nullable = false, length = 100)
private String address;
@NotEmpty
@NotNull
@Column(length = 12)
private String mobile;
@OneToMany(mappedBy = "teacher")
private List<SubjectTeacher> subjectteacherList;
@OneToMany(mappedBy = "teacher")
private List<Allotment> allotmentList;
@OneToMany(mappedBy = "teacher")
private List<TimeTable> timetableList;
}
public LocalDate getDob() {
return dob;
}
public void setDob(LocalDate dob) {
this.dob = dob;
}
public LocalDate getDoj() {
return doj;
}
public void setDoj(LocalDate doj) {
this.doj = doj;
}
public LocalDate getDor() {
return dor;
}
public void setDor(LocalDate dor) {
this.dor = dor;
}
public String getQualification() {
return qualification;
}
public void setQualification(String qualification) {
this.qualification = qualification;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public Designation getDesignation() {
return designation;
}
public void setDesignation(Designation designation) {
this.designation = designation;
}
public List<SubjectTeacher> getSubjectteacherList() {
return subjectteacherList;
}
public void setSubjectteacherList(List<SubjectTeacher> subjectteacherList) {
this.subjectteacherList = subjectteacherList;
}
public List<ClassTeacher> getClassteacherList() {
return classteacherList;
}
public void setClassteacherList(List<ClassTeacher> classteacherList) {
this.classteacherList = classteacherList;
}
public List<Allotment> getAllotmentList() {
return allotmentList;
}
public void setAllotmentList(List<Allotment> allotmentList) {
this.allotmentList = allotmentList;
}
public List<TimeTable> getTimetableList() {
return timetableList;
}
public void setTimetableList(List<TimeTable> timetableList) {
this.timetableList = timetableList;
}
@Override
public String toString() {
return "Teacher [name=" + name + ", shortname=" + shortname + ", seniorityno="
+ seniorityno + ", dob="
+ dob + ", doj=" + doj + ", dor=" + dor + ", qualification=" +
qualification + ", address="
+ address + ", mobile=" + mobile + ", designation=" +
designation + ", subjectteacherList="
+ subjectteacherList + ", classteacherList=" + classteacherList +
", allotmentList=" + allotmentList
+ ", timetableList=" + timetableList + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + Objects.hash(address, allotmentList, classteacherList,
designation, dob, doj, dor,
mobile, name, qualification, seniorityno, shortname,
subjectteacherList, timetableList);
return result;
}
@Override
public boolean equals(Object obj) {if
(this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
Teacher other = (Teacher) obj;
return Objects.equals(address, other.address) && Objects.equals(allotmentList,
other.allotmentList)
&& Objects.equals(classteacherList, other.classteacherList) &&
Objects.equals(designation, other.designation) &&
Objects.equals(dob, other.dob)
&& Objects.equals(doj, other.doj) && Objects.equals(dor,
other.dor)
&& Objects.equals(mobile, other.mobile) &&
Objects.equals(name, other.name)
&& Objects.equals(qualification, other.qualification)
&& Objects.equals(seniorityno, other.seniorityno) &&
Objects.equals(shortname, other.shortname)
&& Objects.equals(subjectteacherList, other.subjectteacherList)
&& Objects.equals(timetableList, other.timetableList);
}
ix. Class:
package com.eneuron.data.entity;
import java.util.List;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull; import
com.eneuron.data.AbstractEntity;
@Entity
@Table(name = "class")
public class Class extends AbstractEntity{
@NotEmpty
@NotNull
@Column(nullable = false, length = 20)
private String division;
@JoinColumn(name = "baseclassId", referencedColumnName = "id", nullable = true)
@ManyToOne(optional = true)
private BaseClass baseClass;
@NotEmpty
@NotNull
@Column(nullable = false, length = 20)
private Integer strength;
@OneToMany(mappedBy = "classs")
private List<SubjectTeacher> subjectteacherList;
@OneToMany(mappedBy = "classs")
private List<SubjectPeriod> subjectperiodList;
@OneToMany(mappedBy = "classs")
private List<Allotment> allotmentList;
@OneToMany(mappedBy = "classs")
private List<TimeTable> timetableList;
}
@Override
public boolean equals(Object obj) {if
(this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
Class other = (Class) obj;
return Objects.equals(allotmentList, other.allotmentList) && Objects.equals(baseClass,
other.baseClass)
&& Objects.equals(classteacherList, other.classteacherList) &&
Objects.equals(division, other.division)
&& Objects.equals(strength, other.strength)
&& Objects.equals(subjectperiodList, other.subjectperiodList) &&
Objects.equals(subjectteacherList, other.subjectteacherList)&&
Objects.equals(timetableList, other.timetableList);
}
}
x. Class Teacher:
package com.eneuron.data.entity;
import java.util.Objects;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import com.eneuron.data.AbstractEntity;
import javax.persistence.*;
@Entity
@Table(name = "classteacher")
public class ClassTeacher extends AbstractEntity{
import com.eneuron.data.AbstractEntity;
import com.eneuron.data.Role;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.Set;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Lob; import
javax.persistence.Table;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Entity
@Table(name = "user")
public class User extends AbstractEntity {
@NotEmpty
@NotNull
@Basic(optional = false)
@Column(nullable = false, length = 50)
private String username;
@NotEmpty
@NotNull
@Basic(optional = false)
@Column(nullable = false, length = 50)
private String name;
@JsonIgnore
@NotEmpty
@NotNull
@Basic(optional = false)
@Column(nullable = false)
private String hashedPassword;
@ElementCollection(fetch = FetchType.EAGER)
private Set<Role> roles;
@Lob
@Column(nullable = true)
private String profilePictureUrl;
import java.util.List;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.eneuron.data.AbstractEntity;
@Entity
@Table(name = "allotment")
public class Allotment extends AbstractEntity {
@NotEmpty
@NotNull
@Column(nullable = false, length = 20)
private String period;
@OneToMany(mappedBy = "allotment")
private List<TimeTable> timetableList;
public String getPeriod() {
return period;
}
public void setPeriod(String period) {
this.period = period;
}
public Class getClasss() {
return classs;
}
public void setClasss(Class classs) {
this.classs = classs;
}
public Teacher getTeacher() {
return teacher;
}
public void setTeacher(Teacher teacher) {
this.teacher = teacher;
}
public Subject getSubject() {
return subject;
}
public void setSubject(Subject subject) {
this.subject = subject;
}
public List<TimeTable> getTimetableList() {
return timetableList;
}
public void setTimetableList(List<TimeTable> timetableList) {
this.timetableList = timetableList;
}
@Override
public String toString() {
return "Allotment [period=" + period + ", classs=" + classs + ", timetableList=" +
timetableList + "]";
}
@Override
xiii. TimeTable:
package com.eneuron.data.entity;
import java.util.Objects;
import javax.persistence.Basic; import
javax.persistence.Column; import
javax.persistence.Entity; import
javax.persistence.JoinColumn; import
javax.persistence.ManyToOne;import
javax.persistence.Table;
import com.eneuron.data.AbstractEntity;
@Entity
@Table(name = "timetable")
public class TimeTable extends AbstractEntity{
@Basic(optional = false)
@Column(nullable = false)
private Integer periodNo;
@JoinColumn(name = "classId", referencedColumnName = "id", nullable = false)
@ManyToOne(optional = false)
private Class classs;