Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

1

TIME TABLE GENERATOR

1.ABSTRACT

Automatic Timetable Generator is a Java based software used to generate


timetable automatically. Currently timetable is managed manually. It will help
to manage all the periods automatically and also will be helpful for faculty to
get timetable in their phone by using application. It will also manage timetable
when any teacher is absent, late coming or early going. Maximum and
minimum work load for a Faculty for a day, week and month will be specified
for the efficient generation of timetable. By using this software users can apply
for leave by providing leave required date, reason and also with substitute
faculty. When selecting a faculty as substitute it allows viewing timetable of
that faculty for ensure that the faculty is free at that particular period.
Substitute can approve or reject request. Principal can also view the request
send by faculty and can also view substitute response .Principal can approve /
reject request
2

2.INTRODUCTION
Time table scheduling has been in human requirements since they
thought of managing time effectively. It is widely used in schools, colleges
and other fields of teaching and working like crash courses, couching centers,
training programs etc. In the early days, time table scheduling was done
manually with a single person or some group involved in the task of
scheduling it with their hands, which takes a lot of effort and time. Scheduling
even the smallest constraints can take a lot of time and the case is even worse
when the number of constraints or the amount of data to deal with increases.
In such cases, a perfectly designed time table is reused for the whole
generation without any changes, proving to be dull in such situations. Other
cases that can cause problems is when the number of employers or workers is
weak, resulting in rescheduling of the time table or they will need to fill on
empty seats urgently.
Academic Institutions (Schools, Colleges, Universities, etc.) are the regular
users of such time tables. They need to schedule their courses to meet the need
of current duration and facilities that are available to them. However, their
schedule should meet the requirement of new course addition and newly
enrolled students to fresh batches. This may result in rescheduling the entire
time table once again for its entire batches and to be scheduled in the shortest
possible time before the batch courses start. Timetable generation is an NP-
hard problem .i.e. there is no specific algorithm which can be used for creating
timetables. As constraints for timetables vary from institute to institute, a
separate algorithm has to be defined for each one of them.
To get the best performance out of our algorithms, we allot slots to
subjects in such a way that either they get their final positions or remain
unallocated which is allotted later after other subjects are allotted. Also the
arrangement of teachers plays a major role in the methodology to be used as
most of the subject constraints as well as teachers are validated while
assigning teachers. Basically, this problem depends on the lecture-room,
lecturer-lecture relations. Solution of this problem is to schedule all lectures in
a timetable by considering the rooms/labs/lecture theatres that 2 will be used
and the lectures that will be offered.
This problem has some specific constraints. In literature they are known
as “hard‟ and “soft‟ constraints. Hard constraints are important and they have
to be satisfied in order to have a feasible solution. Soft constraints do not have
to be satisfied but they make the solution more applicable. The timetable
problem can be categorized into various types (e.g., rail timetable, examination
timetable, school timetable, course timetable etc.) by considering different
specific constraints, processes and resources. The particular instance chosen
for implementation in this project is the lecture timetable.
3

The lecture timetable problem is to organize Subject, Teacher, Room,


and Period in order to satisfy the set of constraints. The problem formulation is
as follows:
Set of subjects S = {s1, s2,…, sn}
Set of teachers T = {t1, t2, …, tm}
Set of rooms R = {r1, r2, …, ro}
Set of periods P = {p1, p2,… pk}
A combination (a, b, c, d) in which a є S, b є T, c є R, d є P, can be stated
as “teacher b teaches subject a in room c during period d”. The relation of
subjects and teachers are fixed in all tuples. The lecture timetable problem can
be interpreted as the scheduled rooms and periods in tuples and the solution of
this problem is a set of tuples which satisfy all constraints. Assigning lectures
to time periods is equivalent to the graph colouring problem. This is one of the
approaches or algorithms that shall be investigated. Another approach, a
heuristic algorithm, will also be looked at in great detail.
4

3.EXISTING SYSTEM

In the existing system, each task is carried out manually and processing is a
very tedious job. The Organization is not able to achieve its need in time and
the results too may not be accurate. Due to all the manual maintenance, there
are number of difficulties and drawbacks that exist in this system. Drawbacks
of the Existing System: Increased transaction leads to the increased source.
• document and hence maintenance becomes difficult.
5

4.PROPOSED SYSTEM
This web application provides features for Users to buy their furniture in
online. Users need to register with our site as they search and place furniture
item in our site. We are responsible for communication between User and the
admin and maintain the database. It also provides an extra module that it
accepts complaints for furniture items from the users. Admin will assign a
member to solve a complaint. In this project admin only maintain all the data’s
in database and manage the system.

ADVANTAGES:
• Furniture are supplied by admin directly.
• Provides an effective communication between customer and the vendor.

DISADVANTAGES:
• They are not providing all good quality products.
• Providing not effective communication between customer and the
vendor.
6

5.SYSTEM REQUIREMENTS:

5.1HARDWARE REQUIREMENTS:

➢ System : Pentium IV 2.4 GHz.


➢ Hard Disk : 40 GB.
➢ Floppy Drive : 1.44 Mb.
➢ Monitor : 15 VGA Colour.
➢ Mouse : Logitech.
➢ Ram : 512 Mb.

5.2SOFTWARE REQUIREMENTS:

➢ Operating system : Windows XP/7.


➢ Coding Language : JAVA/J2EE
➢ IDE : Netbeans 7.4
➢ Database : MYSQL
7

6.FEASIBILITY STUDY
The feasibility of the project is analyzed in this phase and business proposal is
put forth with a very general plan for the project and some cost estimates.
During system analysis the feasibility study of the proposed system is to be
carried out. This is to ensure that the proposed system is not a burden to the
company. For feasibility analysis, some understanding of the major
requirements for the system is essential.
Three key considerations involved in the feasibility analysis are
 ECONOMICAL FEASIBILITY
 TECHNICAL FEASIBILITY
 SOCIAL FEASIBILITY

6.1ECONOMICAL FEASIBILITY
This study is carried out to check the economic impact that the system will
have on the organization. The amount of fund that the company can pour into
the research and development of the system is limited. The expenditures must
be justified. Thus the developed system as well within the budget and this was
achieved because most of the technologies used are freely available. Only the
customized products had to be purchased.
6.2TECHNICAL FEASIBILITY
This study is carried out to check the technical feasibility, that is, the technical
requirements of the system. Any system developed must not have a high
demand on the available technical resources. This will lead to high demands
on the available technical resources. This will lead to high demands being
placed on the client. The developed system must have a modest requirement,
as only minimal or null changes are required for implementing this system.

6.3SOCIAL FEASIBILITY
The aspect of study is to check the level of acceptance of the system by the
user. This includes the process of training the user to use the system
efficiently. The user must not feel threatened by the system, instead must
accept it as a necessity. The level of acceptance by the users solely depends on
the methods that are employed to educate the user about the system and to
make him familiar with it. His level of confidence must be raised so that he is
also able to make some constructive criticism, which is welcomed, as he is the
final user of the system.
8

7.SYSTEM ANALYSIS
7.1PROBLEM STATEMENT
The manual solution of the timetabling problem usually requires many person-
days of work. In addition, the solution obtained may be unsatisfactory in some
respect. How can lectures be scheduled or assigned to periods and rooms over
a limited time period such that either no conflicts or a minimum number of
conflicts occur and to satisfy a number of side constraints?
The aim of this project is to develop a simple, easily understandable and
efficient program using an effective and optimal algorithm, which
automatically generates good quality time tables within seconds, while
considering all constraints and violating none of the hard constraints.
Efforts were put in place to ensure that the system developed is generic enough
to accommodate the varying constraints that come along with each specific
academic institution. With this system, there is no need to modify or redesign
the algorithm for any particular institution. Therefore, this system is expected
to work for most if not all departments at the University of Zambia and many
other universities and colleges.

Objective:
To minimize or completely avoid conflicts or clashes, which occur when
lectures involve common students, common lecturers or require the same
classrooms/labs/halls. To research on various types of timetabling problem
algorithms and determine the most efficient, effective, fastest and optimal
algorithm.
Proposed work:
The system to be developed is expected to generate conflict free timetables
(while satisfying all the hard constraints concerned) in less time (just a matter
of seconds), with less effort and with more efficiency. It will allow users to
work on and view time tables in different platforms and view different
information simultaneously. It will have a simple interface and hence will be
so easy to use.
Advantage:
• Easy to use
• Save time
9

• Allocate automatically

7.2MODULES DESCRIPTION
This Project has following modules
1. ADMIN
2. STAFF
3. STUDENT
ADMIN:
1. Login
2. Add Staff
3. View Staff
4. Update Staff
5. Generate Time Table
6. Logout
STAFF:
1. Login
2. View Details
3. Add Student
4. Add Subjects
5. Generate Time Table
6. Logout
STUDENT:
1. Login
2. View Details
3. View Time Table
4. Add Staff Feedback
10

8.SYSTEM DESIGN
8.1INPUT DESIGN
The input design is the link between the information system and the user. It
comprises the developing specification and procedures for data preparation
and those steps are necessary to put transaction data in to a usable form for
processing can be achieved by inspecting the computer to read data from a
written or printed document or it can occur by having people keying the data
directly into the system. The design of input focuses on controlling the amount
of input required, controlling the errors, avoiding delay, avoiding extra steps
and keeping the process simple. The input is designed in such a way so that it
provides security and ease of use with retaining the privacy. Input Design
considered the following things:
➢ What data should be given as input?
➢ How the data should be arranged or coded?
➢ The dialog to guide the operating personnel in providing input.
➢ Methods for preparing input validations and steps to follow when error
occur.

OBJECTIVES
1.Input Design is the process of converting a user-oriented description of the
input into a computer-based system. This design is important to avoid errors in
the data input process and show the correct direction to the management for
getting correct information from the computerized system.
2. It is achieved by creating user-friendly screens for the data entry to handle
large volume of data. The goal of designing input is to make data entry easier
and to be free from errors. The data entry screen is designed in such a way that
all the data manipulates can be performed. It also provides record viewing
facilities.
3.When the data is entered it will check for its validity. Data can be entered
with the help of screens. Appropriate messages are provided as when needed
so that the user
will not be in maize of instant. Thus the objective of input design is to create
an input layout that is easy to follow
8.2OUTPUT DESIGN
11

A quality output is one, which meets the requirements of the end user and
presents the information clearly. In any system results of processing are
communicated to the users and to other system through outputs. In output
design it is determined how the information is to be displaced for immediate
need and also the hard copy output. It is the most important and direct source
information to the user. Efficient and intelligent output design improves the
system’s relationship to help user decision-making.
1. Designing computer output should proceed in an organized, well thought
out manner; the right output must be developed while ensuring that each
output element is designed so that people will find the system can use easily
and effectively. When analysis design computer output, they should Identify
the specific output that is needed to meet the requirements.
2.Select methods for presenting information.
3.Create document, report, or other formats that contain information produced
by the system.
The output form of an information system should accomplish one or more of
the following objectives.
❖ Convey information about past activities, current status or projections of
the
❖ Future.
❖ Signal important events, opportunities, problems, or warnings.
❖ Trigger an action.
❖ Confirm an action.
12

8.3ER-DIAGRAM
13

9.SYSTEM ARCHITECTURE:

ADMIN STAFF STUDENT


Add, View and
View Details
Update Staff View Details

Add Student Add Staff


Add Subjects Feedback

Generate Generate Time View Time


Time Table Table Table
14

9.1TABLE STRUCTURE

Admin Table:

Seria Column Data type Constraint


l Name s
No:
1 Id int Primary
key
2 username varchar(45) Not Null
3 Password varchar(45) Not Null
4 Type varchar(45) Not Null

Course Table:

Serial Column Data type Constraint


No: Name s
1 Course id int Primary
key
2 Course name Varchar Not Null
(45)

Faculty_hour:

Serial Column Data type Contraints


No: name
15

1 Id faculty int Primary


key
2 hour int Not Null
3 taken int Not Null

Staff Login

Serial Column Data Type Constraints


No Name
1 Id int Primary key

2 Name varchar(45) Not Null

3 Password varchar(45) Not Null

4 Date varchar(45) Not Null

5 Mail id varchar(45) Not Null

6 Designation varchar(45) Not Null

7 Subject varchar(45) Not Null

8 Address varchar(45) Not Null


16

10.CODING
Apply Leave

package autotimetable;
import
java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import
javax.servlet.ServletException;
import
javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class signup extends HttpServlet {
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-
8"); String path="index.jsp#overlay";;
try {
DB d=new DB();
String
uname=request.getParameter("name");
String
pass1=request.getParameter("pass1");
String
pass2=request.getParameter("pass2");
String fname=request.getParameter("fn");
17

String lname=request.getParameter("ln");
String addr=request.getParameter("addr");
String
contactno=request.getParameter("cn");
String dob=request.getParameter("dob");
String doj=request.getParameter("doj");
String
qualific=request.getParameter("qu");
String
email=request.getParameter("email");
String
maddr=request.getParameter("maddr");
String
course=request.getParameter("course");
String subjectlist[]=request.getParameterValues("subjectslist");
String slist="";
for(int i=0;i<subjectlist.length;i++){
// System.err.println("subjectlist
:"+subjectlist[i]); slist=slist+subjectlist[i]+",";
}
ArrayList<String> a=new ArrayList<String>();
a.add(uname);
a.add(pass1);
a.add(pass2);
a.add(fname);
a.add(lname);
a.add(addr);
a.add(contactno
); a.add(dob);
a.add(doj);
a.add(qualific
);
a.add(email);
a.add(maddr);
a.add(course);
a.add(slist);
d.addTeacher(a);
path="index.jsp?success
";
} finally {
18

}
response.sendRedirect(path);
}
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
processRequest(request, response);
}
protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
processRequest(request, response);
}
public String getServletInfo() {
return "Short description";
}
}

Substitute request

<%@page import="java.sql.ResultSet"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<jsp:useBean id="object" class="autotimetable.DB" />
<%
ResultSet r=object.getSubst(session.getAttribute("id")+"");
out.print("<table id='admin_menu'>");
out.print("<th>");
out.print("</th>");
out.print("<th>");
out.print("</th>");
out.print("<th>");
out.print("Requested
By</th>");
19

out.print("<th>");
out.print("Requested For</th>");
out.print("<th>");
while(r.next()){
out.print("<tr>");
out.print("<td>");
out.print("<div style='padding: 10px 10px 10px 10px; background-
color:green'><a href='user/leaveAction.jsp?id="+session.getAttribute("id")
+"&date="+r.getString(2)+"&action=approved' style='text-
decoration:none;color:white'>Approve</a></div>");
out.print("</td>");
out.print("<td>");
out.print("<div style='padding: 10px 10px 10px 10px; background-
color:Red'><a href='user/leaveAction.jsp?id="+session.getAttribute("id")
+"&date="+r.getString(2)+"&action=Rejected' style='text-
decoration:none;color:white'>Reject</a></div>");
out.print("</td>");
20

11.SCREENSHOTS
21
22
23
24
25
26
27

12.SYSTEM TESTING

The purpose of testing is to discover errors. Testing is the process of trying to


discover every conceivable fault or weakness in a work product. It provides a
way to check the functionality of components, sub assemblies, assemblies
and/or a finished product It is the process of exercising software with the intent
of ensuring that Software system meets its requirements and user expectations
and does not fail in an unacceptable manner. There are various types of test.
Each test type addresses a specific testing requirement.

TYPES OF TESTS
Unit testing
Unit testing involves the design of test cases that validate that the
internal program logic is functioning properly, and that program inputs
produce valid outputs. All decision branches and internal code flow should be
validated. It is the testing of individual software units of the application .it is
done after the completion of an individual unit before integration. This is a
structural testing, that relies on knowledge of its construction and is invasive.
Unit tests perform basic tests at component level and test a specific business
process, application, and/or system configuration. Unit tests ensure that each
unique path of a business process performs accurately to the documented
specifications and contains clearly defined inputs and expected results.
Integration testing
Integration tests are designed to test integrated software components to
determine if they actually run as one program. Testing is event driven and is
more concerned with the basic outcome of screens or fields. Integration tests
demonstrate that although the components were individually satisfaction, as
shown by successfully unit testing, the combination of components is correct
and consistent. Integration testing is specifically aimed at exposing the
problems that arise from the combination of components.
Functional test
Functional tests provide systematic demonstrations that functions tested are
available as specified by the business and technical requirements, system
documentation, and user manuals.
Functional testing is centered on the following items:
Valid Input : identified classes of valid input must be accepted.
Invalid Input : identified classes of invalid input must be rejected.
Functions : identified functions must be exercised.
28

Output : identified classes of application outputs must be exercised.


Systems/Procedures: interfacing systems or procedures must be invoked.
Organization and preparation of functional tests is focused on requirements,
key functions, or special test cases. In addition, systematic coverage pertaining
to identify Business process flows; data fields, predefined processes, and
successive processes must be considered for testing. Before functional testing
is complete, additional tests are identified and the effective value of current
tests is determined.
System Test
System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable results.
An example of system testing is the configuration oriented system integration
test. System testing is based on process descriptions and flows, emphasizing
pre-driven process links and integration points.
White Box Testing
White Box Testing is a testing in which in which the software tester has
knowledge of the inner workings, structure and language of the software, or at
least its purpose. It is purpose. It is used to test areas that cannot be reached
from a black box level.
Black Box Testing
Black Box Testing is testing the software without any knowledge of the
inner workings, structure or language of the module being tested. Black box
tests, as most other kinds of tests, must be written from a definitive source
document, such as specification or requirements document, such as
specification or requirements document. It is a testing in which the software
under test is treated, as a black box .you cannot “see” into it. The test provides
inputs and responds to outputs without considering how the software works.
Unit Testing:
Unit testing is usually conducted as part of a combined code and unit test
phase of the software lifecycle, although it is not uncommon for coding and
unit testing to be conducted as two distinct phases.
Test strategy and approach
Field testing will be performed manually and functional tests will be
written in detail.
Test objectives
• All field entries must work properly.
• Pages must be activated from the identified link.
• The entry screen, messages and responses must not be delayed.
29

Features to be tested
• Verify that the entries are of the correct format
• No duplicate entries should be allowed
• All links should take the user to the correct page.

Integration Testing

Software integration testing is the incremental integration testing of two or


more integrated software components on a single platform to produce failures
caused by interface defects.
The task of the integration test is to check that components or software
applications, e.g. components in a software system or – one step up – software
applications at the company level – interact without error.
Test Results: All the test cases mentioned above passed successfully. No
defects encountered.

Acceptance Testing
User Acceptance Testing is a critical phase of any project and requires
significant participation by the end user. It also ensures that the system meets
the functional requirements.
Test Results: All the test cases mentioned above passed successfully. No
defects encountered.
30

13.LITERATURE REVIEW
A large number of variants of the timetabling problem have been
proposed in the literature, which differ from each other based on the type of
institution (university or school) involved and the type of constraints. We
classify the timetabling problems into three main classes: School timetabling:
The weekly scheduling for all the classes of a school,
avoiding teachers
 meeting two classes at the same time, and vice versa; Course
timetabling: The weekly scheduling for all the lectures of a set of university
courses,
 minimizing the overlaps of lectures of courses having common
students; Examination timetabling: The scheduling for the exams of a set of
university courses,
 avoiding overlap of exams of courses having common students, and
spreading the exams for the students as much as possible.
Based on this classification, we develop a separate discussion for each of
the three problems and we devote a section to each of them. However, such
classification is not strict, in the sense that there are some specific problems
that can fall between two classes, and cannot be easily placed within the above
classification.
For example, the timetabling of a specific school which gives large
freedom to the student regarding the set of courses can be similar to a course
timetabling problem (A. Schaerf, 1999). In some cases, the timetabling
problem consists of finding any timetable that satisfies all the constraints. In
these cases, the problem is formulated as a search problem. In other cases, the
problem is formulated as an optimization problem. That is, what is required is
a timetable that satisfies all the hard constraints and minimizes (or maximizes)
a given objective function which embeds the soft constraints. As shown later,
in some approaches, the optimization formulation is just a means to apply
optimization techniques to a search problem. In this case, what is minimized is
the so-called distance to feasibility. Even when the problem is a true
optimization problem, the distance to feasibility may be included in the
objective function.
This is generally done to facilitate the search for the best solution. In both
cases (search and optimization), we define the underlying problem, which is
the problem of deciding if there exists a solution, in the case of a search
problem, and the 9 problem of deciding if there exists a solution with a given
31

value of the objective function, in the case of an optimization problem. When


we mention the complexity of the problem, we refer to the complexity of the
underlying decision problem (A. Schaerf, 1999).
As we will see later, the underlying problem is NP complete in almost all
variants. Therefore, an exact solution is achievable only for small cases (e.g.,
less than 10 courses), whereas real instances usually may involve a few
hundreds of courses. It follows that only heuristic methods (Pearl, 1984) are
feasible, which have not guaranteed to reach the (optimal) solution. Most of
the early techniques (Schmidt and Strohlein, 1979) were based on a simulation
of the human way of solving the problem. All such techniques, that we call
direct heuristics, were based on a successive augmentation. That is, a partial
timetable is extended, lecture by lecture, until all lectures have been scheduled.
The underlying idea of all approaches is “schedule the most constrained
lecture first", and they differ only on the meaning they give to the expression
`most constrained'. Later on, researchers started to apply general techniques to
this problem.
We therefore see algorithms based on integer programming, network
flow, and others. In addition, the problem has also been tackled by reducing it
to a well-studied problem: graph coloring. More recently, some approaches
based on search techniques used also in Artificial Intelligence appeared in the
literature; among others, we have simulated annealing, tabu search, genetic
algorithms, and constraint satisfaction. In this research, the solution techniques
are surveyed, putting the emphasis on the most recent approaches in general,
and on Artificial Intelligence techniques in particular. Notice that included in
the list of techniques also are some items, e.g., logic programming, which are
general tools for the development of the solution, rather than real solution
techniques.
In those cases, specified also is the technique implemented using the
given tool. Many authors believe that the timetabling problem cannot be
completely automated. The reason is twofold: On the one hand, there are
reasons that make one timetable better than another one that 10 cannot easily
be expressed in an automatic system. On the other hand, since the search space
is usually huge, a human intervention may bias the search toward promising
directions that the system by itself might be not able to find.
For the above reasons, most of the systems allow the user at least to
adjust manually the final output. Some systems however, require a much larger
human intervention, so that we call them interactive (or semi-automatic)
timetabling systems (A. Schaerf, 1999).
32

14.CONCLUSION
This project has evolved from just a mere idea into a life changing Time
Table Generation System that will definitely have an instant impact on
academic institutions. Users (college or university administrators) will
generate timetables automatically instead of the laborious manual way of
having to brain storm on how to avoid course or room clashes by student
groups.
The system will generate time tables in a quicker and more convenient
way, thereby saving a lot of time and effort in the process. During the system
analysis and design stages, objects were identified from the functional
requirements, contextual and block designs were constructed and with the aid
of special software development tools such as Visual Paradigms, use case
diagrams, sequence diagrams, activity diagrams and class diagrams were
created which ultimately led to the implementation of the fullfledged software
system. 70 The project met the aims and objectives and thus the software
system is capable of performing the core operations it was primarily developed
for.
33

15.REFERENCES
BOOKS
Software Engineering Fifth edition by R. S.Pressman, McGraw-Hill
Publication, 1997

WEBSITES
http://en.wikipedia.org/wiki/MySQL
http://www.wpi.edu/Serlvets & JSP - Falkner Jones.pdf
http://edutechwiki.unige.ch/en/Educational_technology
http://www.wpi.edu/Images/Tutorial_JSP
http://en.wikipedia.org/wiki/JSP
34

You might also like