Applying Software Engineering Approach

Print   

02 Nov 2017

Disclaimer:
This essay has been written and submitted by students and is not an example of our work. Please click this link to view samples of our professional work witten by our professional essay writers. Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of EssayCompany.

Abstract

There are various scheduling problems like traveling salesman problem, Project scheduling problem, task scheduling and timetable scheduling problem. Scheduling problems are NP problems and having local maxima and minima of several of single scheduling problem. University Course timetabling/Course Timetabling/Class Timetabling problem is common scheduling problem in which set of events are to be scheduled in the given timeslots by considering the limited resources. The timetabling is an important activity for wide variety of education institute from the administration point of view. University Timetable problem is resource and timeline constrained problem.

Genetic Algorithm is population based heuristic method extensively used in scheduling actually applied for constraint optimization problem. In Genetic Algorithm we are generating random solutions first called as populations and then try to generate feasible solution with the help of mechanisms selection, crossover and mutation. There are varieties of scheduling problem exist like task scheduling, timetable scheduling, employee scheduling of which solution is variable at variable locations. Scheduling class timetable is common scheduling problem in which set of events are to be arranged in available timeslots along with limited resources and constraints. Selection of solutions is an important aspect in genetic algorithm which decides the quality of offspring generated. Selection is a way to make space for good solution to in and bad solution to out from population.

In this project we were worked with small instance of timetable problem which required scheduling 100 events in 45 timeslots. There are various selection suggested to use in genetic algorithm. We used tournament selection 2 and tournament selection 5 to check the quality of offspring generated. We found considerable improvement in solution generated with tournament selection 5.

Chapter 1

Introduction

Overview

Timetabling concerns all activities with regard to making a timetable. According to Collins Concise Dictionary (4th Edition) a timetable is a table of events arranged according to the time when they take place. The events are usually meetings between people at a particular location. Consequently, a timetable specifies which people meet at which location and at what time. A timetable must meet a number of requirements and should satisfy the desires of all people involved simultaneously as well as possible. The timing of events must be such that nobody has more than one event at the same time.

In this project we are focusing on generating a timetable which will show the events scheduled in appropriate classrooms along with satisfying constraint of resources available. Optimization simply leads to minimize the constraint violations occurred while generating timetable. Figure 1 shows general concept of class timetable.

Genetic algorithm is population based heuristic method largely applied to solve the scheduling problems. Genetic algorithms (GA’s) are search methods based on principles of natural selection and genetics [6]. GA’s encode the decision variables of a search problem into finite-length strings of alphabets of certain cardinality. For example, in a problem such as the traveling salesman problem, a chromosome represents a route, and a gene represents a city.

Brief Description The timetabling problem considered here is a reduction of a typical university course timetabling problem. According to Rossi-Doria [7] the problem consists of a set of events or classes E to be scheduled in available timeslots, a set of rooms R in which events can take place, a set of students S who attend the events, and a set of features F satisfied by rooms and required by events. A feasible timetable is one in which all events have been assigned a timeslot and a room so that the following hard constraints that must be satisfied:

– No student attends more than one event at the same time;

– The room is big enough for all the attending students and satisfies all the features required by the event;

– Only one event is in each room at any timeslot.

– One event is assigned to one teacher only.

In addition, a candidate timetable is penalized equally for each occurrence of the following soft-constraint violations:

– A student has a class in the last slot of a day;

– A student has more than two classes in a row;

– There should not be too consecutive events for the student group/class.

– Avoid unpopular time slots like Monday Morning, Saturday afternoon

Note that the soft constraints have been chosen to be representatives of three different classes: the first one can be checked with no knowledge of the rest of the timetable; the second one can be checked while building a solution, taking into account the events assigned to nearby timeslots; and finally the last one can be checked only when the timetable is complete, and all events have been assigned a timeslot. The objective of the problem is to minimize the number of soft constraint violations in a feasible solution. All infeasible solutions are considered worthless. The constraint modification is possible as per the requirement of problem.

Problem Definition

In this approach we assign an event (course and lecture) into a time slot and also assign a number of resources (students and rooms) in such a way that there is no conflict between the rooms, time slots, and events. As mentioned by Rossi-Doria et al. [7], the Class Timetable consists of a set of n events (classes and subjects) E ={e1, e2, . . . , en } to be scheduled into a set of 45 time slots T ={t1, t2, . . . , t45} (i.e., nine for each day in a five day week), a set of m available rooms R = {r1, r2, . . . , rm} in which events can take place, a set of k students S = {s1, s2, . . . , sk } who attend the events, and a set of l available features F = {f1, f2, . . . , fl} that are satisfied by rooms and required by events. In addition, interrelationships between these sets are given by five matrices. The first matrix Ak,n , called Student-Event matrix, shows which event is attended by which students. In Ak,n, the value of ai,j is 1 if student i ∈ S should attend event j ∈ E; otherwise, the value is 0. The second matrix Bn,n , called Event- Conflict matrix, indicates whether two events can be scheduled in the same time slot or not. It helps to quickly identify events that can be potentially assigned to the same time slot. The third matrix Cm,l , called Room-Features matrix, gives the features that each room possesses, where the value of a cell ci,j is 1 if i ∈ R has a feature j ∈ F; otherwise, the value is 0. The fourth matrix Dn,l , called Event-Features matrix, gives the features required by each event. It means that event i ∈ E needs feature j ∈ F if and only if dij = 1. The last matrix Gn,m, called Event-Room matrix, lists the possible rooms to which each event can be assigned. Through this matrix, we can quickly identify all rooms that are suitable in size and feature for each event. Usually, a matrix is used for assigning each event to a room ri and a time slot ti . Each pair of (ri, ti) is assigned a particular number that corresponds to an event. If a room ri in a time slot ti is free or no event is placed, then "−1" is assigned to that pair. In this way, we assure that there will be not more than one event assigned to the same pair so that one of the hard constraints will always been satisfied. For every time slot, there is a list of events taking place in it and a preprocessed list of possible rooms to which the placement of events can occur. The matching algorithm uses a deterministic network flow algorithm and gives the maximum cardinality matching between rooms and events. In general, the solution can be represented in the form of an ordered list of pairs (ri, ti), of which the index of each pair is the identification number of an event ei ∈ E (i = 1, 2, . . , n). For example, the time slots and rooms are allocated to events in an ordered list of pairs like

(3, 5), (3, 4), (1, 13), . . . , (4, 8)

where room 3 and time slot 5 are allocated to event 1, room 3 and time slot 4 are allocated to event 2, etc. The goal of this technique is to minimize the soft-constraint violations of a feasible solution (a feasible solution means that no hard-constraint violation exists in the solution). The objective function f(s) for a timetable s is the weighted sum of the number of hard-constraint violations #hcv and soft-constraint violations #scv, is defined as follows

f(s) := #hcv(s) ∗ C +#scv(s)

Where C is a constant, which is larger than the maximum possible number of soft-constraint violations.

1.5 Mathematical Modelling

Timetable problem consist of

Set of Events E {e1,e2,…………en}

Set of Rooms R {r1,r2,…………rm}

Set of Features F {f1,f2,…………...fl}

Set of Student S {s1,s2,…………..Sk}

Set of timeslots T {t1,t2,………….t45}

It is expected to schedule these n events in 45 timeslots with appropriate room selection which having required feature to conduct the event. The relationship among between these entities is well explained by using two–dimensional matrix.

Event-Room Matrix: This matrix keeps track about which event is scheduled in which room. This is explained with following relation

0 if ith event do not required jth room

ERij =

1 if ith event required to schedule jth room

Event-Feature Matrix: This matrix keeps track about which event is required which feature to conduct. This is explained with following relation

0 if ith event do not required jth feature

EFij =

1 if ith event required jth feature in room

Room-Feature Matrix: This matrix keeps track about which room is having which feature. This is explained with following relation

0 if ith room is not having jth feature

RFij =

1 if ith room is having jth feature

Student-Event Matrix: This matrix keeps track about which student attending which event. This is explained with following relation

0 if ith is not attending jth event

SEij =

1 if ith student is attending jth event

Applying Software Engineering Approach

Applying software engineering approach simply means developing the software development methodology which structure, plan and control the process of developing a system. It includes predefinition of deliverables and artifacts that are created and completed by project team. Some available approaches for this modeling are

Waterfall: a linear framework

Prototyping: an iterative framework

Incremental: a combined linear-iterative framework

Spiral: a combined linear-iterative framework

Rapid application development (RAD): an iterative framework

Extreme Programming

The Waterfall model is a traditional engineering approach applied to software engineering In the waterfall approach, the whole process of software development is divided into separate phases. These phases in waterfall model are:

1. Requirement specification phase

2. Software design

3. Implementation

4. Testing and maintenance

1.4.1 Requirement specification phase

The requirement of this project is to generate an optimized class/course timetable in a stipulated time. Here optimizing means minimizing the soft constraint violations that can occur in timetable in some exceptional conditions. System must generate a feasible timetable with minimum soft constraint violation. For generating the feasible timetable, we are having bench mark data set with us with three different instances.

1.4.2 System Design

Overall system consists of three main modules.

Input Processing: This module is responsible to process the available data set. Here process means read the content of data set accurately and then prepare the required metadata from that reading. In this module , system is reading the problem instance supplied as input to project and then outputs different relationship matrix as described in section 1.3

Applying Local Search: Applying local search is used to evaluate the solutions generated in intermediate processing of system. This module checks the feasibility of solutions with the help of soft constraint and hard constraint. If some soft constraint or hard constraint are present in solution system will try to remove it. This is the core part of our system which gives improved solution with minimum soft constraint violations.

Applying Genetic Algorithm: Here in this module we are applying GA along with its key parameters crossover and mutation. In this we are selecting the available solutions with system and then selecting proper ones to generate a new improved solution. The selection methodology employed for selecting proper solutions for next generation play vital role in overall process of GA.

1.4.3 Implementation

We decided to use Work Breakdown Structure (WBS) for implementation of optimized class timetable using genetic algorithm. Following figure shows detailing of WBS used for this project. It mainly consists of three modules as described in section 1.4.2. Figure No.1 will give us detailed view of work breakdown structure.

1.4.4 Testing

We mainly used unit testing to test the results/outcomes are getting at each step of execution. We have tested our system result for each smallest unit as specified in Work Breakdown structure in section 1.4.3. After getting expected outcomes from unit testing we tested whole system to see the expected outcomes. We employed unit testing and integration testing for these both scenarios.

Timetable

Genetic Algorithm

Local Search

Input Processing

Selection

Remove Soft Constraints

Read Problem Instance

Crossover

Apply First Move

Relationships using Matric

Mutation

Apply Local Search

Apply Second Move

Possible Rooms for Event

Apply Third Move

Remove Hard Constraints

Apply First Move

Apply Second Move

Apply Third Move

Calculate Penalty

Chapter 2

LITERATURE SURVEY

Various approaches using genetic algorithm are proposed to solve the UCTP. Shengxiang Yang and Sadaf Naseem Jat [3] are proposed GSGA (Guided Search Genetic Algorithm) to solve UCTP. They used matrix representation of the relationships of different events present in this problem. When the random population is generated by GA, local search technique is then applied to select better chromosome for next execution. In this technique they used MEM Data structure to store the partial solution while executing GA. This MEM Data structure stores the solutions which will be lost in selection and generation process. The local search algorithm used is having three Neighborhood structures which are randomly replace timeslot or classroom or event in order to generate the optimized solution. They started with random solutions. Then, in each generation, one individual is generated as follows. First, two parents are selected using the tournament selection (of a tournament size 2). Then, crossover is carried out with a crossover probability to generate one child. After crossover, the child undergoes the mutation operation with a mutation probability and then, makes a move within the selected Neighborhood structure. After mutation, Local search is performed on the child. Finally, the newly generated child is used to replace the worst individual from the population. Fitness function is the number of times hard constraint and soft constraint are violated. In this paper the termination condition is pre-set time defined as tmax. If tmax is not sufficient then maximum generation can be made as termination condition.

Sandor Gyori, Zoltan Petres and Koczy [9] proposed GA to solve UCTP based on the set theory. The smallest data unit is the set. This structure can consist of any number of classes, teachers and rooms. These sets are indivisible during the optimization process; they are moved together in the different timeslots. Its meaning is the following: the teachers given in the set hold lessons to the classes in the given rooms in one same timeslot. The main concept does not define which teacher gives lessons to which classes and where the lessons are to be held. This method allows solving such problematic situations as class merging and splitting in a very flexible way. This representation is very convenient for computer processing, but for a human reader it is hard to understand. So, it is expedient (typically at the end of the optimization process) to map the sets placed in different timeslots to one of the classical representations. In order to make a one-to-one mapping, it has to be exactly known that which teacher gives lessons in what subject to which class, thus the sets have to be completed with additional information as the subjects and also as the associations between the classes, teachers, and subject, room and group triplets. The best individual in this method is identified by its penalty values. These penalty values are then used to form fitness function for GA. the fitness function ensures the best convergence. It has been developed by using reciprocal functions. At the beginning when the penalty values are high the differences between the fitness values are not sufficiently significant to make distinction between the competing individuals, while getting closer to the optimum the penalty values become much lower, the fitness function discriminates more sharply, thus it emphasizes the more viable individuals. In this way the chromosomes containing excellent parts also get some chance to transmit their genetic substrate in spite of the fact that other parts are worse than the average. One point crossover is effectively used in this technique.

Othman MK. Alsmadi, Alia Algsoon [1] proposed novel GA to solve UCTP. In this the number of constraint on instructor (teacher), room, and overloaded teacher and feature constraints are taken into account. They used section concept which is calculated based on failure rate and room size. The formula for the same is

nsss = ( nl + fr . nl+1 ) / 50 * 2 ----------(1)

where nsss is number of section-per-subject-per-semester.

nl is number of students in the course level, nl+1 is number of student in the next level, f r is failure rate for this course, 50 is the assumed room maximum seat capacity, and 2 is the number of semesters per year. The GA has been applied to the faculty of engineering and technology at the University of Jordan (JU) and found optimized result when compared with handwritten data. Fitness function depends upon the number of time Hard constraint and soft constraints are violated as defined in problem formulation. This algorithm terminates when fitness function is having values more than decided constant value or maximum generations are meet.

Xinyang Deng, Yajuan Zhang [2] proposed mathematical model along with set theory for the GA. They implement one objective function which is as follows

Z = max ∑ (wi X p(SCi)) ------- (2)

This technique used six tuples to represent lecture unit. The fitness function is defined based on the degree of satisfying soft constraints using above equation (2).

It contains TeachersfiID, ClassfiID, CoursefiID, ClassroomfiID, StartTime, Duration. Obviously, for a course whose times more than once, there are several lecture units to represent it. All elements of the lecture unit are encoded by array of characters. A set of lecture units which satisfies all hard constraints is a solution of university course timetabling problem according to equation (2). So, a lecture unit is called a gene and a solution is called a chromosome. The fitness function can be defined based on the satisfy degree of soft constraints according to equation (2). The mutation operation is implemented by changing the elements of lecture unit. Through the step of reproduction, a second generation population is generated. A iteration is completed so far. Then, the selection and reproduction will be repeated iteratively until the number of genetic generations reaches the fixed number of maximum generations which is the termination condition for this technique.

Hitoshi Kanoh, M. Kondo, M. Sugimoto [8] is proposed GA based on minimizing conflict heuristic. The method proposed the following strategies concerning encoding, genetic operation and fitness evaluation.

(1) They used a general heuristics to simplify the encoding. Employees working on the same day were allocated similar time slots. This can affect a reduction in the space to be searched.

(2) Partial solutions are considered to be viruses, and a population of viruses is created in addition to a population of individuals. As a result of infection (a separate operation), the genes of a virus are substituted for those of an individual. This is aimed at a quick accumulation of partial solutions by using infection to improve the rate of search.

(3) The fitness of an individual producing, by crossover, offspring with low fitness is decreased. This means that a penalty is imposed on parents producing bad offspring.

The fitness of a schedule is measured by the degree to which the schedule meets the constraints. The algorithm terminates when upper limit of generation has been reached.

R. Sivaraj and Dr. Ravichandran [10] focused on the selection methodologies that employed to select parents in GA to generate a child so called offspring. All of these selection mechanisms have the same purpose of creating more copies of the individuals with higher fitness than those with lower fitness. However the selection mechanisms differ in the manner in which they allocate copies to the fittest individuals. A selection method has the higher selection measure than the other if it makes more copies of the best individuals thereby eliminating low fit individuals rapidly. A strong selection mechanism reaches equilibrium faster than a weaker method. But it also sacrifices genetic diversity that may be needed to find an adequate solution. Different selection mechanisms work well under different situations. Appropriate method has to be chosen for the specific problem to increase the optimality of the solution

Chapter 3

SOFTWARE REQUIREMENT SPECIFICATION

3.1 Introduction This project report concern with generating the optimized timetable using Genetic Algorithm. Timetable construction problems are interesting objects to study because neither modeling nor solving them is straight forward. It is very difficult to make clear which acceptable and non-acceptable timetable is. Because of the large diversity in acceptance criteria, realistic timetable construction problems are multidimensional. Each dimension may introduce its own characteristic aspects that add to the complexity of the problem. Therefore, only heuristic solution approaches without known performance guarantees are practically feasible. We pay special attention to timetable construction problems at class. A typical characteristic of making class timetable is there we are getting freedom to construct it. We need to decide allocation od resources first and then generating timetable. This decision is not typical for school timetable construction problems. However, it frequently occurs in university course timetabling problems.

Timetabling concerns all activities with regard to making a timetable. According to Collins Concise Dictionary (4th Edition) a timetable is a table of events arranged according to the time when they take place. The events are usually meetings between people at a particular location. Consequently, a timetable specifies which people meet at which location and at what time. A timetable must meet a number of requirements and should satisfy the desires of all people involved simultaneously as well as possible. The timing of events must be such that nobody has more than one event at the same time.

In this project we are focusing on generating a timetable which will show the events scheduled in appropriate classrooms along with satisfying constraint of resources available. Optimization simply leads to minimize the constraint violations occurred while generating timetable.

3.1.1 Purpose Designing a system which takes input as problem instance and generate a feasible solution is not easy task. Feasibility of generated solution is subject to number of Hard constraints and soft constraints present in the solution. A solution is called feasible only if there is not any hard constraint present in it. The main purpose of this thesis is to generate optimized class timetable with varying selection method. The solution must be generated in stipulated time with minimum soft constraint violations so as to called optimized solution. This will help people to generate effective timetable in less time. Basically this tool is analytical tool for the people to test the performance of Genetic Algorithm.

3.1.2 Intended Audience and Reading Suggestions This project is mainly for the education sector especially in administration of classes which required allocation of resource to take the class. The schedule contains interdependencies, and constraints that help to identify conflicts and bottlenecks. When completed, the schedule produces a realistic and achievable timetable for executing the work, given the real-world constraints and limitations. Attendees must have worked on a program or project, or have participated in the procurement process for an IT initiative.

3.1.3 Project Scope This document explains the complete functionality designed and developed for making optimized class timetable using genetic algorithm. This tool is mainly used to generate a feasible class timetable in less time along with soft and hard constraint satisfactions. This tool is trying to minimize the soft constraint violation that might present in a solution. It is not intended to use it as an application to generate class timetable. This can be used in testing schedules with constraint. This can be applied for Project Management, Making schedules. Use of this tool will definitely help you to get optimized solutions.

3.1.4 Design and Implementation Constraint

For this project we required visual studio 2010 professional edition. Implementation of this project requires having knowledge of Genetic Algorithm and its operators. The generated solution must be feasible. This project must satisfy all the constraint specified to satisfy by any timetable. All of available timeslots must be effectively used. It must be worked with available infrastructure.

3.1.5 Assumption and Dependencies a. Problem instance must be available in system. b. Performance of the algorithm depends upon the Problem and Selection method. c. Feasibility of solution depends upon the number of soft constrain violations. d. Genetic Algorithm must initialized with total number of generations and operators probability.

3.2 System Features

3.2.1 System Feature 1 Reading of problem instance is must for a system. It must specify total number of events to schedule, total rooms available, total features available and total student available. Classification is these things in matrix relationship must be accurate.

3.2.2 System Feature 2 Random number generation must be in range 0 to 1.

3.2.3 System Feature 3 Genetic Algorithm will start only after evaluating all possible solution present in population and sorting it as per their fitness value. All solution must contain all events that are present in problem instance. The total timeslots reflected along with these events must be in range of 0 to 44.

3.2.4 System Feature 3 System must try to eliminate hard constraint from solution if present and then it move to eliminate soft constraint.

3.2.4 System Feature 4 A feasible solution must not have any hard constraint violation.

3.3 External Interface Requirements

3.3.1 User Interface User interface is provided to supply the input details. First the problem instance, total number of generations and local search probabilities. 3.3.2 Hardware Interface CPU: Used to carry out all instruction execution related to generate timetable.

Keyboard: Used to supply user centric input like total number of generations, population size.

LAN: It is used for communication purposes.

USB: A data storage device that include ash memory with an integrated USB. 3.3.3 Software Interface

System runs on windows7 operating system required the problem instance file location in program. The file pointers used in program is responsible making interface with problem instance so we can read it. The program will use this and construct the solution which is stored on secondary storage.

3.3.4 Communication Interface

No Communication interface is required as system is deployed on standalone machine

3.4 Non Functional Requirements

3.4.1 Performance Requirements System should not have any diverse results if there is change in Problem instance. System should produce class timetable with minimum soft constraint violations. Accuracy of system is expected to upto 80% for all problem instance It must provide feasible solution in time.

3.4.2 Safety Requirements The location where we are keeping our system should have concealed wirings. The electricity/power supplied should have proper connection to ground. User must keep adequate distance from the system. Use of glass while using system is recommended.

3.4.3 Security Requirements

System should be maintained in a secure computer that can be accessible only to authenticated Users. The premise should have adequate equipment’s in order to protect data on computer in case of fire or earthquake. The location of computer where we are keeping our system must be cleaned. Alternate backup computer should be available in case of failure. Parallel power backup should be there in case of power cut. Room temperature must be maintained below 30 degree.

3.4.4 Software Quality Attributes We are our system with following Software quality attributes

Attributes

Quality

Availability

System is available at any time in day (24 x 7).

Maintainability

Easy to maintain as requires less space to generate solution.

Usability

Easy to use. Not required high skills in Computer

Reusability

Not reusable. Protected.

Portability

Easily portable anywhere in premises.

3.5 Other Requirements

3.5.1 Database Requirements Problem Instance: This project complete relies on the benchmark dataset available with WATT -- The EURO Working group on Automated TimeTabling. The problem instances available are standard data sets and well tested for timetabling problems. The details of these data sets are as follows

Class of Problem Instance

Small

Medium

Large

Number of events

100

400

400

Number of rooms

5

10

10

Number of Features

5

5

10

Number of students

80

200

400

Approximate Features per room

3

3

5

Percentage (%) of Features Used

70

80

90

Maximum Number of Students per event

20

20

20

Maximum events per student

20

50

100

3.5.2 Legal Requirement This system is working on Windows7 Home Edition Operating system and coded with Microsoft visual 2010 professional edition. It requires having license copy of it.

3.6 Data Flow Diagrams

3.6.1 DFD Level 0

Feasible Solution

Genetic Algorithm

Problem Instance

Proce Process Generates

3.6.2 DFD Level 1

Genetic Algorithm

Feasible Solution

Local Search

Input Processing

Problem Instance

Read Apply Apply

Generates

3.6.3 DFD Level 2

Feasible Solution

Child Evaluation

Mutation

Crossover

Select Parents

Population

Evaluation

Initial Population

Problem Instance

3.6.4 Class Diagram

3.6.5 State Transition Diagram

3.7 System Implementation Plan

Here presenting system implementation plan using Gantt chart. Gantt chart contains all task details that are described in Work Breakdown Structure.

Chapter 4

SYSTEM DESIGN

4.1 System Architecture

4.2 UML Diagrams

4.2.1 Use Case Diagram

4.2.2 Composite Structure Diagram

4.2.3 Sequence Diagram

4.2.4 Activity Diagram

4.2.5 Component Diagram

4.2.6 Deployment Diagram

Chapter 5

TECHNICAL SPECIFICATION

5.1 Windows 7

The Windows 7 client operating system offers innovative technologies that improve performance, reliability, security, and compatibility. It also offers new capabilities that help organizations to improve user productivity, enhance security, and reduce operating costs. Because Windows 7 is built on the same platform as Windows Vista and Windows 2008 Server, the investments you make in Windows Vista readiness—application testing and hardware assessment—will help speed adoption of Windows 7 in your environment.

Unlike Windows Vista, which introduced a large number of new features, Windows 7 was intended to be a more focused, incremental upgrade to the Windows line, with the goal of being compatible with applications and hardware with which Windows Vista was already compatible. Presentations given by Microsoft in 2008 focused on multi-touch support, an updated Windows shell with a new taskbar, referred to internally as the Superbar, a home networking system called HomeGroup, and performance improvements. Some standard applications that have been included with prior releases of Microsoft Windows, including Windows Calendar, Windows Mail, Windows Movie Maker, and Windows Photo Gallery, are not included in Windows 7; most are instead offered separately at no charge as part of the Windows Essentials suite.

5.2 C++

C++ (pronounced "see plus plus") is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features Developed by Bjarne Stroustrup starting in 1979 at Bell Labs, it adds object oriented features, such as classes, and other enhancements to the C programming language. Originally named C with Classes, the language was renamed C++ in 1983 as a pun involving the increment operator.

C++ is one of the most popular programming languages and is implemented on a wide variety of hardware and operating system platforms. As an efficient compiler to native code, its application domains include systems software, application software, device drivers, embedded software, high-performance server and client applications, and entertainment software such as video games. Several groups provide both free and proprietary C++ compiler software, including the GNU Project, Microsoft, Intel and Embarcadero Technologies. C++ has greatly influenced many other popular programming languages, most notably C# and Java. Other successful languages such as Objective-C use a very different syntax and approach to adding classes to C.

C++ is also used for hardware design, where the design is initially described in C++, then analyzed, architecturally constrained, and scheduled to create a register-transfer level hardware description language via high-level synthesis.

The language began as enhancements to C, first adding classes, then virtual functions, operator overloading, multiple inheritance, templates and exception handling among other features. After years of development, the C++ programming language standard was ratified in 1998 as ISO/IEC 14882:1998. The standard was amended by the 2003 technical corrigendum, ISO/IEC 14882:2003. The current standard extending C++ with new features was ratified and published by ISO in September 2011 as ISO/IEC 14882:2011 (informally known as C++11).

5.3 Visual Studio 2010 Professional

As the complexity of applications grows so does the challenge of understanding the code that you’re working on. With Visual Studio 2010 the IDE provides integrated support for understanding what is happening in the code section that you’re viewing.

The editor in Visual Studio 2010 has been rebuilt using the Windows Presentation Foundation (WPF) technology. WPF enables the editor to richly present information about the code in the context of presenting the actual source. This ability enables features such as the "Document Map Margin" to render a graphical view of the source file including information such as layout, code coverage, symbol highlights and comments. This editor ability also enables 3rd parties to create add-ins that show custom views of the underlying source file such as taking the XML Doc Comments and converting them to a rich presentation formation with fonts, colors and highlight. It enables Visual Studio to display different layers on the editor so an add-in could represent a code based formula in its traditional mathematical representation.

While the representation of the underlying source code is important so is the ability to understand what the code is actually doing. In Visual Studio 2010 features such as "Inline Call Hierarchy", a feature which enables a developer to select an entity or method and see how the code calls inwards or outwards or passes the entity in and out of the code section, provide developers with the ability to understand the interaction of the code without needing to juggle multiple files. Other features such as "Highlight References", which provide a visual representation of the references to a selected entity in the code without needing to use the "Find In Files" feature, or "Quick Searching", which delivers a ‘word wheel’ based search tool integrated with "Highlight References", enable developers to maintain the context of where they are but gain the understanding of other locations in the code.

Additionally the editor integrates with the project system to simplify the pattern of Test Driven Development (TDD). With TDD developers build the tests that will exercise their application code before they actually write that code. In Visual Studio 2010 developers can create tests and the editor will provide functionality to automatically implement the tested classes and code in the file the developer chooses. This enables developers to quickly create the class they are consuming without needing to break out of the test development flow to declare the tested class.

Chapter 6

Project Estimate, Schedule

6.1 Estimate

Estimation is the process of finding an estimate, or approximation, which is a value that is usable for some purpose even if input data may be incomplete, uncertain, or unstable. The value is nonetheless usable because it is derived from the best information available. Typically, estimation involves "using the value of a statistic derived from a sample to estimate the value of a corresponding population parameter". The sample provides information that can be projected, through various formal or informal processes, to determine a range most likely to describe the missing information. An estimate that turns out to be incorrect will be an overestimate if the estimate exceeded the actual result and an underestimate if the estimate fell short of the actual result. Project Estimation report is size oriented matrix. Here, constructive cost model i.e. COCOMO is used to estimate effort and time duration by using size of software.

Sr.No

Model

Expected LOC

1

Input Processing

400

2

Apply Local Search

1700

3

Genetic Algorithm

700

Total

2800

6.1.1 Effort Estimation

We used COCOMO model to estimate time and effort. Here

Aa = 3.0 , Bb=1.12 , Cb=2.5 and Db=0.3

Estimated Effort (E) = ( Aa * KLOCBb)

= ( 3 * 2.81.12)

= 9.50

Estimated Time = Estimated Efforts / #Persons

= 9.50 / 1

= 9.50 Months

6.2 Schedule

Chapter 7

SOFTWARE IMPLEMENTATION

7.1 Introduction

Optimization of class timetable using Genetic Algorithm is implemented using C++ with three different interconnected modules.

Input Processing: This module is responsible to process the available data set. Here process means read the content of data set accurately and then prepare the required metadata from that reading. In this module , system is reading the problem instance supplied as input to project and then outputs different relationship matrix as described in section 1.3

Applying Local Search: Applying local search is used to evaluate the solutions generated in intermediate processing of system. This module checks the feasibility of solutions with the help of soft constraint and hard constraint. If some soft constraint or hard constraint are present in solution system will try to remove it. This is the core part of our system which gives improved solution with minimum soft constraint violations.

Applying Genetic Algorithm: Here in this module we are applying GA along with its key parameters crossover and mutation. In this we are selecting the available solutions with system and then selecting proper ones to generate a new improved solution. The selection methodology employed for selecting proper solutions for next generation play vital role in overall process of GA.

7.2 Data Set

This project complete relies on the benchmark dataset available with WATT -- The EURO Working group on Automated TimeTabling. The problem instances available are standard data sets and well tested for timetabling problems. The details of these data sets are as follows

Class of Problem Instance

Small

Medium

Large

Number of events

100

400

400

Number of rooms

5

10

10

Number of Features

5

5

10

Number of students

80

200

400

Approximate Features per room

3

3

5

Percentage (%) of Features Used

70

80

90

Maximum Number of Students per event

20

20

20

Maximum events per student

20

50

100

7.2.1 Details of Data Set

Here we are presenting the details of small instance of problem

100 5 5 80

Events Rooms Features Students

9

Room1 Size

2

Room2 Size

3

Room3 Size

11

Room4 Size

15

Room5 Size

And remaining part contains different matrix relationship among between events, student, room and features in terms of 0 and 1. For example if event I required student J then event-student matrix IJ value is 1 otherwise 0. Likewise it contains event- feature matrix, event-room matrix, room-feature matrix and correlation matrix to identify common students.

7.3 Genetic Algorithm

Genetic Algorithms were invented by John Holland at the University of Michigan in the 1960s.Genetic Algorithms are a family of computational models inspired by evolution. These algorithms encode a potential solution to a specific problem on a simple. Chromosome like data structure and apply recombination operators to these structures so as to preserve critical information Genetic algorithms are often viewed as function optimizers although the range of problems to which genetic algorithms have been applied is quite broad. An implementation of a genetic algorithm begins with a population of typically random chromosomes. One then evaluates these structures and allocates reproductive opportunities. In such a way that those chromosomes which represent a better solution to the target problem.

The main property that makes genetic representations convenient is that their parts are easily aligned due to their fixed size, which facilitates simple crossover operations. Variable length representations may also be used, but crossover implementation is more complex in this case. The fitness function is defined over the genetic representation and measures the quality of the represented solution. The fitness function is always problem dependent.

In some problems, it is hard or even impossible to define the fitness expression; in these cases, interactive genetic algorithms are used. Once we have the genetic representation and the fitness function defined, GA proceeds to initialize a population of solutions randomly, and then improve it through repetitive application of mutation, crossover, and inversion and selection operators.

The fundamental genetic algorithm is as below:

1

Begin

2

INITIALIZE population with random candidate solutions

3

EVALUATE each candidate

4

Repeat

5

SELECT parents

6

RECOMBINE pairs of parents

7

MUTATE the resulting children

8

EVALUATE children

9

SELECT individuals for the next generation

10

until TERMINATION-CONDITION is satisfied

11

End

7.3.1 Solution Representation

A solution is simply called as chromosome in Genetic Algorithm. We are representing chromosome as ordered pair of decimal number. The first decimal will represent timeslot and implicitly second decimal will represent classroom number while pair itself indicates event number.

Gene(1 , 3) , ( 2 , 3) , (3 , 4) , (2, 4) , (2, 2) , (15 , 3) , (12, 2) , (14, 2)………………. (11, 3)

Chromosome

Timeslot Classroom

Here we require a fitness function to decide the quality of solution which is actually a chromosome in GA. To decide fitness we are applying objective function which measure number of soft constraint and hard constraint violations.

7.3.2 Initializing Population

We are initializing 10 solutions randomly so at any point of execution of GA total chromosomes are 10 (As a solution is a chromosome).In initializing the population we simply assigning a timeslot on random basis to all events and then assigning possible rooms to each event by considering the requirements of each events. For generating random timeslot we are using random number in the range 0 to 1. Following pseudo code explains the random initialization of single solution.

1

Begin

2

For all events

3

Generate a random timeslot

4

Timeslot = (integer) random(0,1) * 45

5

Assign this timeslot to event

6

End For

7

For all event with non-empty Timeslots

8

Assign possible rooms to event

9

End For

10

End

( Input : An improved individual with some SCV and HCV)

2

3

If no HCV is present in individuals then

4

For Each Event e in E

5

If event e is having some SCV then

6

If there any untried move left then

7

Try to remove SCV using N1. If N1 fails try to remove SCV

using N2. If N2 Fails try to remove SCV using N3.

8

Apply matching algorithm to assign rooms properly and

delta evaluate e.

9

If any of move reduces HCV then make the move and

repeat if tries left

10

End if

11

End if

12

End if

13

End for

14

End if

( Input : An improved individual with some SCV and 0 HCV)

16

17

18

19

20

21

22

23

24

The N1, N2 and N3 data structures are different moves we are applying some events present in an individual. N1 is used to assign an event to any random timeslot. N2 used to swap the timeslots of two different events in an individual while N3 used to permute any three events in an individual and produce some different combination. Then use this combination to improve the fitness of an individual. In above algorithm line 1 to 11 is used to remove HCV and line 12 to 24 is used to remove SCV (if possible) from an individual. After applying local search to all individuals in population, sort it according to their fitness values.

To evaluate and calculate fitness we are using following objective function

f(s) = #hcv * C + # scv where value of C is larger than total soft constraint violations in solution.

7.2.4 Selection of Parents

Our focus is to have correct selection of individual called parents which are used to generate offspring (child). If selected parents are good and capable to survive then the generated child may have same capability to survive. It means if we select two parents with good fitness then we can have child also with good fitness. In this approach we used 2 selection methods. 1. Tournament Selection 2 2. Tournament Selection 5

1

Begin

2

Parent 1 = (integer) (random number (0, 1) * Population size)

3

Parent 2 = (integer) (random number (0, 1) * Population size)

4

Compare fitness values of Parent 1 and Parent 2

5

return Parent with best fitness

7

End

1

Begin

2

random = (integer) (random number (0, 1) * Population size)

3

Best parent = random

4

For 5 times

5

Parent = (integer) (random number (0, 1) * Population size)

6

Compare this Parent with Best Parent

7

If new Parent is best set this as Best Parent

8

End for

9

Return Parent with best fitness

10

End

First method is going to consider part of solution where second method is going to consider proportion of solution. In tournament selection 2 we are selecting two individual on a random by using following technique and then selecting one of them as parent with the help of fitness associated with individual. Again apply same technique to select second parent.

7.3.5 Crossover

We are using custom method to generate offspring from the parents selected using tournament selection. Crossover probability is set to 0.8. So actually we are implementing multipoint crossover and these multipoint are decided by random number we are generating in a range 0 to 1. In crossover we are selecting some timeslots from parent1 and some timeslots from parent2 on random basis. After selecting timeslots for all events we are assigning rooms to each event as per its requirement.

Parent 1 (1 , 3) , ( 2 , 3) , (14 , 2)………………. (11, 3) Parent 2 (2 , 3) , ( 4 , 3) , (23 , 1)………………. (17, 1)

Child (1 , ?) , ( 4 , ?) , (23 , ?)……….…….(11, ?)

1 2 2 1

Numbers indicate timeslot is selected from which parent. We are getting events only with timeslots. Now we are applying room assignment to allocate rooms to events selected for child.

1

Begin

2

Generate one random number in range (0 , 1)

3

If (random number< 0.8) then

4

For all events e in individual

5

Generate one random number in range (0 , 1)

6

If (random number <0.5)

7

Assign timeslot of first parent to child

8

Else assign timeslot of second parent to child

9

End for

10

End if

11

Make first parent as child

12

End

7.3.6 Mutation

Child generated in crossover is undergone through mutation based on probability <0.5. Mutation is technique which actually changes characteristics of single individual. Here the single individual consists of ordered pair of timeslot and classrooms. In this we are again applying techniques used in local search.

Child (1 , 3) , ( 2 , 3) , (3 , 4) ……………… (11, 3)

If N1: (3 , 3) , ( 2 , 3) , (3 , 4) ……………. (11, 3)

By changing timeslot associated with any random event (Here first event selected)

Child (1 , 3) , ( 2 , 3) , (3 , 4) ……………… (11, 3)

If N2: (2 , 3) , ( 1 , 3) , (3 , 4) ……………. (11, 3)

By swapping timeslots with two successive events (Here first two events are selected.

Child (1 , 3) , ( 2 , 3) , (3 , 4) ……………… (11, 3)

If N3: (1 , 2) , ( 4 , 3) , (2 , 3) ……………. (11, 3)

By taking three successive events and permuting them to generate different events than available. (Here first three are used for permutation) .

To decide actual move to apply on child we are generating number in a range 1 to 3 by using following technique. Move = (integer) (random number (0, 1) * 3)

1

Begin

2

Generate one random number in a range 1 to 3

3

If random number generated is 1 then

4

Apply N1 i.e first move which assign random timeslot to any event

5

End if

6

If random number generated is 2 then

7

Apply N2 i.e second move that swaps timeslots of two successive events.

8

End if

9

If random number generated is not 1 or 2 then

10

Apply N3 i.e Third move which permutes three events in a row

11

End if

12

End

Evaluation of offspring generated

The child generated using crossover and mutation again undergone though local search to improve its fitness. This improved individual/offspring generated is then compared with available solutions. If offspring is better than we put in population by replacing less improved individual from population.

Repeat if termination condition is not reached

Check termination condition. We can put two termination condition based on time and generations. We have exercised timetable scheduling on generations. So if total number of generations reached stop the algorithm execution else repeat steps from Selection to Evaluation of offspring generated. After termination sort the population and put the first individual in population as final result.

Chapter 8

SOFTWARE TESTING AND RESULT

8.1 Software Testing

Software testing is any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results. Although crucial to software quality and widely deployed by programmers and testers, software testing still remains an art, due to limited understanding of the principles of software. The difficulty in software testing stems from the complexity of software: we cannot completely test a program with moderate complexity. Testing is more than just debugging. The purpose of testing can be quality assurance, verification and validation, or reliability estimation. Testing can be used as a generic metric as well. Correctness testing and reliability testing are two major areas of testing. Software testing is a trade-off between budget, time and quality.

8.2 Test Cases

"A test case has a component that describes an input, action or event and an expected response, to determine if a feature of an application is working correctly."

There are levels in which each test case will fall in order to avoid duplication efforts.

Level 1: In this level you will write the basic test cases from the available specification and user documentation. Level 2: It is the practical stage in which writing test cases depend on actual functional and system flow of the application. Level 3: It is the stage in which you will group some test cases and write a test procedure. Test procedure is nothing but a group of small test cases maximum of 10. Level 4: Automation of the project- This will minimize human interaction with system and thus QA can focus on current updated functionalities to test rather than remaining busy with regression testing.

8.2.1 Test Case 1

Unit to Test Random Number Generation

Assumption NA

Test Data Random Seed

Steps to Execute Input a Random Seed. Use it to generate random number in a range 0 to 1.

Expected Result A random number from 0 to 1 (Approx. to 1)

Actual Result A random number 0.3569

Pass/Fail Pass

8.2.2 Test Case 2

Unit to Test Initialize Population

Assumption Random Number is in a range of 0 to 1

Test Data Generated Population

Steps to Execute generate a random number in a range 0 to 44. Use this to assign as timeslot. Assign proper rooms as per requirement

Expected Result a random solution with 100 events scheduled with 45 timeslots in 5 rooms

Actual Result 100 events schedules with 45 timeslots in 5 rooms

Pass/Fail Pass

8.2.3 Test Case 3

Unit to Test Crossover

Assumption Population with size 10

Test Data Population with size 10

Steps to Execute select two parents using tournament selection method. Use these two parents to generate a new solution called as child or offspring.

Actual Result a child generated with 100 event scheduling.

Pass/Fail Pass

8.2.4 Test Case 4

Unit to Test Mutation

Assumption Random number is in range of 0 to 1.

Test Data Generated Child

Steps to Execute generate a random number. According to its value apply moves from available 3 moves.

Expected Result A proper move must applied.

Actual Result Proper move is applied.

Pass/Fail Pass

8.2.5 Test Case 5

Unit to Test Child Evaluation

Assumption Generated child using crossover and mutation

Test Data Generated Child

Steps to Execute Apply local search on child

Expected Result A change in evaluation function must be observed before and after applying local search on child.

Actual Result A change is observed in soft constraint violation before and after applying local search.

Pass/Fail Pass

8.3 Result Snapshots

8.3.1 Snapshot showing input details

8.3.1 Snapshot showing total students for events

8.3.2 Snapshot showing total events, room, feature present in problem instance

8.3.3 Snapshot showing student required by events

8.3.4 Snapshot showing which event requires which feature

8.3.5 Snapshot showing possible rooms for events

8.3.6 Snapshot showing solution generated

Chapter 9

RESULT

We have carried out timetable generation on the small instance of problem solution available. The details of this small instance are as follows

Number of events 100 Number of rooms 5 Number of Features 5 Number of students 80 Approximate Features per room 3 Percentage (%) of Features Used 70 Maximum Number of Students per event 20 Maximum events per student 20

The application was coded in C++ and tested with Visual Studio 2010 professional Edition. The obtained results are slightly different if we change the selection method. All tests are carried out on Intel Core i3 CPU with 2.27 GHz Processor and 3 GB RAM. The environment is Windows 7 Operating system. We used standard benchmarked data set available with WATT -- EURO Working group on Automated TimeTabling. We found difference in the fitness of final result if selection method is changed. Following results were observed with set of 5 problem instance having difference in class room size and maximum student per events. Following parameters are fixed for the execution

Table 7: Experimental result when tested with and without local search

Problem Instance

Without Local Search

With Local Search

S1

Infeasible

Feasible: Fitness = 06

S2

Infeasible

Feasible: Fitness = 14

S3

Infeasible

Feasible: Fitness = 03

S4

Infeasible

Feasible: Fitness = 08

S5

Infeasible

Feasible: Fitness = 06

Table No: 8 Experimental Result when tested with tournament selection2 and selection5

Problem Instance

With tournament selection2

With tournament Selection 5

S1

Fitness : 6

Fitness : 5

S2

Fitness : 14

Fitness : 13

S3

Fitness : 13

Fitness : 13

S4

Fitness : 8

Fitness : 8

S5

Fitness : 6

Fitness : 5

Above results shows considerable change when we apply tournament selection5 instead of tournament selection2. It shows that considering proportion of available solutions is better that considering part of solution. Following graph shows the difference when we use two methods for selecting parents.

For all above result analyses following values are set to GA parameters.

Population Size = 10 Crossover Probability < 0.8 Mutation Probability < 0.5 Total number of Generations = 50

Chapter 10

DEPLOYMENT AND MAINTANANCE

10.1 Installation

Following things required to run this system effectively on your computer.

Windows operating System (Windows 7 Onwards)

.Net Framework

Visual Studio 2010 Professional Edition

10.1.1 Installing System Files

To install our system follow the below instructions sequentially.

Go to C:\Users\classic\Documents\Visual Studio 2010\project.

Create one folder named "Timetable".

Copy the system files from System folder of CD to destination folder Timetable.

Open Timetable folder newly created on your computer.

Create one new folder named Input in Timetable folder.

Copy all files from Instance folder of CD into Input folder.

This completes the installation of required files to execute timetable project.

10.1.2 Execution

Open Microsoft Visual 2010 on your computer.

Select Open->existing Project

Select C:\Users\classic\Documents\Visual Studio 2010\project\timetable.

Click on Compile and Build

10.1.3 Uninstallation

There is simple way to uninstall the System from your computer.

Go to folder C:\Users\classic\Documents\Visual Studio 20



rev

Our Service Portfolio

jb

Want To Place An Order Quickly?

Then shoot us a message on Whatsapp, WeChat or Gmail. We are available 24/7 to assist you.

whatsapp

Do not panic, you are at the right place

jb

Visit Our essay writting help page to get all the details and guidence on availing our assiatance service.

Get 20% Discount, Now
£19 £14/ Per Page
14 days delivery time

Our writting assistance service is undoubtedly one of the most affordable writting assistance services and we have highly qualified professionls to help you with your work. So what are you waiting for, click below to order now.

Get An Instant Quote

ORDER TODAY!

Our experts are ready to assist you, call us to get a free quote or order now to get succeed in your academics writing.

Get a Free Quote Order Now