Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Boğaziçi UniversityDepartment of Management Information Systems
MIS 463 Decision Support Systems for Business
PROJECT FINAL REPORT
A DSS FOR CHOOSING
HOTEL ACCOMMODATION IN BRUSSELS
Project Team No: 11
Adil AyarSascha Burmeister
Barış Çimen Furkan Gürsoy (c)
İsmail Kazan
Instructor: Prof. Dr. Aslı Sencer
İstanbul - December, 2013
Table of ContentsTable of Contents........................................................................................................................ii
The Figure Lists.........................................................................................................................iv
The Table List.............................................................................................................................v
1. INTRODUCTION..................................................................................................................1
1.1. Decision Environment......................................................................................................1
1.2. Mission of Project............................................................................................................2
1.3. Scope of Project...............................................................................................................2
1.4. Methodology....................................................................................................................2
2. LITERATURE SURVEY.......................................................................................................3
2.1 Decision support systems.................................................................................................3
2.1.1. Concept of decision support systems........................................................................3
2.1.2. Characteristics and capabilities of decision support systems...................................3
2.1.3. Components of decision support systems.................................................................4
2.2. Analytic Hierarchical Process..........................................................................................5
2.3. Choosing Hotel Accommodation.....................................................................................6
2.3.1. Interview Results..................................................................................................9
2.3.2. Survey Results....................................................................................................11
3. DEVELOPMENT OF DSS...............................................................................................24
3.1. DSS Architecture........................................................................................................24
3.2. Technical Issues.........................................................................................................25
3.2.1. Languages...........................................................................................................25
3.2.2. Programs.............................................................................................................25
3.3. Model and Algorithms...............................................................................................26
3.3.1. Algorithms..........................................................................................................26
3.3.2. Model..................................................................................................................27
3.3.3. Criteria and Hierarchical Tree............................................................................28
3.3.2. DSS Processes.........................................................................................................29
3.4. Data Source and Flow Mechanisms...........................................................................37
3.4.1. Data Collection...................................................................................................37
3.4.2. Flow Chart Diagram...........................................................................................37
3.4.3. Context Diagram.................................................................................................39
iii
3.4.4. Use Case Diagram...............................................................................................40
3.4.5. Database Diagram...............................................................................................40
3.5. User Interface and Reports.........................................................................................41
4. ASSESSMENT..................................................................................................................44
4.1 Project Plan.....................................................................................................................46
4.2. Master Plan.....................................................................................................................47
5. TESTING...........................................................................................................................48
5.1. Pairwise Comparison Page Testing............................................................................48
5.2. Filter Page Testing.....................................................................................................48
5.3. Consistency Check Testing........................................................................................49
5.4. Help Page Testing......................................................................................................49
5.5. Start Again Testing.....................................................................................................50
5.6. What-if Analysis Testing...........................................................................................50
6. CONCLUSION.................................................................................................................51
REFERENCES.........................................................................................................................52
[1] Ananth, M., DeMicco, F. J., Moreo, P. J., & Howey, R. M. (1992).Marketplace lodging needs of mature travellers.The Cornell Hotel and Restaurant Administration Quarterly 33(4), 12-24. 52
[3] Atkinson, A. (1988). Answering the eternal question: What does the customer want? The Cornell Hotel and Restaurant Administration Quarterly,29(2), 12-14..............................52
[5] Chou, T. Y., Hsu, C. L., & Chen, M. C. (2008). A fuzzy multi-criteria decision model for international tourist hotels location selection. International Journal of Hospitality Management, 27(2), 293-301....................................................................................................52
[8] Faizah, S., & Razali, M. (2009). Decision Support System For Hotel And Chalet Selection In Pangkor Island......................................................................................................52
[9] Kuo, R. J., Chi, S. C., & Kao, S. S. (2002). A decision support system for selecting convenience store location through integration of fuzzy AHP and artificial neural network. Computers in Industry, 47(2), 199-214.....................................................................................52
[12] Lockyer, Tim (2005) The perceived importance of price as one hotel selection dimension Department of Tourism Management, Waikato Management School, The University of Waikato, Private Bag 3105, Hamilton, New Zealand........................................53
APPENDIX...............................................................................................................................54
Codes.....................................................................................................................................54
iv
The Figure Lists Figure 1. Components of decision support systems...................................................................5Figure 2. Components of decision support systems....................................................................6 Figure 3. The trigger points in hotel accommodation (Lockyer, 2005).....................................7Figure 4. The results of Lockyer’s (2005) research about perceived importance of attributes ranked by customers...................................................................................................................7 Figure 5. Finding best three-star-hotel among three alternatives with AHP method.(Murat and Çelik, 2012).................................................................................................................................8 Figure 6. Example picture of Limak Eurasia Hotel...................................................................9Figure 7. The Architecture of DSS...........................................................................................24 Figure 8. The pair wise comparison importance table.............................................................27Figure 9. Main criteria and their scaling criteria.......................................................................28Figure 10. Flowchart diagram...................................................................................................38Figure 11. Context diagram......................................................................................................39Figure 12. Use case diagram.....................................................................................................40Figure 13. Database diagram....................................................................................................40Figure 14. Welcome page.........................................................................................................41Figure 15. Example pair wise comparation page......................................................................42Figure 16. Sample error message..............................................................................................42Figure 17. Sample Help information........................................................................................43Figure 18. Result page..............................................................................................................43Figure 19. Decision Criteria......................................................................................................44
v
The Table ListTable 1. User inputs for main criteria calculation.....................................................................29Table 2. Normalized version of user inputs for main criteria calculation................................29Table 3. Main criteria consistency check..................................................................................30Table 4. User inputs for location scaling criteria calculation...................................................30Table 5. Normalized version of user inputs for location scaling criteria calculation...............31Table 6. Location scaling criteria consistency check................................................................31Table 7. User inputs for room features scaling criteria calculation..........................................32Table 8. Normalized version of user inputs for room features scaling criteria calculation......32Table 9. Room features scaling criteria consistency check......................................................33Table 10. User inputs for hotel features scaling criteria calculation.........................................33Table 11. Normalized version of user inputs for hotel features scaling criteria calculation... .34Table 12. Hotel features scaling criteria consistency check.....................................................34Table 13. User inputs for hotel price range scaling criteria calculation...................................35Table 14. Normalized version of user inputs for hotel price range scaling criteria calculation...................................................................................................................................................35Table 15. Hotel price range scaling criteria consistency check................................................36Table 16. Sample hotel database...............................................................................................37Table 17. The weights of each criteria for each hotel...............................................................37Table 18. Task allocation table.................................................................................................46Table 19. Master Plan...............................................................................................................47Table 20. Main steps of filter page testing................................................................................48Table 21. Price Range Selection Dragging Bar Testing...........................................................49
vi
1. INTRODUCTION
The project aims to bring easiness and efficiency to customers when they decide on a hotel to stay. Solving this decision making problem in a personalized way is quite significant when you consider the amount of money spent on hotel accommodation & unsatisfied or partly satisfied customers in the end.
Considering the lack of DSS systems solving this significant problem, it is obvious that a DSS system like ours is needed to assist people with this decision. Our DSS project will satisfy this need, at first, within Brussels.
1.1. Decision Environment
Choosing the most appropriate hotel for accommodation is rather complicated process for people. Today, there are various websites to find the hotels all around the world such as booking.com, tripadvisor.com, hotels.com and venere.com. Individuals could search hotels in these websites and reach amenities, ratings and reviews of hotels. These systems help people up to a certain extent. It is necessary to visit a lot of pages to see details of alternative hotels and compare them.
In the case of high number of alternative hotels, it requires lengthy time to see all hotels and compare them. In most cases, it is too difficult to find the most suitable hotel according to your needs without spending a lot of time on it. For instance, in Istanbul there are more than 1,500 hotels available at booking.com. Even if you sorted/filtered them according the price or some other criterion, there will be at least tens of alternatives. Among those alternatives, in order to check the facilities and specialties you will spend a lot of time. In the case, you end up with few hotels, you have to look each one again more deeply to find the most suitable hotel for your needs. Our system promises to make this decision for you in few seconds once you indicate your preferences.
The system proposed here offers a decision support system to choose the most suitable hotel according to user’s needs and preferences. People who are looking for hotel accommodation in Brussels are our users. The alternatives are limited with hotels in Brussels. Brussels is chosen because the city has many different types of hotels, which is because it hosts many international institutions such as the European Council, the NATO etc. and at the same it is becoming a preferred destination for weekend getaways and holidays.
Decisions are supposed to be done very frequently, because the system serves large number of users on the internet. The decision system is fairly complicated because there are many criteria and many alternative hotels. According the importance given to each criterion, hundreds of hotels should be evaluated and the best match and few closest alternatives should be shown to the user.
It may be difficult to perfectly measure every hotel’s performance for some criteria. For example, you cannot surely say that the food of a particular hotel is very tasty. You have to rely on some subjective evaluations there. It may be seen as bottleneck of the system which is impossible to totally remove.
1
The sensitivity of the decision is up to given importance to each criterion by user. If price or distance to city center weighs more for a particular user, then the decision is more sensitive to those criteria and less sensitive to other criteria.
A computerized system is a necessity to solve the problem defined here. Because there are too many alternatives to find information about, to store, to compare given some weights and to compare again given another weights. A computerized system ease the process of choosing hotel, and makes it more efficient by doing it in less time and offering the best match.
1.2. Mission of Project
The mission of this project is to develop an appropriate system that aids people who seek a suitable accommodation in a city.
Goals:
To provide people with self-assessments to discover which accommodation to choose. To support the user to make the right decision with less effort. To decrease list of accommodation possibilities in order to choose most suitable one.
Objectives:
Give an effective guidance in selecting an accommodation and facilitate people’s decisions.
Match the right person to the right accommodation option. Provide adequate accommodation options to people with high level of accommodation
satisfaction.
1.3. Scope of Project
The purpose of the system is finding the best hotel match according to the user’s specifications. The system holds detailed information of most of the hotels in Brussels.
There are some criteria used in the system such as price, air conditioner, Wi-Fi, distance to city center, TV, gym, minibar, laundry and so on. A user weights criteria as him/her preferences. According to these weighted criteria, the system offers the best match and closest matches to the user.
1.4. Methodology
Due to a various number of different aspects the multi-criteria problem we are going to solve is a complex one for our users. To solve this problem we want to use the Analytical Hierarchy Process (AHP) which was found by the mathematician Thomas L. Saaty.
Because every person has its own expectations and needs for its hotel, it is impossible to just find a perfect hotel and advise everyone to take it. Every person has its individual preferences and the AHP is one of the most suitable methodologies to ensure that everyone can get his unique and best tailored solution for his holiday.
2
The AHP makes it possible to solve multi-criteria decision problems using qualitative and quantitative criteria. To get the criteria we are first going to fill in our database by collecting all necessary data about the hotels of the town we want to look at. Using a survey we are going to point out the meaning of the different criteria for people.
After we have determined our data we let the user decide which of the criteria are whether relevant or not and let him rank the different criteria he wants to count for his decision. This is how we will develop an overall hierarchy and find the best individual solution for our user.
2. LITERATURE SURVEY
2.1 Decision support systems
2.1.1. Concept of decision support systemsThere is a substantial amount of empirical evidence that human intuitive judgment and decision making can be far from optimal, and it deteriorates even further with complexity and stress. Because in many situations the quality of decisions is important, aiding the deficiencies of human judgment and decision making has been a major focus of science throughout history. Disciplines such as statistics, economics, and operations research developed various methods for making rational choices. More recently, these methods, often enhanced by a variety of techniques originating from information science, cognitive psychology, and artificial intelligence, have been implemented in the form of computer programs, either as stand-alone tools or as integrated computing environments for complex decision making. Such environments are often given the common name of decision support systems (DSSs).
The concept of decision support systems (DSS) is rather broad and it can be take various forms and can be used in many different ways. On the one hand, Finlay (1994) and others define a DSS broadly as "a computer-based system that aids the process of decision making". In a more precise way, Turban (1995) defines it as "an interactive, flexible, and adaptable computer-based information system, especially developed for supporting the solution of a non-structured management problem for improved decision making. It utilizes data, provides an easy-to-use interface, and allows for the decision maker’s own insights." For Sprague and Carlson (1982), DSS are "interactive computer based systems that help decision makers utilize data and models to solve unstructured problems."
2.1.2. Characteristics and capabilities of decision support systems1. Support for decision makers (mainly in semi- and un-structured situation) by bringing
together human judgment and computerized information.2. Support for all managerial levels, ranging from top executives to line managers.3. Support for individuals (from different departments, organizational levels or different
organizations) as well as groups of decision makers working somewhat independently – virtual teams through collaborative Web tools.
4. Support for independent or sequential decisions that may be made once, several times or repeatedly.
3
5. Support in all phases of decision-making process (intelligence, design, choice, and implementation).
6. Support for a variety of decision-making process and style.7. The decision maker should be reactive, able to confront changing conditions quickly
and able to adapt the DSS to meet these changes. DSS are flexible, so users can add, delete, combine, change or rearrange basic elements.
8. User-friendliness, strong graphical capabilities and natural language interactive human-machine interface can greatly increase the effectiveness of DSS, Most new DSS application use Web-based interfaces.
9. Improvement the effectiveness of decision making rather than its efficiency. When DSS are deployed, decision making often takes longer but the decisions are better.
10. The decision maker has complete control over all steps of the decision-making process in solving a problem – a DSS aims to support not to replace the decision maker.
11. End users are able to develop and modify simple systems by themselves. Larger systems can be built with assistance from information system specialist. Online analytical process (OLAP) and data mining software, with data warehouses, allow users to build very large and complex DSS.
12. Models are generally utilized to analyze decision-making situations. The modeling capability enables experimentation with different strategies under different configurations.
13. Access is provided to a variety of data sources, formats and types, including GIS, multimedia and object oriented.
14. Can be employed as a standalone tool used by an individual decision maker in one location or distributed throughout an organization and in several organizations along the supply chain. It can be integrated with other DSS or applications and it can be distributed internally and externally using networking and Web technologies.
2.1.3. Components of decision support systems1. DBMS are a set of computer programs that create and manage the database, as well as
control access to the data stored within it. The DBMS can be either an independent program or embedded within a DSS generator to allow users to create a database file that is to be used as an input to the DSS.
2. MBMS is a set of computer programs embedded within a DSS generator that allows users to create, edit, update, and/or delete a model.
3. USERs create models and associated database files to make specific decisions. The created models and databases are stored in the model base and database in the direct access storage devices such as hard disks.
4
Figure 1. Components of decision support systems.
2.2. Analytic Hierarchical ProcessThe Analytic Hierarchy Process (AHP), introduced by Thomas Saaty (1980), is rather effective tool for complex decision making, and supports the decision maker to set priorities and make the best decision. By reducing complex decisions to a series of pair wise comparisons, and then synthesizing the results, the AHP helps to capture both subjective and objective aspects of a decision. Moreover, the AHP incorporates a useful technique for checking the consistency of the decision maker’s evaluations, thus reducing the bias in the decision making process.
5
Figure 2. Components of decision support systems.
Typical applications where AHP has been used are in:
Prioritizing factors and requirements that impact software development and productivity,
Choosing among several strategies for improving safety features in motor vehicles, Estimating cost and scheduling options for material requirements planning (MRP), Selecting desired software components from several software vendors, Evaluating the quality of research or investment proposals.
2.3. Choosing Hotel AccommodationAccording to MacKenzie(1986), if an attribute is perceived as important by a customer, the attribute significantly influence the customer’s product choice. When a customer is in the process of choosing hotel accommodation, the attributes perceived as important by customer play prominent role.
6
The table below, Lockyer (2005), shows the trigger points in hotel accommodation purchase decision.
Figure 3. The trigger points in hotel accommodation (Lockyer, 2005)
However, the importance of these trigger points, especially when sub-categories are considered is not in a fixed order. For example, the importance given to each factor is different between business travelers and leisure travelers, according to findings of Lewis(1985).
The table on the left shows the results of Lockyer’s (2005) research about perceived importance of attributes ranked by customers. According to this research, cleanliness of hotel is in the first place followed by safety attributes and staff related attributes.
Also Atkinson’s (1988) research supports these findings. It is found that that cleanliness of the accommodation followed safety and security, accommodation value for money, courtesy and helpfulness of staff were identified top attributes for travelers in hotel choice selection. On the other hand, Rivers, Toh and Alaoui (1991) examined the hotel selection decisions and reached a different conclusion. Their results showed that convenience of location and overall service received the highest ratings.
7
Figure 4. The results of Lockyer’s (2005) research about perceived importance of attributes ranked by customers.
Also in another research by Ananth et al. (1992), 510 travelers were surveyed by asking them to rate the importance of 57 hotel attributes in hotel choice decision. The results show that price and quality was rated as the most important attribute across all age categories, followed by attributes related to security and convenience of location.
Emir and Pekyaman(2010) found that travelers with children give different importance to attributes compared with travelers without children. For instance, the importance given to hygiene by travelers with children is more than by travelers without children.
Looking by the different findings above, it can be derived that it is not appropriate to claim that there can be found the common attributes which are ranked in the same order by all customers. Therefore, it is beneficial to develop a DSS system which can give personalized results according to user preferences.
A DSS project is done by Razali(2009) in University Teknika Malaysia Melaka as a thesis. The name of the project is DSS for Hotel and Chalet Selection in Pangkor Island. The DSS works on web and after having entered preferences, the users will be automatically given a suggestion by the system.
Other than this thesis, there is not any significant paper for DSS for hotel accommodation selection. However, there are some papers on similar subjects such as tourism destination selection by Noor et al. (2010), convenience store location selection with fuzzy AHP and artificial neural network by Kuo et al. (2002), a fuzzy multi-criteria decision model for international tourist hotels location selection by Chou et al(2008). The last two papers aim administrators in location selection rather than customers.
Another research was done by Murat and Çelik (2012) in Bartın to find best three-star-hotel among three alternatives with AHP method. The model used in this project is shownbelow.
8
Figure 5. Finding best three-star-hotel among three alternatives with AHP method.(Murat and Çelik, 2012)
2.3.1. Interview Results
2.3.1.1. Interview with Limak Eurasia Hotel Outside Sales Director, Ahmet Peker
Figure 6. Example picture of Limak Eurasia Hotel
We interviewed with Limak Eurasia Hotel Outside Sales Director, Ahmet Peker to gain better understanding of Limak Eurasia Hotel services and features as well as to learn the dynamics of hotel industry. During the interview, we asked following questions to him and discussed.
Q:First of all, we want to begin with the question which that please could you complete this sentence? Customers should prefer our hotel because …
A: I have been in tourism sector since 1997 and I worked many hotels in Istanbul. However, I believed that Limak Eurasia Hotel is the one of the best hotels. We took Excellence Reward by Tripadvisor visitors because our hotel contributes 100% customer satisfaction. It is the distinctive competence of Limak Eurasia Hotel.
Q: What are the most essential services that your hotel provides? Could you mention Limak Eurasia Hotel services?
A: We have several types of rooms and suites such as Deluxe Rooms, Circle Rooms, Executive Deluxe Rooms, Asia Suites, Luxury Suites, King Suites as well as Presidential
9
Suite. They have between 35 and 70 square meter. They are wide, comfortable and ultra-luxury. In rooms and suites, Digiturk and D-Smart services are available. Moreover, Limak Eurasia Hotel has rather high security level. For instance, customer cannot use elevator without your personal card which is given by reception. We have 24 hours reception and room services.
Q: Please, Could you inform about your customer profiles and Could you give references which are rather popular companies or celebrity which stay or take service from Limak Eurasia Hotel?
A: We have generally foreign business customers. However you know that together with suites and rooms, we have various meeting rooms. Limak Eurasia features more than 1850 m2 of meeting and function space, or has conference room for international 600 people participants, all fully furnished and equipped with last technology. Limak Eurasia Hotel has on the Bosphorus for your special events and organizations with its boat "The Istanbul 2". Moreover, many companies such as Eczacıbaşı, Koç, Unilever, Danino, Ülker, Korkmaz, KPMG, Deniz Bank as well as Johnson & Johnson organize their some meetings and activities in Limak Eurasia Hotel.
Q: In final question, you should consider not only Limak Eurasia Hotel but also all the type hotels and now I will read the criteria and Could you take note the most important criteria for customers and you ?
A: Hotel location such as distance to city center, historical places or airport may play an important role. General hotel features, for instance, 24-hour reception, Wi-Fi, parking area, laundry, gym, and sauna are given importance by most of the customers. Customer also search for past customer reviews or rating before making reservation. Room features like having TV, phone, minibar are considered necessary. Some visitors look for extra bed availability and view from the room, also.
2.3.1.2. Interview with Deputy Head of Tourism Department at Bogazici University Assoc. Prof. Maria Dolores Alvarez
10
The interview was held with Assoc. Prof. Alvarez to get professional comment about our DSS project. Our DSS system is introduced to her and we discussed its advantages and disadvantages.
We agreed on that our system will lower the customer effort spent to choose most appropriate hotel, therefore the DSS system bring efficiency into the evaluation and selection process of customers on hotels.
One disadvantage is figured out during the interview, which mostly deals with marketing aspect. Ms. Alvarez pointed out that some customers may doubt whether the final result is really given by some calculations or maybe just some companies paid for it. Because it has nothing with the DSS process, we keep it as a good point in our minds for future marketing projects.
When her opinions were asked about the attributes should be put in the system, Ms. Alvarez advised us to use some attributes such as price, distance from city center and other important places, Wi-Fi access, parking, past customer ratings, laundry, extra bed availability, reception availability.
11
2.3.2. Survey Results
12
13
14
15
16
17
18
19
20
21
22
23
24
The insights gained from the survey are used in attribute selection. For instance, “Wi-Fi”, “location of the hotel”, “parking availability” are evaluated as important, so we placed it among attributes we use in our system. On the other hand, for instance “Sailing”, “boat rent”, “volleyball/beach volleyball” are considered as less important by the respondents, so we did not put them into the attributes.
3. DEVELOPMENT OF DSS
3.1. DSS Architecture
Figure 7. The Architecture of DSS
This diagram shows how our web application architecture works. The flow of control in the architecture is as follows:
1. The browser sends a request for a resource of some kind to the web server.
2. The web server decides what to do with the request.
a. Static resources such as images, CSS and static web pages are read from disk and returned directly to the browser.
b. Requests for dynamic resources such as an Edit screen are forwarded to an application server.
25
3. The application server passes the request to the correct web application.
4. The web application constructs a response using data from the database server when necessary.
5. The response is passed back up the chain to the browser.
6. The browser displays the response.
The web, application and database servers are independent pieces of software which can be installed on the same computer or on different computers. This gives systems administrators a lot of flexibility when they deploy these systems. For example, a single database server can support the web application as well as other systems. Note that the web server and the application server are often rolled together into one program.
3.2. Technical IssuesWe developed a web based Decision Support System. We used different technologies to realize our ideas. All languages and software we used except Adobe Photoshop are free to use.
3.2.1. LanguagesFor the main structure of the website we used HTML, a markup language, combined with CSS, a style sheet language describing the design of the hypertext elements, both developed by the World Wide Web Consortium for designing websites.
To realize the input forms and the algorithms of the AHP, we used PHP, a server-side scripting language developed by The PHP Group.
Furthermore for making our DSS looking friendlier to our users, we also used JavaScript, a client-side scripting language developed by Netscape Communications Corporation and especially the JavaScript library jQuery what makes it easier for us to create animations and other visual effects.
3.2.2. ProgramsFor developing our DSS in the aforementioned languages we used different programs.
For developing our page we used NetBeans IDE, an integrated development environment that supports all newest technologies, developed by the Oracle Corporation. In addition to this we used the free in-browser-PHP application phpMyAdmin to design our MySQL-Database. For creating an appropriate design for our DSS we used Adobe’s Photoshop, an application for graphical editing.
Our whole works with its files were saved on our own SVN-Server. The SVN (Subversion) is a software versioning and revision control system distributed by the Apache Software Foundation.
26
3.3. Model and Algorithms
3.3.1. Algorithms 1. The system begins with main criteria pair-wise comparison. It displays criteria * criteria
matrixes and the user gives weights to the criteria by pair wise comparison.
2. The system displays hotel location criteria pair-wise comparison. It displays criteria * criteria matrixes and the user gives weights to the criteria by pair wise comparison.
3. The system displays room features criteria pair-wise comparison. It displays criteria * criteria matrixes and the user gives weights to the criteria by pair wise comparison.
4. The system displays hotel features criteria pair-wise comparison. It displays criteria * criteria matrixes and the user gives weights to the criteria by pair wise comparison.
5. The system takes maximum willingness to pay of the user from the user and filter the hotels whose prices are higher than this amount.
6. If the user did not chose the minium price range, the system displays hotel price range criteria pair-wise comparison. It displays criteria * criteria matrixes and the user gives weights to the criteria by pair wise comparison. Otherwise, the system skips this step and include only hotels whose price are in minimum price range.
7. The system gets the given criteria weights and compares the alternative hotels with the statistical data stored in database. The data under the chosen criteria is searched and the best suited 5 hotels (sorted by the total score, best suitable hotel is on the top) with their info are displayed to the user.
27
3.3.2. Model
3.3.2.1. Objective, Criteria and AlternativesObjective: Selecting best suitable hotel in Brussels with the user preferences.
Alternatives: There are many hotels in Brussels. We decided not to include all of them because it would cause loss of time. Therefore, we randomly select 50 hotels and included them in the system. While comparing, those hotels are filtered by the queries, with the user's preferences. The filtered alternatives are then compared.
Pair wise comparison:
Figure 8. The pair wise comparison importance table.
28
3.3.3. Criteria and Hierarchical Tree
Figure 9. Main criteria and their scaling criteria
29
Select Best Suitable Hotel in
Brussels
Hotel Location
Closeness to Manneken Pis
Closeness to Grand Place
Closeness to Rogier Square
Closeness to Zaventem
Airport
Closeness to Brussels City Hall
Room Features
Air Conditioner
Extra Bed Availability
TV
Phone
Minibar
City View
Hotel Features
WiFi
Parking
Gym
Laundry
24-Hour Reception
Sauna
Past Costumer Satisfaction
Hotel Price Range
40€ and below
40€ - 80€
80€ - 120€
120€ - 160€
160€ - 200€
200€ - 240€
240€ and above
3.3.2. DSS ProcessesThe processes start with user input to the main criteria of the system:
Hotel Location Room Features Hotel Features Hotel Price Range
Hotel Location 1 1/3 1/2 1/2
Room Features 3 1 2 2
Hotel Features 2 1/2 1 1
Hotel Price Range 2 1/2 1 1
SUM 8,00 2,33 4,50 4,50
Table 1. User inputs for main criteria calculation
Then the system calculates the sum of the each column:
SUM 8,00 2,33 4,50 4,50
Later the system normalizes (by diving each row element to the sum of the specific column) the inputs that the user has entered:
Hotel Location Room Features Hotel Features Hotel Price Range
Hotel Location 0,125 0,143 0,111 0,111
Room Features 0,375 0,429 0,444 0,444
Hotel Features 0,250 0,214 0,222 0,222
Hotel Price Range 0,250 0,214 0,222 0,222
SUM 1,00 1,00 1,00 1,00
Normalized Values
Table 2. Normalized version of user inputs for main criteria calculation
After normalization procedure the system calculates the followings:
By taking average of the each row to calculate “Priority Vector”
30
System multiples “Priority Vector matrix” with user defined “priority matrix” to find “AX Matrix”.
Later the system calculates LMAX by taking the average value of the previously divided “AX Matrix” to corresponding “Priority Vector” values.
The system then calculates the CI value by using the formula of (LMAX – n)/(n-1). Later the system calculates the CR value by diving CI to the corresponding table value
that can be seen below:
If the CR value that is calculated by the system is lower than 0.1 then we can say that the result is consistent.
Hotel Location Room Features Hotel Features Hotel Price Range Priority Vector AX AX/X
Hotel Location 0,125 0,143 0,111 0,111 0,123 0,491 4,005
Room Features 0,375 0,429 0,444 0,444 0,423 1,699 4,016
Hotel Features 0,250 0,214 0,222 0,222 0,227 0,911 4,010
Hotel Price Range 0,250 0,214 0,222 0,222 0,227 0,911 4,010
SUM 1,00 1,00 1,00 1,00 1,00 4,01 LMAX
0,003 CI
0,004 CR
Consistent RESULT
Normalized Values
All the steps that are used to calculate the main criteria values were also applied to the sub-criteria tables as well.
For the “Location” sub-criteria the following tables and calculations were generated:
Closeness to Manneken Pis
Closeness to Grand Place
Closeness to Rogier Square
Closeness to Zaventem Airport
Closeness to Brussels City Hall
Closeness to Manneken Pis
1 1/3 1 5 1/3
Closeness to Grand Place
3 1 3 15 1
Closeness to Rogier Square
1 1/3 1 5 1
Closeness to Zaventem Airport
1/5 1/15 1/5 1 1/15
Closeness to Brussels City Hall
3 1 1 15 1
Table 4. User inputs for location scaling criteria calculation
31
Table 3. Main criteria consistency check
SUM 8,20 2,73 6,20 41,00 3,40
Closeness to Manneken Pis
Closeness to Grand Place
Closeness to Rogier Square
Closeness to Zaventem Airport
Closeness to Brussels City Hall
Closeness to Manneken Pis
0,122 0,122 0,161 0,122 0,098
Closeness to Grand Place
0,366 0,366 0,484 0,366 0,294
Closeness to Rogier Square
0,122 0,122 0,161 0,122 0,294
Closeness to Zaventem Airport
0,024 0,024 0,032 0,024 0,020
Closeness to Brussels City Hall
0,366 0,366 0,161 0,366 0,294
SUM 1,00 1,00 1,00 1,00 1,00
Normalized
Table 5. Normalized version of user inputs for location scaling criteria calculation
Closeness to Manneken Pis
Closeness to Grand Place
Closeness to Rogier Square
Closeness to Zaventem Airport
Closeness to Brussels City Hall
Priority Vector AX AX/X
Closeness to Manneken Pis
0,122 0,122 0,161 0,122 0,098 0,125 0,643 5,142
Closeness to Grand Place
0,366 0,366 0,484 0,366 0,294 0,375 1,929 5,142
Closeness to Rogier Square
0,122 0,122 0,161 0,122 0,294 0,164 0,850 5,175
Closeness to Zaventem Airport
0,024 0,024 0,032 0,024 0,020 0,025 0,129 5,142
Closeness to Brussels City Hall
0,366 0,366 0,161 0,366 0,294 0,311 1,600 5,152
SUM 1,00 1,00 1,00 1,00 1,00 1,00 5,15 LMAX
0,038 CI
0,034 CR
Consistent RESULT
Normalized
Table 6. Location scaling criteria consistency check
32
For the “Room Features” sub-criteria the following tables and calculations were generated:
Air ConditionerExtra Bed
AvailabilityTV Phone Minibar City View
Air Conditioner 1 5 1 5 1/2 1/3
Extra Bed Availability
1/5 1 1/5 1 1/10 1/15
TV 1 5 1 5 1/2 1/2
Phone 1/5 1 1/5 1 1/10 1/10
Minibar 2 10 2 10 1 1
City View 3 15 2 10 1 1
Table 7. User inputs for room features scaling criteria calculation
SUM 7,40 37,00 6,40 32,00 3,20 3,00
Air ConditionerExtra Bed
AvailabilityTV Phone Minibar City View
Air Conditioner 0,135 0,135 0,156 0,156 0,156 0,111
Extra Bed Availability
0,027 0,027 0,031 0,031 0,031 0,022
TV 0,135 0,135 0,156 0,156 0,156 0,167
Phone 0,027 0,027 0,031 0,031 0,031 0,033
Minibar 0,270 0,270 0,313 0,313 0,313 0,333
City View 0,405 0,405 0,313 0,313 0,313 0,333
SUM 1,00 1,00 1,00 1,00 1,00 1,00
Normalized
Table 8. Normalized version of user inputs for room features scaling criteria calculation
33
Air ConditionerExtra Bed
AvailabilityTV Phone Minibar City View Priority Vector AX AX/X
Air Conditioner 0,135 0,135 0,156 0,156 0,156 0,111 0,142 0,852 6,012
Extra Bed Availability
0,027 0,027 0,031 0,031 0,031 0,022 0,028 0,170 6,012
TV 0,135 0,135 0,156 0,156 0,156 0,167 0,151 0,910 6,027
Phone 0,027 0,027 0,031 0,031 0,031 0,033 0,030 0,182 6,027
Minibar 0,270 0,270 0,313 0,313 0,313 0,333 0,302 1,819 6,027
City View 0,405 0,405 0,313 0,313 0,313 0,333 0,347 2,103 6,061
SUM 1,00 1,00 1,00 1,00 1,00 1,00 1,00 6,03 LMAX
0,005 CI
0,004 CR
Consistent RESULT
Normalized
Table 9. Room features scaling criteria consistency check
For the “Hotel Features” sub-criteria the following tables and calculations were generated:
WiFi Parking Gym Loundry24-Hour
ReceptionSauna
Past Costumer Satisfaction
WiFi 1 2 1/2 5 2 4 1/3
Parking 1/2 1 1/4 2 1 2 1/6
Gym 2 4 1 10 2 8 1/2
Loundry 1/5 1/2 1/10 1 1/2 1/10 1/10
24-Hour Reception
1/2 1 1/2 2 1 2 1/6
Sauna 1/4 1/2 1/8 10 1/2 1 1/10
Past Costumer Satisfaction
3 6 2 10 6 10 1
Hotel Features
Table 10. User inputs for hotel features scaling criteria calculation
SUM 7,45 15,00 4,48 40,00 13,00 27,10 2,37
34
WiFi Parking Gym Loundry24-Hour
ReceptionSauna
Past Costumer Satisfaction
WiFi 0,134 0,133 0,112 0,125 0,154 0,148 0,141
Parking 0,067 0,067 0,056 0,050 0,077 0,074 0,070
Gym 0,268 0,267 0,223 0,250 0,154 0,295 0,211
Loundry 0,027 0,033 0,022 0,025 0,038 0,004 0,042
24-Hour Reception
0,067 0,067 0,112 0,050 0,077 0,074 0,070
Sauna 0,034 0,033 0,028 0,250 0,038 0,037 0,042
Past Costumer Satisfaction
0,403 0,400 0,447 0,250 0,462 0,369 0,423
SUM 1,00 1,00 1,00 1,00 1,00 1,00 1,00
Normalized
Table 11. Normalized version of user inputs for hotel features scaling criteria calculation
WiFi Parking Gym Loundry24-Hour
ReceptionSauna
Past Costumer Satisfaction
Priority Vector
AX AX/X
WiFi 0,134 0,133 0,112 0,125 0,154 0,148 0,141 0,135 1,066 7,884
Parking 0,067 0,067 0,056 0,050 0,077 0,074 0,070 0,066 0,519 7,890
Gym 0,268 0,267 0,223 0,250 0,154 0,295 0,211 0,238 1,919 8,049
Loundry 0,027 0,033 0,022 0,025 0,038 0,004 0,042 0,027 0,194 7,077
24-Hour Reception
0,067 0,067 0,112 0,050 0,077 0,074 0,070 0,074 0,579 7,844
Sauna 0,034 0,033 0,028 0,250 0,038 0,037 0,042 0,066 0,513 7,765
Past Costumer Satisfaction
0,403 0,400 0,447 0,250 0,462 0,369 0,423 0,393 3,048 7,752
SUM 1,00 1,00 1,00 1,00 1,00 1,00 1,00 1,00 7,75 LMAX
0,125 CI
0,095 CR
Consistent
RESULT
Normalized
Table 12. Hotel features scaling criteria consistency check
35
For the “Hotel Price Range” sub-criteria the following tables and calculations were generated:
40€ and below 40€ - 80€ 80€ - 120€ 120€ - 160€ 160€ - 200€ 200€ - 240€ 240€ and above
40€ and below 1 2 2 2 3 4 10
40€ - 80€ 1/2 1 1 1 2 8 4
80€ - 120€ 1/2 1 1 1 3 2 4
120€ - 160€ 1/2 1 1 1 2 3 4
160€ - 200€ 1/3 1/2 1/3 1/2 1 4 2
200€ - 240€ 1/4 1/8 1/2 1/3 1/4 1 2
240€ and above 1/10 1/4 1/4 1/4 1/2 1/2 1
Table 13. User inputs for hotel price range scaling criteria calculation
SUM 3,18 5,88 6,08 6,08 11,75 22,50 27,00
40€ and below 40€ - 80€ 80€ - 120€ 120€ - 160€ 160€ - 200€ 200€ - 240€ 240€ and above
40€ and below 0,314 0,340 0,329 0,329 0,255 0,178 0,370
40€ - 80€ 0,157 0,170 0,164 0,164 0,170 0,356 0,148
80€ - 120€ 0,157 0,170 0,164 0,164 0,255 0,089 0,148
120€ - 160€ 0,157 0,170 0,164 0,164 0,170 0,133 0,148
160€ - 200€ 0,105 0,085 0,055 0,082 0,085 0,178 0,074
200€ - 240€ 0,079 0,021 0,082 0,055 0,021 0,044 0,074
240€ and above 0,031 0,043 0,041 0,041 0,043 0,022 0,037
SUM 1,00 1,00 1,00 1,00 1,00 1,00 1,00
Normalized
Table 14. Normalized version of user inputs for hotel price range scaling criteria calculation
36
40€ and below 40€ - 80€ 80€ - 120€ 120€ - 160€ 160€ - 200€ 200€ - 240€ 240€ and abovePriority Vector
AX AX/X
40€ and below 0,314 0,340 0,329 0,329 0,255 0,178 0,370 0,302 2,195 7,263
40€ - 80€ 0,157 0,170 0,164 0,164 0,170 0,356 0,148 0,190 1,431 7,531
80€ - 120€ 0,157 0,170 0,164 0,164 0,255 0,089 0,148 0,164 1,203 7,332
120€ - 160€ 0,157 0,170 0,164 0,164 0,170 0,133 0,148 0,158 1,162 7,342
160€ - 200€ 0,105 0,085 0,055 0,082 0,085 0,178 0,074 0,095 0,713 7,522
200€ - 240€ 0,079 0,021 0,082 0,055 0,021 0,044 0,074 0,054 0,385 7,162
240€ and above 0,031 0,043 0,041 0,041 0,043 0,022 0,037 0,037 0,269 7,312
SUM 1,00 1,00 1,00 1,00 1,00 1,00 1,00 1,00 7,35 LMAX
0,059 CI
0,044 CR
Consistent
RESULT
Normalized
Table 15. Hotel price range scaling criteria consistency check
We later start to execute decision processes in which we firstly determine the user priorities. In our example the user priority table can be seen below:
Location 0,123 Room Features 0,423 Hotel Features 0,227Hotel Price Range 0,227
Closeness to Manneken Pis
0,125 Air Conditioner 0,142 WiFi 0,135 40€ and below 0,302
Closeness to Grand Place 0,375 Extra Bed
Availability 0,028 Parking 0,066 40€ - 80€ 0,190
Closeness to Rogier Square 0,164 TV 0,151 Gym 0,238 80€ - 120€ 0,164
Closeness to Zaventem Airport 0,025 Phone 0,030 Loundry 0,027 120€ - 160€ 0,158
Closeness to Brussels City Hall 0,311 Minibar 0,302 24-Hour
Reception 0,074 160€ - 200€ 0,095
City View 0,347 Sauna 0,066 200€ - 240€ 0,054
Past Costumer Satisfaction 0,393 240€ and above 0,037
Table 16. The weights and priority matrixes of each criteria
37
In order to suggest a hotel to the user we have prepared a sample database consisting 3 hotels with the necessary detail information.
Hotel NameCloseness to Manneken Pis
Closeness to Grand Place
Closeness to Rogier Square
Closeness to Zaventem Airport
Closeness to Brussels City Hall Air Conditioner
Extra Bed Availability TV Phone Minibar
1 Hilton Brussels City 3 2 1 8 1 1 0 1 1 1
2Radisson Blu Royal Hotel 2 1 2 8 1 1 1 0 0 0
3 The Hotel Brussels 2 2 3 8 2 1 1 1 0 1
Sample Database
City View WiFi Parking Gym Loundry24-Hour Reception Sauna
Past Costumer Satisfaction
Hotel Price Range
0 1 1 0 1 1 1 0,76 1
0 1 1 0 1 1 1 0,84 41 1 1 1 0 1 1 0,87 7
Table 16. Sample hotel database
We later evaluate each of these alternatives by making necessary calculations. The example calculations and the hotel that is suggested by the system can be seen below:
Hotel Name Location ScoreRoom Features Score
Hotel Features Score
Hotel Price Range Score Total Score
3 The Hotel Brussels 0,013929831 0,119065214 0,02990566 0,008372359 0,171273064
1 Hilton Brussels City 0,016736438 0,058732138 0,021653979 0,06865986 0,165782415
2 Radisson Blu Royal Hotel 0,018341668 0,01027724 0,022674979 0,035951384 0,087245271
Sample Database
Table 17. The weights of each criteria for each hotel
3.4. Data Source and Flow Mechanisms
3.4.1. Data CollectionFor our DSS we use different criteria and data. We determined these criteria in three different steps. First we spoke to different experts like Assoc. Prof. Maria Dolores Alvarez who advised us to use attributes like prica, laundry, parking and some other. Also we had a talk with Mr. Ahmet Peker, Hotel Outside Sale Director of the Eurasia Hotel in Istanbul, who could give us information about types of rooms and suits, security aspects and the customer needs and profiles. Additionally we made a literature review; too, to find out that the importance given to each attribute differs from customer to customer. Last we also made a survey with more than 40 people to get their point of view in several questions. You can find the servey result in the following chapter. The chosen criteria can be viewed in the hierarchical tree.
3.4.2. Flow Chart Diagram
38
Figure 10. Flowchart diagram
39
3.4.3. Context Diagram
Figure 11. Context diagram
40
3.4.4. Use Case Diagram
Figure 12. Use case diagram
3.4.5. Database Diagram
Figure 13. Database diagram
41
3.5. User Interface and Reports
Welcome Page
Figure 14. Welcome page
This is our main page which is the start point of the system. The user can start the AHP calculation by clicking the “Start” button.
42
Weighting the main criteria
Figure 15. Example pair wise comparation page
After clicking the “Start” button, the user is faced with this interface. Here, the user gives pair wise values to main criteria.
Sample Error message
Figure 16. Sample error message
The user can confront such an error message as this example. Here, the user did not enter consistent values for comparison; hence, he / she is not allowed to continue until entering all values. The system display errors when the values are inconsistent, invalid, or not entered.
Sample Help information
43
Figure 17. Sample Help information
The system includes help button in each step of the program. The user can click the “Help” button and learn the necessary information about that related part.
Result page
Figure 18. Result page
44
The top five hotels are shown regarding with all information as a result of total score. At this step, the user can click the “More Info & Reservation” button to go to related hotel’s web site.
Decision Criteria
Figure 19. Decision Criteria
After evaluation of alternatives, the user can continue either choosing start over which enables user to start the system at beginning of all steps or choosing what if analysis which enables user to change his / her criteria weights entered before to see the optimal alternative and to learn how the rank of alternatives will change.
4. ASSESSMENT
It is a known fact that, selecting a project topic is one of the most difficult part in a project development processes. Firstly, as a team, we evaluated the topics which came into our mind; we made a decision about a LP project which was related intercity scheduling. However, due to the requirements and the different expectations of the course, we have decided to change our project. Thus we thought that, we saw that selecting a hotel to stay when someone plan to go somewhere is really hard and time consuming process for people and this is a necessity for many people. But making the system which includes all hotels in the world might require very much effort than we can do, so that we decided to focus on only one city, which is Brussels. We selected Brussels because each of us went to Brussels and a lot of people visit this city each year. After talking the instructor about the project, we have started to analyze the system in a deeper way.
45
Preparing final report was very difficult rather than preparing mid-report. Because of the other requirements that we had to do for other courses, we started coding a little bit late, and it was really cumbersome.
The problems that have faced during the analysis of our project were mainly caused due to lack of the communication with the course instructor. Because we didn’t go to talk with her about our model and mid report, there were some inconsistencies. And we had some delays in determination of the certain model, so we started late to prepare final report.
The strengths of our team was that our group members get on well with each other; therefore, that was not a problem at all to communicate or to come on a common conclusion. Also the meetings time was never a problem as we take almost the same courses.
In addition to that to speed up file transferring and connection between team members, we use Subversion, which saved us too much time and by doing so we also reached our project files wherever they are required.
Other strength of our team and project was diversity of our team members’ skills and specialization areas, and these factors lead satisfaction and motivation in developing the system and model.
46
4.1 Project PlanMeeting Place: University Studies
Meeting Time: Sunday (2 PM – 8 PM)
Coordinator: Furkan Gürsoy
Task Allocation:
Barış Çimen
Furkan Gürsoy
İsmail Kazan
Sascha Burmeister
Adil Ayar
Team Creation Project Definition Project Proposal 1st Presentation Literature Review Survey Preparation Survey Data Collection Survey Evaluation Development of Model Mid Report 2nd Presentation Data Collection Data Integration Database Development GUI Design System Development Testing Final Report Final Presentation
Table 18. Task allocation table
The phases were finished at the times specified in the master plan. We proceeded through phases according to our calendar without having any unfinished phases or delays.
47
4.2. Master PlanMASTER PLAN
Project Code 11
Project TitleA DSS FOR CHOOSING
HOTEL ACCOMMODATION IN BRUSSELS
Team Members ADİL AYAR, SASCHA BURMEISTER, BARIŞ ÇİMEN, FURKAN GÜRSOY, İSMAİL KAZAN,
PhasePlanned Actual
Complete (%)
ProblemsStart Finish Start Finish
Team Formation Sept 28 Oct 4 Sept 28 Oct 4 100% -
Project Proposal Oct 7 Oct 20 Oct 7 Oct 20 100% -
Presentation Oct 20 Oct 21 Oct 20 Oct 23 100% -
Literature Review (Library, Web, former studies)
Oct 9 Nov 8 Oct 9 Nov 8 100% -
Interviews with experts, decision makers in the related area
Oct 25 Nov 15 Nov 5 Nov 13 100% -
Development of the model
Oct 25 Nov 22 Oct 25 Nov 22 100% -
Mid-report Nov 5 Nov 27 Nov 5 Nov 25 100% -
Presentation Nov 23 24 Nov Nov 26 Nov 27 100% -
Data Collection and Organization
Nov 22 Dec 6 Nov 22 Dec 6 100% -
Coding interfaces Nov 22 Dec 20 Nov 22 Dec 20 100% -
Validation (Optional) Dec 20 Dec 22 Dec 10 Dec 20 100% -
Final Report Dec 9 Dec 20 Dec 9 Dec 23 100% -
Presentation Dec 20 Dec 21 Dec 20 Dec 23 100% -
48
5. TESTING
The aim of the testing processes is to show whether the system meets its specification or not. In our system, we tried to answer the question of “Are we building the system right?” In other words, testing is to ensure that work products meet their specified requirements.
In the testing process, we tried to do below steps;
When we found an error, we repeated the test to show other errors. When we corrected an error, we repeated the test to check you did fix it We selected a test sets that cover the range of behaviors of our system. We selected a test sets that are representative of real uses. As a final step we kept track of what tests were performed, and what the results were
5.1. Pairwise Comparison Page Testing
Name Criteria Comparison Page
Requirement
Preconditions User has to click Start button from Welcome page
Steps of Test
1. Entering a string value or other characters which are not between 1/9 and 92. Entering nothing,3. Entering inconsistent values.4. Click Next button
Expected Results
1. Control that entered values are null.2. If the user leaves blank some cells, error message is given.3. If entered values are not consistent, error message is shown.4. It is not allowed to enter values except the ones that are between 1/9 and 9.
5.2. Filter Page Testing
Name Filter Page
Requirement
Preconditions User has to complete previous 5 steps
Steps of Test 1. Selecting maximum willingness to pay for scaling purposes.2. Click Next Step button.
Expected Results 1. If user doesn’t select any criteria from this step, the system should select default one.
Table 20. Main steps of filter page testing
49
Table 19. Master Plan
Price Range Selection Dragging Bar TestingSelected Criteria Results40 Euro The hotels whose price are lower or equal to
40€ are listed.80 Euro The hotels whose price are lower or equal to
80€ are listed.120 Euro The hotels whose price are lower or equal to
120€ are listed.160 Euro The hotels whose price are lower or equal to
160€ are listed.200 Euro The hotels whose price are lower or equal to
200€ are listed.240 Euro The hotels whose price are lower or equal to
240€ are listed.All Prices All the hotels are listed without regarding their
price.Table 21. Price Range Selection Dragging Bar Testing
5.3. Consistency Check Testing
Name Consistency Check Processes
Requirement
Preconditions User has to enter values to the cells in criteria each evaluation page.
Steps of Test
1. All cells are filled up by the user.2. The matrix is normalized.3. By taking the average of each row, the priority vector is calculated.4. LamdaMax is calculated.5. Consistency index is calculated.6. Consistency ratio is calculated.7. Click Next Step button.
Expected Results
1. If the Consistency ratio is greater than 0.1, it means the values are not make sense.2. If inconsistency doesn’t occur, the system will jump to next step.3. If the user leaves blank some cells, error message is given.4. If entered values are not consistent, error message is shown.5. It is not allowed to enter values except the ones that are between 1/9 and 9.
5.4. Help Page Testing
Name Help Page Testing
Requirement
50
Preconditions User has to click Help Page button.
Steps of Test 1. Click different help buttons at different pages.2. Validate the correct information is on the correct page.
Expected Results 1. The information pop up window is shown at the top of the page.2. When user clicks again to the help button, the information disappears.
5.5. Start Again Testing
Name Start Over Testing
Requirement
Preconditions User has to click Start Over button at the end of the analysis.
Steps of Test 1. New filtering is made among different criteria.2. New values are entered to each cell in the pairwise comparison.
Expected Results
1. New and empty pair wise calculation table is given to the user.2. At the end of the calculation, it is expected that the system should produce new
outputs according to the new inputs.3. New list is provided to the user.
5.6. What-if Analysis Testing
Name What-if Analysis Testing
Requirement
Preconditions User has to click What-if Analysis button at the end of the analysis.
Steps of Test 1. New weights to main criteria and scaling criteria are entered.2. User can change each value from previous calculation table.
Expected Results
1. Previous evaluation values are expected to remain in each pair wise table.2. When user changes any value from the previous table, the system uses new values in
calculation processes.3. New priority list is provided to the user.
51
6. CONCLUSION
We have tried to keep up with the master plan as much as possible during the execution of the project steps. Although the execution of some tasks took different time intervals, we eventually finished all the tasks successfully.
Since the next steps that need to be executed are much more critical from the earlier steps of the project, we will try to keep up with the plan in a much more concentrated way.
We have also made improvements on the master plan and attached our new plan to the report.
When the all steps which are done for this project are considered, they can be summarized as follows. Firstly, in the project proposal phase, we determined our project topic, and the mission and the scope of the project are determined. And in this step we also determined the model of the system, which AHP, and decided to make it in web based format.
In the mid report, we made a literature review about DSS and AHP, and we tried to make a literature review on the hotel accommodate selection system, but we could find very few researches on this issue, so we made a survey to determine and eliminate criteria for hotel selection system. Then we analyzed all collected data from the survey, we determined our criteria, developed our AHP model, a composed a hierarchical tree. Then, to illustrate our model in mid report, we made a main criteria pairwise comparison and a scaling criteria comparison in excel depending on our model. After all steps are completed for the model, we prepared our mid-report which include all processes of our work; literature view, developing model, and necessary diagrams, and mid report presentation was prepared.
In the final report, firstly we corrected our mistakes both in model and in mid report. Then we coded our model using PHP and design user interfaces, and tested the system to see whether it satisfy user requirements correctly or not. We created a website and applied the methodology and model to this website after the mid-report. We prepared a system that works automatically to find the most appropriate hotel for the user according to AHP model. The AHP model is determined by user preferences. Before calculation, user selects his/her minimum willingness to pay and compares them with pair wise comparison. If he/she wants, he/she can change the weight with the “what if analysis” which appear on results page. At the last step of the project, we tested the system and we prepared our final report and presentation.
When it comes to the weaknesses of our DSS model, it can be said that, because our database has limited information about the hotels, and excludes many of criteria, such as different types of materials in the room, it may not give 100% certain information about the decision. For future research these and more criteria can be added to the model, and used in filtering hotels.
52
53
REFERENCES[1] Ananth, M., DeMicco, F. J., Moreo, P. J., & Howey, R. M. (1992).Marketplace
lodging needs of mature travellers.The Cornell Hotel and Restaurant Administration Quarterly 33(4), 12-24.
[2] Arnott, D.and Pervan, G.(2005) “A critical analysis of Decision Support Systems research”, Journal of Information Technology, pp67-87.
[3] Atkinson, A. (1988). Answering the eternal question: What does the customer want? The Cornell Hotel and Restaurant Administration Quarterly,29(2), 12-14
[4] Bohanec, Marco “What is Decision Support?”, Department of Intelligent Systems Jožef Stefan Institute Jamova 39, SI-1000 Ljubljana, Slovenia.
[5] Chou, T. Y., Hsu, C. L., & Chen, M. C. (2008). A fuzzy multi-criteria decision model for international tourist hotels location selection. International Journal of Hospitality Management, 27(2), 293-301.
[6] Druzdzel, Marek J. and Flynn, Roger R. (2002) “Decision Support Systems”, Decision Systems Laboratory School of Information Sciences and Intelligent Systems Program University of Pittsburgh.
[7] Emir, O. Pekyaman, A “Çocuklu Ailelerin Otel İşletmesi Seçiminde Etkili Olan Faktörler: Afyonkarahisar’da Bir Uygulama”, Celal Bayar Üniversitesi, İ.İ.B.F. Dergisi, Yönetim ve Ekonomi, 17, 2, 159-181., 2010
[8] Faizah, S., & Razali, M. (2009). Decision Support System For Hotel And Chalet Selection In Pangkor Island.
[9] Kuo, R. J., Chi, S. C., & Kao, S. S. (2002). A decision support system for selecting convenience store location through integration of fuzzy AHP and artificial neural network. Computers in Industry, 47(2), 199-214.
[10] Lewis, R. C. (1985). Getting the most from marketing research [Part V].Predicting hotel choice: The factors underlying perception.TheCornell Hotel and Restaurant Administration Quarterly,26(3), 82-96.
[11] Lockyer, Tim (2005) International Journal of Contemporary Hospitality Management; 2005;17,6/7;ProQuest Central pg. 48
54
[12] Lockyer, Tim (2005) The perceived importance of price as one hotel selection dimension Department of Tourism Management, Waikato Management School, The University of Waikato, Private Bag 3105, Hamilton, New Zealand
[13] MacKenzie, S. B. (1986). The role of attention in mediating the effect of advertising on attribute importance. Journal of Consumer Research,13(September), 174-195
[14] Murat, G., & Çelik, N. (2012). Analitik hiyerarşi süreci yöntemi ile otel işletmelerinde hizmet kalitesini değerlendirme: Bartın örneği. Uluslararası Yönetim İktisat ve İşletme Dergisi, 3(6), 1-20.
[15] Noor, N. M. M., Ahm, I., Ali, N. H., & Ismail, F. (2010, June). Intelligent decision support system for tourism destination choice: A preliminary study. In Information Technology (ITSim), 2010 International Symposium in (Vol. 3, pp. 1357-1361). IEEE.
[16] Rivers, M. J., Toh, R. S., & Alaoui, M. (1991). Frequent-stayer programs: The demographic, behavioural, and attitudinal characteristics of hotel steady sleepers.Journal of Travel Research, 30 (2), 41-45
[17] Saaty , Thomas L.(2008) “Decision making with the analytic hierarchy process” , Katz Graduate School of Business, University of Pittsburgh, Pittsburgh, PA 15260, USA
55
APPENDIX
CodesIndex.php
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<?php
header("Location: inc/steps.inc.php");
//$a= array(array(1,1/3,1/2,1/2),array(3,1,2,2),array(2,1/2,1,1),array(2,1/2,1,1));
//print_r(($a));
//generateForm(array('a','a','a','a','a'), "inc/steps.inc.php?action=step1");
?>
</body>
</html>
Steps.inc.php
<?php
session_start();
//ini_set('display_errors',1);
//error_reporting(E_ALL);
include("functions.inc.php");
switch ($_GET['action']) {
case "welcome":
welcome();
break;
case "step1":
56
step1();
break;
case "step2":
step2();
break;
case "step3":
step3();
break;
case "step4":
step4();
break;
case "step5":
step5();
break;
case "step6":
step6();
break;
case "step7":
step7();
break;
default:
welcome();
break;
}
function controlSteps($step="")
{
if(empty($_SESSION['step1'])){
$_SESSION['error'] = "ERROR: You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step1");
exit;
57
}elseif(!isValidMatrix($_SESSION['step1'], 0, 9)){
$_SESSION['error'] = "ERROR: The data you entered is invalid or missing! <br> Tip: Please be sure that you entered only natural numbers n from 1 to 9 or 1/n for all cells. You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step1");
exit;
}elseif(!isConsistent($_SESSION['step1'])){
$_SESSION['error'] = "ERROR: The data you entered are inconsistence! <br> Tip: Please proof that you data is not contradictory. E.g. if A is more important than B and C is more important than B, then it is necessary for C to be more important than A, too. You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step1");
exit;
}
if($step == "step2"){
return true;
}
if(empty($_SESSION['step2'])){
$_SESSION['error'] = "ERROR: You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step2");
exit;
}elseif(!isValidMatrix($_SESSION['step2'], 0, 9)){
$_SESSION['error'] = "ERROR: The data you entered is invalid or missing! <br> Tip: Please be sure that you entered only natural numbers n from 1 to 9 or 1/n for all cells. You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step2");
exit;
}elseif(!isConsistent($_SESSION['step2'])){
$_SESSION['error'] = "ERROR: The data you entered are inconsistence! <br> Tip: Please proof that you data is not contradictory. E.g. if A is more important than B and C is more important than B, then it is necessary for C to be more important than A, too. You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step2");
exit;
58
}
if($step == "step3"){
return true;
}
if(empty($_SESSION['step3'])){
$_SESSION['error'] = "ERROR: You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step3");
exit;
}elseif(!isValidMatrix($_SESSION['step3'], 0, 9)){
$_SESSION['error'] = "ERROR: The data you entered is invalid or missing! <br> Tip: Please be sure that you entered only natural numbers n from 1 to 9 or 1/n for all cells. You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step3");
exit;
}elseif(!isConsistent($_SESSION['step3'])){
$_SESSION['error'] = "ERROR: The data you entered are inconsistence! <br> Tip: Please proof that you data is not contradictory. E.g. if A is more important than B and C is more important than B, then it is necessary for C to be more important than A, too. You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step3");
exit;
}
if($step == "step4"){
return true;
}
if(empty($_SESSION['step4'])){
$_SESSION['error'] = "ERROR: You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step4");
exit;
}elseif(!isValidMatrix($_SESSION['step4'], 0, 9)){
59
$_SESSION['error'] = "ERROR: The data you entered is invalid or missing! <br> Tip: Please be sure that you entered only natural numbers n from 1 to 9 or 1/n for all cells. You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step4");
exit;
}elseif(!isConsistent($_SESSION['step4'])){
$_SESSION['error'] = "ERROR: The data you entered are inconsistence! <br> Tip: Please proof that you data is not contradictory. E.g. if A is more important than B and C is more important than B, then it is necessary for C to be more important than A, too. You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step4");
exit;
}
if($step == "step5"){
return true;
}
if(empty($_SESSION['step5'])){
$_SESSION['error'] = "ERROR: You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step5");
exit;
}elseif(!is_numeric($_SESSION['step5']) || $_SESSION['step5'] < 1 || $_SESSION['step5'] > 7){
$_SESSION['error'] = "ERROR: The data you entered is invalid or missing! You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step5");
exit;
}
if($step == "step6"){
return true;
}
if($_SESSION['step5'] != 1){
if(empty($_SESSION['step6'])){
$_SESSION['error'] = "ERROR: You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step6");
exit;
60
}elseif(!isValidMatrix($_SESSION['step6'], 0, 9)){
$_SESSION['error'] = "ERROR: The data you entered is invalid or missing! <br> Tip: Please be sure that you enter only natural numbers n from 1 to 9 or 1/n for all cells. You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step6");
exit;
}elseif(!isConsistent($_SESSION['step6'])){
$_SESSION['error'] = "ERROR: The data you entered are inconsistence! <br> Tip: Please proof that you data is not contradictory. E.g. if A is more important than B and C is more important than B, then it is necessary for C to be more important than A, too. You have to complete this step to proceed to the next step!";
header("Location: steps.inc.php?action=step6");
exit;
}}
if($step == "step7"){
return true;
}
}
function generateStep($arr, $step) {
if(empty($_POST))
{
generateForm($arr, "steps.inc.php?action=step".$step, $_SESSION["step".$step."Val"]);
if(!empty($_SESSION['error']))
{
$_SESSION['error'] = "";
}
}else{
$tmp = array();
61
$tmpVal = array();
$say = 0;
switch ($step) {
case 1:
$say = 5;
break;
case 2;
$say = 6;
break;
case 3;
$say = 7;
break;
case 4;
$say = 8;
break;
default:
break;
}
for($i=1;$i<$say;$i++)
{
$temp = array();
$temp2 = array();
for($j=1;$j<$say;$j++)
{
$temp[] = fraction($_POST["mc".$i.$j]);
$temp2[] = (string) $_POST["mc".$i.$j];
}
array_push($tmp, $temp);
array_push($tmpVal, $temp2);
62
}
$_SESSION['step'.$step] = $tmp;
$_SESSION['step'.$step.'Val'] = $tmpVal;
controlSteps("step".($step+1));
header("Location: steps.inc.php?action=step".($step+1));
exit;
}
}
function welcome()
{
include 'welcome.php';
session_destroy();
}
function step1()
{
generateStep(array('Hotel Location','Room Features','Hotel Features','Hotel Price Range'), 1);
}
function step2()
{
controlSteps("step2");
generateStep(array('Closeness to Manneken Pis','Closeness to Grand Place','Closeness to Rogier Square','Closeness to Zaventem Airport ','Closeness to Brussels City Hall'
), 2);
}
function step3()
{
controlSteps("step3");
63
generateStep(array('Air Conditioner','Extra Bed Availability','TV','Phone','Minibar','City View'), 3);
}
function step4()
{
controlSteps("step4");
generateStep(array('WiFi','Parking','Gym','Loundry','24-Hour Reception','Sauna','Past Costumer Satisfaction'
), 4);
}
function step5()
{
controlSteps("step5");
if(empty($_POST))
{
include 'header.inc.php';
echo '<h1>Price Range Selection</h1>
<div class="explanation">
Please select your maximum willingness to pay fot the hotel.
</div>
<div class="clear"></div>';
if(!empty($_SESSION['error'])){
echo '<div class="error">';
echo $_SESSION['error'];
$_SESSION['error'] = "";
echo '</div>';
64
}
echo ' <div class="clear"></div>
<div class="help" id="help" style="display: none;">
HELP: You can select your maximum willingness to pay by dragging the bar.
</div>
<div class="help" id="warning" style="display: none;">
WARNING: If you select "40 Euro", the system will automatically skip the pair wise comparation of the price range and include only hotels whose price are lower or equal to 40 Euro.
</div>
<div class="clear"></div>'
. '<div class="container">';
$default = "160 Euro";
if(!empty($_SESSION['step5'])){
switch ($_SESSION['step5']) {
case 1:
$default = "40 Euro";
break;
case 2:
$default = "80 Euro";
break;
case 3:
$default = "120 Euro";
break;
case 4:
$default = "160 Euro";
break;
case 5:
$default = "200 Euro";
break;
65
case 6:
$default = "240 Euro";
break;
case 7:
$default = "All Prices";
break;
default:
$default = "160 Euro";
break;
}
}
echo '<div class="clear"></div>
<div class="range" id="range"><form id="form" name="form1" method="post" action="">
<label for="select">Maximum Willingness to Pay: </label> <br><input type="text" name="pay" id="maxRange" value="'.$default.'" />
<div id="storlekslider"></div>
<input type="text" name="pay" id="storlek_testet" value="'.$_SESSION['step5'].'" style="display: none;" />
</form></div>';
$pButton = "";
switch ($_GET['action']) {
case "step2":
$pButton = '<a class="button right" href="steps.inc.php?action=step1">< PREVIOUS STEP</a>';
break;
case "step3":
$pButton = '<a class="button right" href="steps.inc.php?action=step2">< PREVIOUS STEP</a>';
break;
case "step4":
66
$pButton = '<a class="button right" href="steps.inc.php?action=step3">< PREVIOUS STEP</a>';
break;
case "step5":
$pButton = '<a class="button right" href="steps.inc.php?action=step4">< PREVIOUS STEP</a>';
break;
case "step6":
$pButton = '<a class="button right" href="steps.inc.php?action=step5">< PREVIOUS STEP</a>';
break;
case "step7":
$pButton = '<a class="button right" href="steps.inc.php?action=step6">< PREVIOUS STEP</a>';
break;
default:
break;
}
echo '<div class="navigation">
<a class="button right" href="#" onclick="document.getElementById(\'form\').submit();">NEXT STEP ></a>
'.$pButton.'
<a class="button left" href="#" id="helpButton">HELP</a></div>
</div> <!-- container -->';
include 'footer.inc.php';
}else{
if($_SESSION['step5'] != $_POST['pay'])
{
$_SESSION['step6'] = null;
$_SESSION['step6Val'] = null;
}
67
$_SESSION['step5'] = $_POST['pay'];
$nextStep = "step6";
if($_SESSION['step5']==1) $nextStep = "step7";
controlSteps($nextStep);
header("Location: steps.inc.php?action=".$nextStep);
exit;
}
}
function step6()
{
controlSteps("step6");
if(empty($_POST))
{
if($_SESSION['step5'] == 1) {
include 'header.inc.php';
$_SESSION['step6'] = null;
$_SESSION['step6Val'] = null;
echo '<h1>Price Range Selection</h1>
<div class="clear"></div>';
if(!empty($_SESSION['error'])){
//echo '<div class="error">';
//echo $_SESSION['error'];
$_SESSION['error'] = "";
//echo '</div>';
}
echo '
68
<div class="clear"></div>
<div class="help" id="help" style="display: none;">
HELP: You can select your maximum willingness to pay by dragging the bar.
</div>
<div class="help" id="warning" style="display: none;">
WARNING: If you select "40 Euro", the system will automatically skip the pair wise comparation of the price range and include only hotels whose price are lower or equal to 40 Euro.
</div>
<div class="clear"></div>'
. '<div class="container">';
echo '<div class="clear"></div>
<div class="range" id="range">WARNING: Because you selected "40 Euro" which is the minimum price range in the system, the system do not take the pair wise comparation of the price range and include only hotels whose price are lower or equal to 40 Euro.<br><br> Please go to next step to see the results.</div>';
$pButton = "";
switch ($_GET['action']) {
case "step2":
$pButton = '<a class="button right" href="steps.inc.php?action=step1">< PREVIOUS STEP</a>';
break;
case "step3":
$pButton = '<a class="button right" href="steps.inc.php?action=step2">< PREVIOUS STEP</a>';
break;
case "step4":
$pButton = '<a class="button right" href="steps.inc.php?action=step3">< PREVIOUS STEP</a>';
break;
case "step5":
$pButton = '<a class="button right" href="steps.inc.php?action=step4">< PREVIOUS STEP</a>';
69
break;
case "step6":
$pButton = '<a class="button right" href="steps.inc.php?action=step5">< PREVIOUS STEP</a>';
break;
case "step7":
$pButton = '<a class="button right" href="steps.inc.php?action=step6">< PREVIOUS STEP</a>';
break;
default:
break;
}
echo '<div class="navigation">
<a class="button right" href="#" onclick="location.href=\'steps.inc.php?action=step7\'">NEXT STEP ></a>
'.$pButton.'
<a class="button left" href="#" id="helpButton">HELP</a></div>
</div> <!-- container -->';
include 'footer.inc.php';
$_SESSION['step6'] = null;
exit;
}
generateForm(array_slice(array('40€ and below','40€ - 80€','80€ - 120€','120€ - 160€','160€ - 200€','200€ - 240€','240€ and above'
), 0, $_SESSION['step5']), "steps.inc.php?action=step6", $_SESSION['step6Val']);
if(!empty($_SESSION['error']))
{
$_SESSION['error'] = "";
}
70
}else{
if($_SESSION['step5'] == 1)
{
controlSteps("step7");
header("Location: steps.inc.php?action=step7");
exit;
}
$step6 = array();
$step6Val = array();
for($i=1;$i<($_SESSION['step5']+1);$i++)
{
$temp = array();
$temp2 = array();
for($j=1;$j<($_SESSION['step5']+1);$j++)
{
$temp[] = fraction($_POST["mc".$i.$j]);
$temp2[] = (string) $_POST["mc".$i.$j];
}
array_push($step6, $temp);
array_push($step6Val, $temp2);
}
$_SESSION['step6'] = $step6;
$_SESSION['step6Val'] = $step6Val;
controlSteps("step7");
header("Location: steps.inc.php?action=step7");
exit;
}
}
function step7()
71
{
controlSteps("step7");
$temp['step1'] = getX($_SESSION['step1']);
$temp['step2'] = getX($_SESSION['step2']);
$temp['step3'] = getX($_SESSION['step3']);
$temp['step4'] = getX($_SESSION['step4']);
$temp['step5'] = $_SESSION['step5'];
if($temp['step5'] == 1) $temp['step6'] = "pass";
else
$temp['step6'] = getX($_SESSION['step6']);
//print_r($temp);
$_SESSION['pVectors'] = $temp;
//echo getTotal("cToMP");
$hotels = getResults($_SESSION['pVectors']);
include 'header.inc.php';
echo ' <div class="clear"></div>
<div class="help" id="help" style="display: none;">
HELP: The result page shows hotel recommenditions according to values that you enter. The hotel list are sorted by the total points. The first hotel is the most appropriate one for you.
</div>
<div class="clear"></div>';
echo '<h1>Results</h1><div class="clear"></div>';
echo '<div class="container">';
foreach ($hotels as $hotel) {
echo '<h2>'.$hotel[0]["hotelName"].'</h2>
<div class="features">
<div class="point">'.round($hotel['tScore'],5).'</div>
<h3>Room Features</h3>';
72
if($hotel[0]['airConditioner'] == 1) echo "[<strong>Air Conditioner</strong>] ";
if($hotel[0]['extraBedAvailability'] == 1) echo "[<strong>Extra Bed Available</strong>] ";
if($hotel[0]['tv'] == 1) echo "[<strong>TV</strong>] ";
if($hotel[0]['phone'] == 1) echo "[<strong>Phone</strong>] ";
if($hotel[0]['minibar'] == 1) echo "[<strong>Minibar</strong>] ";
if($hotel[0]['cityView'] == 1) echo "[<strong>City View</strong>] ";
echo '<h3>Hotel Features</h3>';
if($hotel[0]['wifi'] == 1) echo "[<strong>Wifi</strong>] ";
if($hotel[0]['parking'] == 1) echo "[<strong>Parking</strong>] ";
if($hotel[0]['gym'] == 1) echo "[<strong>Gym</strong>] ";
if($hotel[0]['loundry'] == 1) echo "[<strong>Laundry</strong>] ";
if($hotel[0]['sauna'] == 1) echo "[<strong>Sauna</strong>] ";
if($hotel[0]['reception24hour'] == 1) echo "[<strong>24-Hour Reception</strong>] ";
if(!empty($hotel[0]['pastCustomerSatisfaction'])) echo "<br>[Past Costumer Satisfaction: <strong>".($hotel[0]['pastCustomerSatisfaction']*10)." out of 10]</strong> ";
echo '<h3>Hotel Location</h3>';
echo "[Closeness to Manneken Pis: <strong>".getLocationText($hotel[0]['cToMP'])."</strong> ] <br>";
echo "[Closeness to Grand Place: <strong>".getLocationText($hotel[0]['cToGP'])."</strong> ] <br>";
echo "[Closeness to Rogier Square: <strong>".getLocationText($hotel[0]['cToRS'])."</strong> ] <br>";
echo "[Closeness to Zaventem Airport: <strong>".getLocationText($hotel[0]['cToZA'])."</strong> ] <br>";
echo "[Closeness to Brussels City Hall: <strong>".getLocationText($hotel[0]['cToBCH'])."</strong> ] <br>";
echo ' <h3>Price Range: '.getPriceText($hotel[0]['priceRange']).' Per Night</h3>
73
<a class="button next right" target="_blank" href="'.$hotel[0]['link'].'">MORE INFO & RESERVATION</a>
<div class="clear"></div>
</div>';
}
echo '</div>';
echo '<div class="navigation">
<a class="button right" href="#" onclick="location.href=\'steps.inc.php?action=welcome\'">START AGAIN</a>
<a class="button right" href="#" onclick="location.href=\'steps.inc.php?action=step1\'">WHAT-IF ANALYSIS</a>
<a class="button left" href="#" id="helpButton">HELP</a></div>
</div> <!-- container -->';
include 'footer.inc.php';
}
?>
Welcome.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>A DSS for Choosing Hotel Accomodation</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
74
<body>
<div id="header">
<div class="header_top">
<div class="center"><a href="steps.inc.php?action=welcome"><img src="img/logo.png" title="Home Page"/></a></div>
</div>
<div class="header_bottom">
<div class="center"><a href="steps.inc.php?action=welcome"><img src="img/site-name.png" title="Home Page"/></a></div>
</div>
</div>
<div id="content">
<div class="center">
<h1>Welcome</h1>
<p>
The project aims to bring easiness and efficiency to customers when they decide on a hotel to stay. Solving this decision making problem in a personalized way is quite significant when you consider the amount of money spent on hotel accommodation & unsatisfied or partly satisfied customers in the end.
</p>
<p>
Considering the lack of DSS systems solving this significant problem, it is obvious that a DSS system like ours is needed to assist people with this decision. Our DSS project will satisfy this need, at first, within Brussels.
</p>
<p><strong>What is DSS?</strong> <br> A Decision Support System (DSS) is a computer-based information system that supports business or organizational decision-making activities.</p>
<p><strong>What is AHP?</strong> <br> Analytic Hierarchy Process (AHP) is one of Multi Criteria decision making method that was originally developed by Prof. Thomas L. Saaty. In short, it is a method to derive ratio scales from paired comparisons. The input can be obtained from actual measurement such as price, weight etc., or from subjective opinion such as satisfaction feelings and preference. AHP allow some small inconsistency in judgment because human is not always
75
consistent. The ratio scales are derived from the principal Eigen vectors and the consistency index is derived from the principal Eigen value.</p>
<p><br /><br />
<center><a class="button center" href="steps.inc.php?action=step1" onclick="document.getElementById('form').submit();">START</a></center>
</p>
</div>
</div>
<div class="clear"></div>
<div id="footer">
<div class="center">
<div class="b1">
A DSS for Choosing Hotel Accomodation in Brussels<br />
<span class="grey">All Rights Reserved</span>
</div>
<div class="b2">
MIS463 Course Project. Team 11
</div>
</div>
</div>
</body>
</html>
Mysql.inc.php
<?php
class MySQL {
// Base variables
76
var $lastError; // Holds the last error
var $lastQuery; // Holds the last query
var $result; // Holds the MySQL query result
var $records; // Holds the total number of records returned
var $affected; // Holds the total number of records affected
var $rawResults; // Holds raw 'arrayed' results
var $arrayedResult; // Holds an array of the result
var $databaseLink; // Database Connection Link
var $hostname="localhost"; // MySQL Hostname
var $username="mis463"; // MySQL Username
var $password="misboun"; // MySQL Password
var $database="mis463project";
function MySQL(){
$this->Connect();
}
private function Connect($persistant = false){
$this->CloseConnection();
if($persistant){
$this->databaseLink = mysql_pconnect($this->hostname, $this->username, $this->password);
}else{
$this->databaseLink = mysql_connect($this->hostname, $this->username, $this->password);
@mysql_set_charset('utf8',$this->databaseLink);
}
if(!$this->databaseLink){
$this->lastError = 'Could not connect to server: ' . mysql_error($this->databaseLink);
return false;
}
77
if(!$this->UseDB()){
$this->lastError = 'Could not connect to database: ' . mysql_error($this->databaseLink);
return false;
}
return true;
}
// Select database to use
private function UseDB(){
if(!mysql_select_db($this->database, $this->databaseLink)){
$this->lastError = 'Cannot select database: ' . mysql_error($this->databaseLink);
return false;
}else{
return true;
}
}
// Performs a 'mysql_real_escape_string' on the entire array/string
function SecureData($data){
if(is_array($data)){
foreach($data as $key=>$val){
if(!is_array($data[$key])){
$data[$key] = mysql_real_escape_string($data[$key], $this->databaseLink);
}
}
}else{
$data = mysql_real_escape_string($data, $this->databaseLink);
}
return $data;
}
public function recordCount($query){
78
$this->ExecuteSQL($query);
return $this->records;
}
function ExecuteSQL($query){
$this->lastQuery = $query;
if($this->result = mysql_query($query, $this->databaseLink)){
$this->records = @mysql_num_rows($this->result);
$this->affected= @mysql_affected_rows($this->databaseLink);
if($this->records > 0){
$this->ArrayResults();
return $this->arrayedResult;
}else{
return true;
}
}else{
$this->lastError = mysql_error($this->databaseLink);
return false;
}
}
// Adds a record to the database based on the array key names
function Insert($vars, $table, $exclude = ''){
// Catch Exclusions
if($exclude == ''){
$exclude = array();
}
79
array_push($exclude, 'MAX_FILE_SIZE'); // Automatically exclude this one
// Prepare Variables
$vars = $this->SecureData($vars);
$query = "INSERT INTO `{$table}` SET ";
foreach($vars as $key=>$value){
if(in_array($key, $exclude)){
continue;
}
//$query .= '`' . $key . '` = "' . $value . '", ';
$query .= "`{$key}` = '{$value}', ";
}
$query = substr($query, 0, -2);
return $this->ExecuteSQL($query);
}
// Deletes a record from the database
function Delete($table, $where='', $limit='', $like=false){
$query = "DELETE FROM `{$table}` WHERE ";
if(is_array($where) && $where != ''){
// Prepare Variables
$where = $this->SecureData($where);
foreach($where as $key=>$value){
if($like){
//$query .= '`' . $key . '` LIKE "%' . $value . '%" AND ';
$query .= "`{$key}` LIKE '%{$value}%' AND ";
}else{
//$query .= '`' . $key . '` = "' . $value . '" AND ';
$query .= "`{$key}` = '{$value}' AND ";
} }
80
$query = substr($query, 0, -5);
}
if($limit != ''){
$query .= ' LIMIT ' . $limit;
} return $this->ExecuteSQL($query);
}
// Gets a single row from $from where $where is true
function Select($from, $where='', $orderBy='', $limit='', $like=false, $operand='AND',$cols='*'){
// Catch Exceptions
if(trim($from) == ''){
return false;
}
$query = "SELECT {$cols} FROM `{$from}` WHERE ";
if(is_array($where) && $where != ''){
// Prepare Variables
$where = $this->SecureData($where);
foreach($where as $key=>$value){
if($like){
//$query .= '`' . $key . '` LIKE "%' . $value . '%" ' . $operand . ' ';
$query .= "`{$key}` LIKE '%{$value}%' {$operand} ";
}else{
//$query .= '`' . $key . '` = "' . $value . '" ' . $operand . ' ';
$query .= "`{$key}` = '{$value}' {$operand} ";
} }
$query = substr($query, 0, -(strlen($operand)+2));
}else{
$query = substr($query, 0, -7);
}
if($orderBy != ''){
81
$query .= ' ORDER BY ' . $orderBy;
}
if($limit != ''){
$query .= ' LIMIT ' . $limit;
}
return $this->ExecuteSQL($query);
}
// Updates a record in the database based on WHERE
function Update($table, $set, $where, $exclude = ''){
// Catch Exceptions
if(trim($table) == '' || !is_array($set) || !is_array($where)){
return false;
}
if($exclude == ''){
$exclude = array();
}
array_push($exclude, 'MAX_FILE_SIZE'); // Automatically exclude this one
$set = $this->SecureData($set);
$where = $this->SecureData($where);
// SET
$query = "UPDATE `{$table}` SET ";
foreach($set as $key=>$value){
if(in_array($key, $exclude)){
continue;
82
}
$query .= "`{$key}` = '{$value}', ";
}
$query = substr($query, 0, -2);
// WHERE
$query .= ' WHERE ';
foreach($where as $key=>$value){
$query .= "`{$key}` = '{$value}' AND ";
}
$query = substr($query, 0, -5);
return $this->ExecuteSQL($query);
}
// 'Arrays' a single result
function ArrayResult(){
$this->arrayedResult = mysql_fetch_assoc($this->result) or die (mysql_error($this->databaseLink));
return $this->arrayedResult;
}
// 'Arrays' multiple result
function ArrayResults(){
if($this->records == 1){
return $this->ArrayResult();
}
83
$this->arrayedResult = array();
while ($data = mysql_fetch_assoc($this->result)){
$this->arrayedResult[] = $data;
}
return $this->arrayedResult;
}
// 'Arrays' multiple results with a key
function ArrayResultsWithKey($key='id'){
if(isset($this->arrayedResult)){
unset($this->arrayedResult);
}
$this->arrayedResult = array();
while($row = mysql_fetch_assoc($this->result)){
foreach($row as $theKey => $theValue){
$this->arrayedResult[$row[$key]][$theKey] = $theValue;
}
}
return $this->arrayedResult;
}
// Returns last insert ID
function LastInsertID(){
return mysql_insert_id();
}
// Closes the connections
function CloseConnection(){
if($this->databaseLink){
mysql_close($this->databaseLink);
84
}}}
?>
Header.inc.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>A DSS for Choosing Hotel Accomodation</title>
<script type='text/javascript' src='http://code.jquery.com/jquery-1.8.3.js'></script>
<link rel="stylesheet" type="text/css" href="/css/result-light.css">
<script type='text/javascript' src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css">
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div class="header_top">
<div class="center"><a href="steps.inc.php?action=welcome"><img src="img/logo.png" title="Home Page"/></a></div>
</div>
<div class="header_bottom">
<div class="center"><a href="steps.inc.php?action=welcome"><img src="img/site-name.png" title="Home Page"/></a></div>
</div>
</div>
<div id="content">
<div class="center">
85
<div class="steps_container">
<div class="steps_holder">
<a href="steps.inc.php?action=step1" class="steps <? if($_GET['action'] == "step1") echo "active";?>">1</a>
<a href="steps.inc.php?action=step2" class="steps <? if($_GET['action'] == "step2") echo "active";?>">2</a>
<a href="steps.inc.php?action=step3" class="steps <? if($_GET['action'] == "step3") echo "active";?>">3</a>
<a href="steps.inc.php?action=step4" class="steps <? if($_GET['action'] == "step4") echo "active";?>">4</a>
<a href="steps.inc.php?action=step5" class="steps <? if($_GET['action'] == "step5") echo "active";?>">5</a>
<a href="steps.inc.php?action=step6" class="steps <? if($_GET['action'] == "step6") echo "active";?>">6</a>
<a href="steps.inc.php?action=step7" class="steps <? if($_GET['action'] == "step7") echo "active";?> results">Results</a
></div>
</div>
<div class="clear"></div>
Functions.inc.php
<?php
require_once 'mysql.inc.php';
function normalizeMatrix($matrix)
{
$columnSums = array();
$i = 0;
foreach ($matrix as $array1) {
$i = 0;
foreach ($array1 as $v) {
if(isset($columnSums[$i])) $columnSums[$i] += $v;
else $columnSums[$i] = $v;
$i++;
}
86
}
$newArr = array();
foreach ($matrix as $array1) {
$aa = array();
$i = 0;
foreach ($array1 as $v) {
array_push($aa, $v/$columnSums[$i++]);
}
array_push($newArr, $aa);
}
return $newArr;
}
function getX($matrix)
{
$matrix = normalizeMatrix($matrix);
$x = array();
foreach ($matrix as $array1) {
array_push($x, array_sum($array1)/count($array1));
}
return $x;
}
function getAX($matrix)
{
$x = getX($matrix);
$ax = array();
$i = 0;
foreach ($matrix as $array1) {
$temp = 0;
87
foreach ($array1 as $v) {
$temp += $x[$i++] * $v;
}
$i = 0;
$ax[] = $temp;
}
return $ax;
}
function getLMax($matrix)
{
$x = getX($matrix);
$ax = getAX($matrix);
$sum = 0;
for($i = 0; $i < count($x); $i++)
{
$sum += $ax[$i]/$x[$i];
}
return $sum/count($x);
}
function getCI($matrix)
{
$lmax = getLMax($matrix);
return ($lmax - count($matrix))/(count($matrix) - 1);
}
function getCR($matrix)
{
88
if(count($matrix)<3) return 0;
$value = 0;
switch (count($matrix)) {
case 3:
$value = 0.58;
break;
case 4:
$value = 0.90;
break;
case 5:
$value = 1.12;
break;
case 6:
$value = 1.24;
break;
case 7:
$value = 1.32;
break;
case 8:
$value = 1.41;
break;
default:
$value = 0;
break;
}
return getCI($matrix)/$value;
}
function isConsistent($matrix)
89
{
if(getCR($matrix) < 0.1)
return true;
return false;
}
function isValidMatrix($matrix, $low, $high)
{
foreach ($matrix as $array1) {
if(count($array1) != count($matrix)) return false;
}
foreach ($matrix as $array1) {
foreach ($array1 as $value) {
if(($value > $high) || ($value <= $low)) return false;
}
}
return true;
}
function fraction($str) {
if (preg_match('#(\d+)/(\d+)#', $str, $m)) {
return $m[1] / $m[2];
}
return $str;
}
function generateForm($labels, $postFile, $stepVal=null)
{
include 'header.inc.php';
$tittle = "";
90
switch ($_GET['action']){
case "step1";
$tittle = "Compare Main Criteria";
break;
case "step2";
$tittle = "Compare Hotel Location Criteria";
break;
case "step3";
$tittle = "Compare Room Features Criteria";
break;
case "step4";
$tittle = "Compare Hotel Features Criteria";
break;
case "step6";
$tittle = "Compare Price Range Criteria";
break;
}
echo '<h1>'.$tittle.'</h1>
<div class="explanation">
Compare each criteria according to 1-9 scale.
</div>
<div class="clear"></div>';
if(!empty($_SESSION['error'])){
echo '<div class="error">';
echo $_SESSION['error'];
echo '</div>';
}
echo ' <div class="clear"></div>
<div class="help" id="help" style="display: none;">
91
Please rank the criteria according to your preferences and proof that you data is not contradictory. E.g. if A is more important than B and C is more important than B, then it is necessary for C to be more important than A, too.<br> NOTE: Please be sure that you enter only natural numbers n from 1 to 9 or 1/n for all cells.
</div>
<div class="clear"></div>'
. '<div class="container">';
echo "<form action=\"".$postFile."\" method=\"post\" id=\"form\" enctype=\"multipart/form-data\">
<table cellspacing=\"0\" cellpadding=\"0\">\n <thead>\n<td width=\"250\"> </td>";
for($j=1;$j <=count($labels);$j++)
{
echo "<td width='114'>".$labels[$j-1]."</td>\n";
}
echo "</thead>";
for($i=1;$i <=count($labels);$i++)
{
echo '<tr>
<td width="250" style="white-space: nowrap">'.$labels[$i-1].'</td>';
for($j=1;$j <=count($labels);$j++)
{
$class="";
$bClass = "";
if($i == $j) $class="class=\"crossed\"";
if($i > $j) $class="class=\"passive\"";
if($i < $j) $bClass ="class=\"active\"";
echo '<td width="114" '.$class.'><input type="text" name="mc'.$i.$j.'" '.$bClass.' id="mc'.$i.$j.'" value="'.$stepVal[$i-1][$j-1].'"/></td>';
}
echo "</tr>";
92
}
$pButton = "";
switch ($_GET['action']) {
case "step2":
$pButton = '<a class="button right" href="steps.inc.php?action=step1">< PREVIOUS STEP</a>';
break;
case "step3":
$pButton = '<a class="button right" href="steps.inc.php?action=step2">< PREVIOUS STEP</a>';
break;
case "step4":
$pButton = '<a class="button right" href="steps.inc.php?action=step3">< PREVIOUS STEP</a>';
break;
case "step5":
$pButton = '<a class="button right" href="steps.inc.php?action=step4">< PREVIOUS STEP</a>';
break;
case "step6":
$pButton = '<a class="button right" href="steps.inc.php?action=step5">< PREVIOUS STEP</a>';
break;
case "step7":
$pButton = '<a class="button right" href="steps.inc.php?action=step6">< PREVIOUS STEP</a>';
break;
default:
break;
}
echo ' </table>
</form>
<div class="ratebox">
93
<div class="number_container">
<a>1/9</a><a>1/8</a><a>1/7</a><a>1/6</a><a>1/5</a><a>1/4</a><a>1/3</a><a>1/2</a>
<a class="middle">1</a><a>2</a><a>3</a><a>4</a><a>5</a><a>6</a><a>7</a><a>8</a><a>9</a>
</div>
<div class="less">Absolutely<br />Less Important</div>
<div class="equal">Equal</div>
<div class="more">Absolutely<br />More Important</div>
</div>
<div class="navigation">
<a class="button right" href="#" onclick="document.getElementById(\'form\').submit();">NEXT STEP ></a>
'.$pButton.'
<a class="button left" href="#" id="helpButton">HELP</a>
<a class="button left" href="#" id="resetButton">RESET VALUES</a></div>
</div> <!-- container -->';
include 'footer.inc.php';
}
function getTotal($row) {
$mysql = new MySQL();
$ee = $mysql->ExecuteSQL("Select SUM(`".$row."`) as total from `hotel`");
return $ee['total'];
}
function getResults($pVectors) {
$mysql = new MySQL();
$ee = $mysql->ExecuteSQL("Select * from `hotel` where `priceRange` <= '".$pVectors['step5']."'");
94
$result = array();
foreach ($ee as $hotel) {
$lScore = 0;
$rScore = 0;
$hScore = 0;
$pScore = 0;
$tScore = 0;
foreach ($hotel as $key => $value) {
if($key == "priceRange" && $value > $pVectors['step5']) continue;
if($key == "cToMP") $lScore += ((1-($value/getTotal("cToMP")))*$pVectors['step2'][0])/5;
if($key == "cToGP") $lScore += ((1-($value/getTotal("cToGP")))*$pVectors['step2'][1])/5;
if($key == "cToRS") $lScore += ((1-($value/getTotal("cToRS")))*$pVectors['step2'][2])/5;
if($key == "cToZA") $lScore += ((1-($value/getTotal("cToZA")))*$pVectors['step2'][3])/5;
if($key == "cToBCH") $lScore += ((1-($value/getTotal("cToBCH")))*$pVectors['step2'][4])/5;
if($key == "airConditioner") $rScore += $value*$pVectors['step3'][0]/6;
if($key == "extraBedAvailability") $rScore += $value*$pVectors['step3'][1]/6;
if($key == "tv") $rScore += $value*$pVectors['step3'][2]/6;
if($key == "phone") $rScore += $value*$pVectors['step3'][3]/6;
if($key == "minibar") $rScore += $value*$pVectors['step3'][4]/6;
if($key == "cityView") $rScore += $value*$pVectors['step3'][5]/6;
if($key == "wifi") $hScore += $value*$pVectors['step4'][0]/7;
if($key == "parking") $hScore += $value*$pVectors['step4'][1]/7;
95
if($key == "gym") $hScore += $value*$pVectors['step4'][2]/7;
if($key == "loundry") $hScore += $value*$pVectors['step4'][3]/7;
if($key == "reception24hour") $hScore += $value*$pVectors['step4'][4]/7;
if($key == "sauna") $hScore += $value*$pVectors['step4'][5]/7;
if($key == "pastCustomerSatisfaction") $hScore += $value*$pVectors['step4'][6]/7;
if($key == "priceRange" && $pVectors['step6'] != null) $pScore += $pVectors['step6'][$value - 1];
}
$lScore *= $pVectors['step1'][0];
$rScore *= $pVectors['step1'][1];
$hScore *= $pVectors['step1'][2];
$pScore *= $pVectors['step1'][3];
$tScore = $lScore + $rScore + $hScore + $pScore;
$temp = array('lScore' => $lScore, 'rScore' => $rScore, 'hScore' => $hScore, 'pScore' => $pScore, 'tScore' => $tScore);
array_push($temp, $hotel);
$result[] = $temp;
}
$total = array();
foreach ($result as $key => $row)
{
$total[$key] = $row['tScore'];
}
array_multisort($total, SORT_DESC, $result);
return array_slice($result, 0, 5);
//print_r($pVectors);
96
}
function getLocationText($p) {
switch ($p) {
case 1:
return "0-300M";
break;
case 2:
return "300-600M";
break;
case 3:
return "600-900M";
break;
case 4:
return "900-1200M";
break;
case 5:
return "1200-1500M";
break;
case 6:
return "1500-1800M";
break;
case 7:
return "1800-2100M";
break;
case 8:
return "Longer than 2100";
break;
default:
break;
}
97
}
function getPriceText($p) {
switch ($p) {
case 1:
return "0-40€";
break;
case 2:
return "40-80€";
break;
case 3:
return "80-120€";
break;
case 4:
return "120-160€";
break;
case 5:
return "160-200€";
break;
case 6:
return "200-240€";
break;
case 7:
return "240€ Above<";
break;
default:
break;
} }
?>
Footer.inc.php
98
</div>
<script type="text/javascript">
$(function () {
// User is informed if the field is editable
$('input[type=text].active').bind('mouseenter', function () {
$t = $(this).val();
if ( !$(this).hasClass('selected') ) $(this).val("click to rate");
}).bind('mouseleave', function () {
if ( !$(this).hasClass('selected') ) $(this).val($t);
}).bind('click', function () {
$('input[type=text].selected').removeClass('selected');
$(this).val($t)
$(this).addClass('selected');
$('.ratebox').css('display','block');
$('.ratebox').css('left', $(this).position().left - 150);
$('.ratebox').css('top', $(this).position().top + 41);
event.stopPropagation();
});
// User selects a point for the rating
$('.ratebox a').click(function() {
$('.selected').val($(this).text());
var currentId = $('.selected').attr('id');
if(currentId == "mc12"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc21').val(tmpArr[1]);
}else{
99
$('#mc21').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc21').val("");
if(tmp == 1) $('#mc21').val("1");
}
if(currentId == "mc13"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc31').val(tmpArr[1]);
}else{
$('#mc31').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc31').val("");
if(tmp == 1) $('#mc31').val("1");
}
if(currentId == "mc14"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc41').val(tmpArr[1]);
}else{
$('#mc41').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc41').val("");
if(tmp == 1) $('#mc41').val("1");
}
if(currentId == "mc15"){
var tmp = $(this).text();
100
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc51').val(tmpArr[1]);
}else{
$('#mc51').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc51').val("");
if(tmp == 1) $('#mc51').val("1");
}
if(currentId == "mc16"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc61').val(tmpArr[1]);
}else{
$('#mc61').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc61').val("");
if(tmp == 1) $('#mc61').val("1");
}
if(currentId == "mc17"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc71').val(tmpArr[1]);
}else{
$('#mc71').val("1/" + tmp);
}
101
if(tmp.length == 0) $('#mc71').val("");
if(tmp == 1) $('#mc71').val("1");
}
if(currentId == "mc23"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc32').val(tmpArr[1]);
}else{
$('#mc32').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc32').val("");
if(tmp == 1) $('#mc32').val("1");
}
if(currentId == "mc24"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc42').val(tmpArr[1]);
}else{
$('#mc42').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc42').val("");
if(tmp == 1) $('#mc42').val("1");
}
if(currentId == "mc25"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
102
var tmpArr = tmp.split("/");
$('#mc52').val(tmpArr[1]);
}else{
$('#mc52').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc52').val("");
if(tmp == 1) $('#mc52').val("1");
}
if(currentId == "mc26"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc62').val(tmpArr[1]);
}else{
$('#mc62').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc62').val("");
if(tmp == 1) $('#mc62').val("1");
}
if(currentId == "mc27"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc72').val(tmpArr[1]);
}else{
$('#mc72').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc72').val("");
if(tmp == 1) $('#mc72').val("1");
103
}
if(currentId == "mc34"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc43').val(tmpArr[1]);
}else{
$('#mc43').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc43').val("");
if(tmp == 1) $('#mc43').val("1");
}
if(currentId == "mc35"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc53').val(tmpArr[1]);
}else{
$('#mc53').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc53').val("");
if(tmp == 1) $('#mc53').val("1");
}
if(currentId == "mc36"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc63').val(tmpArr[1]);
104
}else{
$('#mc63').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc63').val("");
if(tmp == 1) $('#mc63').val("1");
}
if(currentId == "mc37"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc73').val(tmpArr[1]);
}else{
$('#mc73').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc73').val("");
if(tmp == 1) $('#mc73').val("1");
}
if(currentId == "mc45"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc54').val(tmpArr[1]);
}else{
$('#mc54').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc54').val("");
if(tmp == 1) $('#mc54').val("1");
}
if(currentId == "mc46"){
105
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc64').val(tmpArr[1]);
}else{
$('#mc64').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc64').val("");
if(tmp == 1) $('#mc64').val("1");
}
if(currentId == "mc47"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc74').val(tmpArr[1]);
}else{
$('#mc74').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc74').val("");
if(tmp == 1) $('#mc74').val("1");
}
if(currentId == "mc56"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc65').val(tmpArr[1]);
}else{
$('#mc65').val("1/" + tmp);
106
}
if(tmp.length == 0) $('#mc65').val("");
if(tmp == 1) $('#mc65').val("1");
}
if(currentId == "mc57"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc75').val(tmpArr[1]);
}else{
$('#mc75').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc75').val("");
if(tmp == 1) $('#mc75').val("1");
}
if(currentId == "mc67"){
var tmp = $(this).text();
if(tmp.indexOf("/") >= 0)
{
var tmpArr = tmp.split("/");
$('#mc76').val(tmpArr[1]);
}else{
$('#mc76').val("1/" + tmp);
}
if(tmp.length == 0) $('#mc76').val("");
if(tmp == 1) $('#mc76').val("1");
}
// inputlara veri girme işi buraya eklenecek
107
event.stopPropagation();
$('.ratebox').css('display','none');
$('input[type=text].selected').removeClass('selected');
});
// Rating window closes if the user clicks somewhere else
$('html').click(function() {
if ( $('.ratebox').css('display') == 'block' )
{
$('.ratebox').css('display','none');
$('input[type=text].selected').removeClass('selected');
}
});
$('#mc11').val("1");
$('#mc22').val("1");
$('#mc33').val("1");
$('#mc44').val("1");
$('#mc55').val("1");
$('#mc66').val("1");
$('#mc77').val("1");
$("input[type=text]").attr("readonly",true);
$( "#helpButton" ).click(function() {
$( "#help" ).toggle( "slow", function() {
// Animation complete.
});
});
$( "#resetButton" ).click(function() {
$('input[type=text]').val("");
108
$('#mc11').val("1");
$('#mc22').val("1");
$('#mc33').val("1");
$('#mc44').val("1");
$('#mc55').val("1");
$('#mc66').val("1");
$('#mc77').val("1");
});
$( "#storlekslider" ).slider({
range: "max",
min: 1,
max: 7,
value: <? if(!empty($_SESSION['step5'])) echo $_SESSION['step5']; else echo 4; ?>,
slide: function( event, ui ) {
$( "#storlek_testet" ).val( ui.value );
if(ui.value == 1)
{
$( "#maxRange" ).val( "40 Euro" );
$( "#warning" ).show( "slow", function() {
// Animation complete.
});
}
if(ui.value == 2)
{
$( "#maxRange" ).val( "80 Euro" );
}
if(ui.value == 3)
{
109
$( "#maxRange" ).val( "120 Euro" );
}
if(ui.value == 4)
{
$( "#maxRange" ).val( "160 Euro" );
}
if(ui.value == 5)
{
$( "#maxRange" ).val( "200 Euro" );
}
if(ui.value == 6)
{
$( "#maxRange" ).val( "240 Euro" );
}
if(ui.value == 7)
{
$( "#maxRange" ).val( "All Prices" );
}
$(ui.value).val($('#storlek_testet').val());
}
});
$( "#storlek_testet" ).val( $( "#storlekslider" ).slider( "value" ) );
})
</script>
<div class="clear"></div>
<!-- Site footer -->
110
<div id="footer">
<div class="center">
<div class="b1">
A DSS for Choosing Hotel Accomodation in Brussels<br />
<span class="grey">All Rights Reserved</span>
</div>
<div class="b2">
MIS463 Course Project. Team 11.
</div>
</div>
</div>
</body>
</html>
111