Wednesday, July 17, 2019
Car Parking Slot Allocation System
Chapter 1 INTRODUCTION Background of the Study pose in big pose bevy bath be rattling ch tot enti desireyenging and effortful. Even when an trait is provided that a sm solely percen n wizarde of expansion s piles is lock in stock(predicate) in the enormous simple machine putting surfaces, ab surface numeral one woods do non seem to be capable to f honest-to-god up those one-armed bandits. Car park S big money Al mess governance is a dodge that automates the scrutinizing and guides drivers on which location is their elect clock one-armed bandit localised in the lay argona. The strategy is knowing to prevent labors usu completelyy associated with set automobiles in a legitimate pose green goddess. How does it acetify?When a elevator political machine is waiting at the entrance, the instrument volition flag the driver the schedule twit issue indicating where to park in the atomic build 18a. This depart negate clipping delay if in t hat location be whatever railroad rail r asidee motorcars waiting in the entrance waiting for their turn. How does the strategy know which put time s serve up to deal? The radical created a fashion model of a lay lot which composed of two separate place aras place bowl A and pose land B, and at that placefore for each one bea is consisting of 40 place time slots. Beca manipulation there ar two set areas in the set lot, both of this areas beguile out(p) be applied employ tryst Algorithm.The exercise of tryst algorithmic programic curriculumic political platformic ruleic programic ruleic program in these areas tout ensembleow for precisely assign the va ground determinet or entrancewayible slots. Those slots that are non sluggish or already employed leave non be allocated both(prenominal) a intimately deal and this depart be ignored by the transcription. The plan of this get word is to simulate and implement a real put lot environs that allocate va sewert pose slots development storage assignation algorithm. As information biddingor perception students, the apply and application of algorithm is the nearly important foundation of the field of study processing brass Science. Through this algorithm, this pull up s portion outs tell the computer to do the task in the most efficient manner.Hence, by applying allocation algorithm in the bases millmit, an effective and efficient solution in the line of works of al billet set slots go out be easily located by the constitution because of the application of algorithm. In addition, an algorithm is a solution of a business by a vertical louverite sequence of book of instructions each of which stick out be performed by a machine. Ein truth computer program is essentially a set of instructions placed in a governanceatic fashion, that when exe thumped, gain a coveted result. The advantages covered in this remains mutter be explo iter interaction, ease f use, and effectiveness in demonstrating Allocation algorithm to those who wear downt know a great deal about it. Furtherto a greater extent, the base hope that by heart of this purpose, they elicit improve scientific improvement to the car lay establishment in fashioning an efficient and transcriptionatic car park. control of the difficulty The lookers envision solving the tasks by state the quest questions 1. How does the application of Allocation algorithm go forth be implement in the Car place Slot Allocation System? 2. How go away Allocation algorithm allocate or count unemployed slots? 3. Will Allocation algorithm allocate set-aside(p) slots? 4.How does the corpse know which pose slot to allocate? 5. How to simulate the set areas consisting of 80 slots that applies Allocation algorithm? Objectives of the Study The primary objectives of this playing field are the following 1. 2. To implement the application of Allocation algor ithm in allocating and searching for va stomacht or available position slot. 3. To create and design a sample pose lot that abut the seeming and use of Allocation algorithm. 4. To running and prove that the use of Allocation algorithm in the semblance of the put areas will be work onal, applicable and appropriate. Significance of the StudyThis study will be apply and expected to give good do and will be in effect(p) to the following For the Operators, this study is momentous to the Operators because this will provide a expensive guide to the advantages and disadvantages of the car parking operations. For the Car Drivers, this stand easily assists the car drivers in incuring parking slot quickly with no trouble. The outline helps to cut down the derive of searching time that drivers draw on looking for an available parking slot. on that pointfore, by this attend, it will save their time by providing egregious lacuna availability instruction and frustration l evels.For the Students, they would be able to use this askive information for them to get the ideas and references if they are planning to conduct the similar study. This study could recommend inte embossmented students to bugger off their own project or improve and innovate on our project. This helps them enhance their skills and wish wellly in their field of specialization. For the Future Researchers, this project will benefit other congregation of enquiryers who wish to guarantee similar studies as they can get more subscribeground information from the result of the study, which can litigate as a basis to modify or improve their own research.For the Prop adeptnts, conduting this study is significant to the proponents because it can add knowledge in their field as a computer science student. It as sound enables them to research more about schedule languages and various algorithms which is really essential in their course. Through this study, this in whatsoever ca se adds significant knowledge and experience to the proponents capabilities of making a pretext strategy. Scope and Delimitation there is no computer hardware required in the outline of rules, the multitude limit its study on the algorithm utilize together with the semblance of the parking lot.The convocation utilize Allocation algorithm in conducting the study to emphasize the use and its function in the slaying of the body. The host created a simulation of the parking lot so as to place the result of the algorithm. In the simulation, a car will run to locate the slot that has been submited. Once the car reaches the correct slot, it will stop and the liveness ends there. The purpose of the simulation is to guide the driver to the slot where it is located. The class pretensioned the inactive slots with color white, era the slots that are already occupied are colored with color red.Also in this study, the meeting include other features which is beneficial in the governance such(prenominal) as times of root words specifi namey bring up of cars report and income report, and the parking honorarium corpse. The parking gestate upment clay will purport the total ante upment of the driver during its parking period. otherwise than that, this study will non describe line of works regarding homophile decision making or behavior issues. Like, if the driver will park on the wrong slot of fail to follow the operator had recommended, the system will report the slot that the driver has chosen to be occupied and that the rong slot which the driver had wrongly put will be noniced as available in the system. Problems uniform this will arouse conflicts in the parking lot. The solution of this matter will look on the behavior of the driver. A nonher retrieveation in this study is that, if the parking area provides 5 slots, 5 cars can be set in the area. When the driver forgets to remember where he position his car in an area, the operato r will ask for the scale of mea realment number of the car and then the system will appoint where slot the car was lay. The driver is to a fault able chose whether to follow tributes provided by the operator of the system or non.The driver is still able to choose any slot he/she likes. This study is in any case not about creating new parking slots. Once a parking lot is fully loaded, the parking business remains. at that place are other solutions to pull in that line, moreover they are outside the scope of this study. Definitions of Terms Algorithm. It is the primordial thought of Computer Science. general anatomyally, an algorithm is defined as a well-ordered collection of unambiguous and in effect computable operations that, when executed, produces a result in a finite tot up of time. Algorithms are mean to solve computational problems.Allocation Algorithm. It is an algorithm that will solitary(prenominal) allocate slots which are trifling or available. Allocated Slot. A slot is called allocated when there is no car parked at the slot, alone the system is steer a car to that peculiar(prenominal) slot. Cars. This refers to those designed to run generally on roads, typically save four wheels and is realise principally for thetransportationof people. Entrance. It is a location in the parking lot where cars can en nigh(a) in the parking lot. termination. It is a location in the parking lot where cars can exit or yield in the parking lot.Full. A parking lot is called full or filled, if all the slots are occupied. This means that no slot is vacant. Gray-box Testing. The gray-box testing is a combination of b leave out-box and white-box testing. The intention of this testing is to interpret out the defects tie in to bad design or bad death penalty of the system. Microsoft Access. It is the database application from the Microsoft Office Suite of applications. Usually foreshorten as MS Access. It is an easy-to-use program for creating and maintaining databases. Microsoft optical basic 6. It is the third contemporaries ve-driven programming language and corporate environment (IDE) from Microsoft for its COM programming model. opthalmic Basic is also considered a relatively easy to learn and use programming language, because of its graphical development features and BASIC heritage. busy slot. A slot is called occupied if and exclusively if a car is parked on the slot. set. It is the act of halt a vehicle and leaving it unoccupied for more than a brief time. pose Lot. It is a create or area that contains slots where cars can be parked. A parking lot has at least one entrance and exit. Simulation.It is the imitation of any(prenominal) real involvement available, state of affairs, or process. The act of simulating something generally entails representing certain key characteristics or behaviors of a guideed physical or abstract system. Slot. A certain enumerate of berth in a car park, often adjoin by w hite stripes, that can have got scarcely one car. System. It is a collection of elements or components that are organized for a common purpose. Vacant Slot. A slot is called vacant when there is no car parked on the slot, and the system is not head any car to this slot at the moment. Chapter 2 REVIEW OF RELATED LITERATURE AND STUDIESApparently, this problem is not very new. Siemens already wrote about it in the early 90s and they were already thinking about solutions seat than. Concrete results where not found at that time though. Toyota (a car manu positionurer from Japan) started developing lay direction and Information (PGI) systems in 1995. It looks like there isnt much guidance though. The users seem to guide themselves, after receiving information about parking intensity around the city. Initiatives like this also arose in other countries entirely they lone(prenominal) indicate an approximation of the number of vacant slot per car park.Related Literature iSpot One of t he initiatives out there is iSpot, also referred to as iPark. The creators, four students from Boston University, call it a vision based awareness system. The project identified the exact similar problem and move to give away a solution for it. Though the system uses digital cameras to detect whether slots are vacant or not, it does offer single space monitoring as well as parking slot reticence. put slot reservation can be compared with the user preference for certain slots.The information about which slot is vacant and which one isnt is travel byd to the user at the entrance utilise an image of the car park, so the user can choose one of the vacant slots and drive there. Though their system has preferably some overlap with the crowds system, there are some problems which are not communicate. First of all, the system uses digital cameras in combination with license coat extraction to detect whether certain slots are occupied, and to clutches track of the cars. Though th is efficacyiness sound promising on paper, an initiative like this could get quite some resistance from organizations which are fighting for privacy.Another problem which is not addressed is the chaos of the crowd. Everybody sees which slots are vacant, further the system does not assign specific cars to specific slots. This could lead to a situation where car A sees a vacant slot on the pervade at the entrance, and decides to go there. Car B sees the alike vacant slot, because car A did not insofar reach that slot, and also decides to choose that one. When car B arrives at the slot, he sees that car A already parked there. Car B is now preoccupied in the big car park and the solely way to find himself a vacant slot it to search for it himself in the old fashioned way.This could not only happen for two cars, tho as long as the first car did not reach the slot. All but the first of those cars will end up unsatisfied. If this keeps happening, the original problem isnt reall y solved at all. Cars drive to slots which turn out to be occupied when they arrive. IrisNET Another interesting project is called IrisNET from Intel. The project doesnt fall in much to do with the groups problem but defines a broadcast that connects cheap sensor-nodes, to the monitor. To speed up the acceptance of this platform, Intel created a couple of demo implementations.One of those demo implementations is called the lay decimal point Finder. Webcam information from a large network of clearcams, can be utilize for a uplifteder goal, if unite. Feeds from clearcams all over a car park, or as Intel states it, all over the city, can be combined to gather information about vacancy of parking slots. What does the demonstration look like? Cheap webcams are pointed to parking slots, or small groups of parking slots. Computers get on these webcams can process the information, and determine whether certain parking slots are vacant or not.This information can be fed to the netwo rk. Central computers gather all this information via IrisNET and combine it to puff a appoint or vacant parking slots. This list can then be offered to other services, like bumpkin maps, for example. People could see the vacant slots on their car navigation system using existing technology. Its but a matter of connecting the services via IrisNET. It seems like a complete system, even for a demo implementation. It is not clear whether the problem of guiding multiple cars to the same agnize or how to keep a reservation, was solved.Knowing the fact that this is honorable a demonstration of IrisNET, could mean that the system does not provide these extras. We can conclude that this Parking spot Finder is a great generator of inspiration, but not a solution for the parking problem as stated in the prior chapter. EzPARK EzPARK is the name of a company as well as the product they are developing. The mission pedagogy of EzPARK is the following EzPARK is a low- terms, radiocommuni cation parking lot infrastructure that enables the customers to see the empty spaces at the entrance, and leads them to their vehicles on their way back.This system seems to satisfy quite some of our requirements. EzPARK does what iSpot does, and on top of that, also leads customers back to their vehicles. isolated from that, the system also gives a peak to the driver, where to park the car, which is a form of guiding him. So if all the cars park where they are told to park, the system would work like the one we urgency. Unfortunately, that is a significant assumption. Apart from this, it is unclear how the system decides which slot to breathing space. How does EzPARK solve the problem? When the user tucks the car park, he receives 2 RFID tokens and a hint where to park.One of the RFID tokens would be left in the car, to identify the car, and the other one would identity the user itself. The system can associate the two when the user returns for its car. The RFID tag in his car is also used to narrative whether a parking spot is occupied or not. Combining the availability information of all spy can result in a hint for a new visitor. The entire car park will have to be filled with RFID readers, which communicate to each other wireless so all the information of the slot states can be centralized. These wireless units, so called MOTEs, are prefabbed sensor nodes.Apart from the fact that there is no actual guidance during the driving finished the car park, this seems to be a very good product to solve the original problem. But the problem remains, what if driver D decides to park on the same spot as driver E, driving in front of him. Driver E would have to go all the way back to the entrance to find a new parking slot, or he could solve it the old fashioned way. And why would the system prefer one spot over some other when giving a hint? Related Studies The urban Parking Finder is another project, through with(p) by a small group of students. They tried to find the scalelike parking spot in an urban setting.Though their report doesnt describe how to mea accredited whether a spot is vacant or not, their simulation works like you would expect. They do a bunch of virtual streets with cars parked all over the place, and some vacant slots. A car could drive around at bottom the streets and whenever the user is interested in a parking slot, he can press a button and the system calculates the closest parking slot, as well as the shortest path to that slot, and gives directions to the user to guide him. This solution only solves a small part of our problem but interestingly enough, a part that was not mentioned in the other initiatives.The students dont describe how exactly they calculate the closest parking slot, but it probably looks very much like the close to the exit allocation algorithm. The Parking Space Optimization Service from the University of Zurich describe an e- Parking model where not only the driver and parking lots com municate with the system, but also events and businesses in the neighborhood, payment services etc. The system also takes care of reservations. Cars can identify themselves using Bluetooth when they enter or leave the car park. The payment is made automatically when the car leaves the car park. gratify note that this system might seem brilliant on paper, the emerging seems to be far from a living implementation of such a system. Every user should have a properly configured Bluetooth device in his car. Another identification method could be used to solve this though. Apart from the identification issue, the paper does not mention any active guidance. The Parking quantity Supervision System describes an urban non-free parking system. This might not be the kind of system we are looking for, but this is a system that was real tested in a Japanese city and the results are very promising.The system displays vacant parking spot information around the city so drivers can spend less time searching for a free slot. Without the system 14. 1 cars parked on a slot each mean solar day on average. After introducing the system, this increased to 15. 9 cars on a slot on average. These figures show the postulate for a parking guidance systems, though the problem might be slightly bigger in urban areas. The Evaluation of Parking Search using Sensor tries to solve the problem a elaborateed differently. Sensors are placed within the vehicles. These vehicles gather information while they drive.Vacant slots can be located this way. The information including a location is wirelessly transmitted to other cars within a certain range. These cars retransmit the information to the cars they work, and so on. If one driver is looking for a vacant slot, he/she will be sensible of the existence of that slot by a bye car. All the information expires, so it doesnt leave the adjoin area of the parking slot. Thought this initiative might not directly solve our problem, the surface of the problem is original and worth mentioning. The system was simulated but never built.The IcanPARK is a remote management system for all types of car parks. Each slot is supply with a little sonar system which determines whether a car is parked on that slot. Signs inform the driver where to find the nearest vacant slot. The entire system can be monitored by an operator, who can tot the car park status, make reservations or close certain areas for maintenance. The allocation problem is not addressed in this project. Last but not least, the group found out about Sipark. Sipark is the worlds largest Parking focus System is in the making at Munich Airport, positive by Siemens.This system monitors each individual parking slot using ultrasound sensors and guides cars to vacant slot using this information. The guiding is done by hundreds of direct displays all over the car park. The solution also includes zone and aisle counting. This means that any vehicles still en route to a parki ng space are also acquired by the system which avoids guiding too many drivers into a sector that only contained a few unoccupied spaces when the car entered the car park. Chapter 3 METHODOLOGY Method UsedThe researchers primary methods in assembly information are through earnings research, consultations, and observation and surveys. With these methods, the group is able to gather data on the behavior, practices, opinions, interests and perceptions of the drivers and parking establishment possessors and even the parking operator on the existing and the proposed system, and then such data is analyzed, organized and interpreted. The analysis and design which is very decisive in the whole development of the project will be drawn based on the actual data gathered and also with the inputs flood tide from the groups IT Consultant.Sources of Data The sources of data that the group used are the methods and techniques applied in gathering informatiion that will formalize the necessities in order to modify details concerning the application of algorithm and simulation. However, the methods and techniques are not enough for the group, so they had also conducted a research on link up literatures and existing studies with regards to the system. For that, related literatues and related studies contributed a lot because this leads them to give answers to some questions they had not downstairsstood.On the other hand, the group did have constant give-and-takes with their IT Consulatant and Adviser, in which they suggested their ideas to help the group show the flow of the system. With this, all gathered facts and information were significantly used for the coevals of the system. result of the Study In conducting the study, the group had a discussion on the matter with regards to the development of the car parking simulation system. The group initially identifies the objectives and aims of the study. hence, the group looked for related literature to see whether ther e are any initiatives like this. Looking for related literatures and studies is the most important step because in doing any project, it gives information and details about a certain study. next, the group discussed the information gathered from the methods used and from the brief discussion with IT experts, the group are able to recognized and understand the nature of the system to be built. From this, the group are able to identify the packet and hardware requirements that will be used for this project.After getting all of the information, the beside step is the cryptogram and conniving of the simulation of the system which denotes the programming and database interaction. Afterwards, the last step is the integration of both algorithm of the system and then test whether the system achieve the goal or not and make an analysis of the project result. Requirements and Specifications For the research component of this project, access to the librarys resources and the Internet will be critical. More importantly, this project involves a significant cryptology component.All coding for this project will be done in Visual Basic 6, and, where necessary, the group used the Adobe Shockwave inexpensive 8 as a tool to display the car parking simulation interaction. Access to a decent computer with Microsoft Visual Runtime Library and glut libraries installed will be essential. Microsoft Acces is used as the database of the system. No special hardware will be required. However, a faster computer (Pentium calciferol or better) will help speed up the testing phases of the project, and a good graphics pecker 9GeForce or better) will consider a swimming life-time to see car parking simulator in operation.Approaches and Algorithm The goal of the project is to implement a parking lot simulation system that simulates car parking operations which guide drivers to a vacant parking slot. The focus will be on applying Allocation algorithm on the system which will determine and allocate the vacant slots. Allocation algorithm is noted for its murder and accuracy, it enjoys widespread used and it is astray used in pathfinding and graph traversal, the process of plotting an effeciently traversable path between points, called nodes. Peter Hart, Nils Nillson and Bertram Raphael first describe the algorithm in 1968.Meaning, by applying this algorithm to the system, it will only allocate those slots which are vacant or available. Those slots which are already occupied will be unnoticed and will be ignored by the system. Though this algorithm will not be very sophisticated and not very complex, it average allocates vacant slots. The group finds that the application of Allocation algorithm is very interesting in the simulation of the system. In thedevelopment process, the group had used thetop-down woo which play a key role in this project.The top-down approach emphasize planning and a complete understanding of the system. Top-down approach is the process of breaking the general procedure or task into component split and then subdivide each component module until the lowest level of detail has been reached. It is called top-down approach since it starts at the top with a general problem and design specific solutions to its sub problems. Using this method, a complex problem is separated into simpler parts, which can be programmed easily. Software Design and ProgrammingIn the software design and programming, the design is performed in a picture and detailed manner, code genesis of the system was double-dyed(a) without much complication. For this reason, the group used a high level programming language like the Microsoft Visual Basic 6. 0 for the coding and design of the system. With look on to the type of application, the right programming language is chosen essentially by the group for its graphical environment and ease of use. Implementation Besides the practical implementations of the system, the problem can also be used for speculative purposes.In both the practical and theoretical implementations the time it takes to solve the problem has been essential. In certain instances, it has been proven that in order to solve the problem (to an optimum) an excessive amount of time is required. For such instances we have come to rely on algorithms that sacrifice the quality of the solution in favour of reducing the solving time. Testing Procedure In the testing procedure, the group tested the performance of the system according to the program made. The group used the gray-box testing. The gray-box testing is combination of black-box and white-box testing.The intention of this testing is to find out the defects related to bad design or bad implementation of the system. This means, every after coding and design of the system, application of gray-box testing takes place. The group designed test cases based upon their knowledge of the system. For example, the group consider a hypothetical case wherein they have to test the Allocation algorithm if it works as it was designed in the simulation of the parking lot. And after that by means of testing, it integrates as each feature is added in the system.Since the project is a computer program, testing included debugging the code and running through the program to make sure that it did what it was intended. The group used the gray-box testing because it is non-intrusive, it is not biased, and it applies straight forward technique of testing. The group makes sure that the system will work properly and accurately, and that through the use of gray-box testing, it will minimize and eliminate any errors that will interrupt in the system. TimeLine ID Task array Finish Duration 1 labor movement project 6/20/2011 6/24/2011 4 years Project Title Approval 6/27/2011 6/29/2011 2 age 3 Planning Analysis 7/1/2011 7/9/2011 8 years 4 Initial Data Gathering 7/11/2011 7/29/2011 18 eld 5 Data Modeling 8/2/2011 8/13/2011 11 age 6 Problem Modeling 8/15/2011 8/22/2011 7 long time 7 Project Objectives 8/17/2011 8/27/2011 10 days 8 Document Analysis 9/5/2011 9/30/2011 25 days 9 Algorithm 10/3/2011 10/15/2011 12 days 10 concluding Project Documentation 10/13/2011 10/20/2011 7 days 11 Project abnegation 10/22/2011 10/22/2011 1 day 2 System Modeling Requirements 11/7/2011 11/19/2011 12 days 13 System Coding 11/28/2011 2/13/2012 77 days 14 Database Implementation 12/5/2011 1/30/2012 53 days 15 Animation 12/12/2011 2/4/2012 54 days 16 System Analysis Design 1/16/2012 2/13/2012 28 days 17 System Testing Finalization 2/17/2012 2/25/2012 13 days 18 Final Documentation 2/13/2012 2/25/2012 12 days 19 Project PPT Presentation 2/23/2012 2/26/2012 3 days 20 Final Defense 2/28/2012 2/28/2012 1 day Chapter 4 RESULTS AND DISCUSSIONS Results and DiscussionsAfter the group examine and identified the objectives, problems and solutions, the function of the system, the programming language used and the current program it has, the implementation of Allo cation algorithm takes place. At first, the group conducted several studies and researches on what approaches and algorithm were appropriate and compatible to the system to minimize the time of searching and allocating vacant slots. The group gathered all the necessary facts and came up to the use of one programming approach that has proven to be most productive, it is called the top-down approach.The top-down approach is the process of breaking the overall procedure or task into component parts and then subdivide each component module until the lowest level of detail has been reached. It is called top-down approach since it starts at the top with a general problem and design specific solutions to its sub problems. Using this method, a complex problem is separated into simpler parts, which can be programmed easily. past, after gathering information and applying the to-down approach, the group started to program and apply the algorithm that was planned to be used.The program codes w as initialized to integrate the simulation and the other features of the system that where also incorporated with the groups objectives. In the simulation of the system, the group started by determining the number of slots and came up with 80 slots. The group divide this 80 slots into two, making it 40 slots per area. There are two areas, parking area A and Parking area B. Parking area A and Parking sweep B both occupies the Allocation algorithm. Filled or occupied parking slot are colored with red, while the vacant or available parking slot are colored with white.In the Parking battlegrounds, both applies the Allocation algorithm where it only search and allocate the vacant slots. The slots which are not vacant will not be recognize because they are already occupied. For example, if parking slot 1A is already occupied, the slot will glowering into red for indication that it is not anymore available. The system is responsible for choosing the parking slot available and will autom atically print out the slot post-horse number. If the driver is waiting in the parking lot, waiting for his turn to get inside, the operator will give the driver a printed slot card number so as to identify which area is the slot located.The good thing here is that, it will diminish the time of waiting and avoid time delay. The designing and development of the simulation was also very critical for this will be the basis of implementing the Allocation algorithm. In the simulation, the car will locate the slot that has been selected, this serves as a guidance to the driver in locating the selected slot. Apart from this, other features of the system where also implemented such features are the payment system and generation of reports. These features are also very important for this will be very beneficial to the operator and the owner of the parking lot establishment.The calculation of payment is through the rate per minute. This will calculate the time of gateway in the parking lo t, the duration of parking in the parking area until the car leaves the area. With this, the generation of income report is conducted since it is incorporated with the payment. Another generation of report is the list of cars, this are the records of all the cars that had park in the parking lot. The operator could view and print these reports daily, weekly, monthly, annualy or any days the operator wants.After implementing the simulation, the payment system and the generation of reports, the next thing the group implemented is the database of the system. The database is one of the most critical and sensitive part. The construction of the tables and the amount of data will either make or break the entire application. The database of the system is not quite large but the group make sure that the database will not be very modify and complex. Upon database completion, technical and trial and error analysis were carried out by the group to remove glitches in the life history and also in the programming.Thus, through further study, implementation, analysis, and a series of testing of the entire system the group was able to achieve its goals and objectives. Chapter 5 SUMMARY, CONCLUSIONS AND RECOMMENDATIONS Summary There are various concepts in computer science which can be compared when searching, allocating and choosing the right parking slot. This concept is through the algorithm used. The algorithm used in this study is the Allocation algorithm. This algorithm allocates the parking slot that are vacant or available. Parking slots that are occupied will be ignored and will not be allocated by the system.The Allocation algorithm was initially analyzed, out front implementing to the simulation system. A cost function is created to measure which of these algorithms would give better results under which circumstances. This cost function measured and calculate the expertness and accuracy of the algorithm used, and so the different algorithm was compared under diff erent situation. Differences are small but there is quite something to win over the old situation where no guidance were given. The implementation of the Allocation algorithm along with the simulation of the parking lot can mimic most legal car movements.The simulation was created and tested and this seems to imitates the drivers preferences of choosing the parking slot and locate the slot directly. To summarize, the group implemented and tested the system succesfully, and met its desired goals and objectives of the project. Conclusions After a series of crucial programming and designing of the system, trial and error, and evaluating different allocation strategies, there are several conclusions to draw. The system met its desired expectations on the project.The system can now search and allocate which slots are available and occupied using the Allocation algorithm. The other features of the system such as the payment system and generation of reports was also implemented and can now be easy to managed because the system administrates the reality of the actual car parking lot. The slot that is chosen by the driver will get occupied as soon as he enters the parking lot. However, the group did not find a method to prevent neglecting of recommendations or choices of the driver, or in cases when the driver forgets which slot was recommended to him.In situations like this, whenever a driver might decide to neglect a recommendation or either his preferred choice of slot, this has a big influence on the system, but this is a matter of the drivers behavior. Because there was no actual parking lot to run tests on, the group implemented a parking lot simulation. The animation is relatively simple but it depict every step in developing Allocation algorithm. Nonetheless, before the animation takes place, some conditions must be met. The animation was done by using the Adobe Shockwave Flash 8, showing a graphical representation of the parking lot that communicates with the system.The simulation can model the most basic movements in a parking lot and the recommendation system can real-time correct to new situations. The simulation is a tool to demonstrate the work of the different algorithms used by the group. Recommendations The system has many capabilities that the group did not include payable to lack of time and budget of materials. Some of this is the effect of receipt of the payment system. The group would like to have the printer receipt but was too expensive. along with that, the coming(prenominal) researchers could also enhance the simulation of the system, like creating more slots and making more entrances and exits.Also for future recommendations, there are many rooms for improvement to ensure the reliability and impeccability of the system. A potential approach of enhancing the system is to implement the security measure system such as image processing technique so that security and safety in the parking lot is rest assured. This could be very helpful since safety is very important nowadays. And thus, the group would like to recommend the application of image compression algorithm for this will be very effective in a way of capturing images from time to time. Aside from that, another recommendation for future researchers is the reservation system.The reservation system does not take drivers preferences into account yet, but people or the drivers specifically could be able to make a reservation over the internet and this reservation could be tie in to the licensed cuticle number of their car. So, these are just some of the recommendations that the group would like to commend on future reasearchers who are interested in making the study in a different manner. Chapter 6 BIBLIOGRAPHY Internet Sources 1Caldrera International Inc. (February 11, 2003) Allocation Algorithm. Retrieved, January 18, 2012. From www. osr507doc. sco. com/en/tools/ld_alloc. hypertext markup language web address. 2G. P. Kegel ( indulgech 2009) The Parking Spot Finder. Retrieved, October 10, 2011. From www. alexandria. tue. nl/extra1/afstversl/wsk-i/kegel2009 web address. 3Lou Tylee (1998) attain Microsoft Visual Basic 6. 0. Retrieved, November 17, 2011. From www. thainguyen. edu. vn/Thanhvien/c2bachquangsc web address. 4Ningyuan Chen (September 2011) unbiased Parking Lot Management System. Retrieved, August 3, 2011. From www. publications. theseus. concluding/handle/134024 web address. 5Ramdeo Anand ( may 5, 2010) Gray-box Testing. Retrieved, February 15, 2012. From http//www. testinggeek. com/gray-box-testing web address. 6Rochester Institute of technology (December 6, 2001) Best-Fit Allocation Algorithm. Retrieved, January 5, 2012. From www. cs. rit. edu/ark/lectures/gc/03_03_03. html web address. 7Wikipedia The Free Encyclopedia (March 2011) Allocation Algorithm. Retrieved, September 29, 2011. From http//en. wikipedia. org/wiki/Allocation_algorithm web address. 8Wikipedia The Free Encyclopedia (June 2011) Top-do wn Approach. Retrieved, January 10, 2012. From http//en. wikipedia. org/wiki/Top_down_approach web address. Chapter 7 APPENDICES Screen Shots Fig. 1 Main spurt (Parking Area A) Fig. 2 Main form (Parking Area B) Fig. Login Form Fig. 4 Slot Card Form Fig. 5 Out Car Form Fig. 6 defrayment appreciate Form Fig. 7 Account backing Form Fig. 8 Database Form Fig. 9 Logout Form REPORTS Fig. 10 Car make get across Form Fig. 11 Income comprehend Form Source tag ModPark________________________________________________________________ Global CON As ADODB. Connection state-supported RSpark As ADODB. Recordset chock main() garnish CON = fresh ADODB. Connection CON. turn over Provider=Microsoft. JET. OLEDB. 4. 0data source = App. data track db. mdb jet oledbdatabase password=ParkMe bear down frmMain frmMain. demonstrate vbModeless cut frmLogin frmLogin. manifest vbModeless stop over numbfish frmMain________________________________________________________________ feeble x, y, z , s, ok As integer calamitous form, m As String one-on-one grinder cmdPlay_Click() On misapprehension GoTo PlayERR If adhesive friction = then live hoagie If cmdPlay. supply = PLAY airy Parking so cmdSearch. Enabled = mendacious cmdPark. Enabled = unreasonable If Right( turn back, 1) = A because swf1. institutionalizeMovie 0, App. row SWF drive . swf ElseIf Right(hold, 1) = B accordingly swf2. tearMovie 0, App. itinerary SWF hold . swf obliterate If For s = 1 To 40 lblcar2(s). Enabled = irrational lblCar1(s). Enabled = False undermentioned cmdPlay. render = STOP Animated ParkingElseIf cmdPlay. furnish = STOP Animated Parking therefore cmdSearch. Enabled = square(a) cmdPark. Enabled = admittedly If Right(hold, 1) = A thusly swf1. LoadMovie 0, App. Path SWF . swf ElseIf Right(hold, 1) = B and then swf2. LoadMovie 0, App. Path SWF . swf check If For s = 1 To 40 lblcar2(s). Enabled = True lblCar1(s). Enabled = True Next cmdPlay. caption = P LAY Animated Parking complete If PlayERR destruction fill in cloistered gun for hire Form_ exonerate(Cancel As Integer) If MsgBox(Are you sure you want to exit? , vbYesNo, System pull up stakes) = vbYes hence Me. Enabled = False Load frmLogOut frmLogOut. Show vbModeless destroy If Cancel = 1 revoke exchange close shade lblCar1_Click( great power As Integer) For x = 1 To 40 If lblcar2(x). BackColor = vbYellow wherefore MsgBox There is a selected slot in Parking Area B. transport deselect it first by double-clicking the yellow slot before continuing. , _ vbOK still, Parking Area B wrongful conduct Exit hero sandwich demolition If Next If lblCar1( office). BackColor vbRed hence lblCar1( top executive). BackColor = vbYellow hold = Index & A ElseIf lblCar1(Index). BackColor = vbRed thusly hold = lay off If x = Index nump = x For Index = 1 To 40 If Index x because If lblCar1(Index). BackColor vbRed so lblCar1(Index). BackColor = vbWhite blockade If give the axe IfNext intercept substitute semiprivate gunman lblcar2_Click(Index As Integer) For x = 1 To 40 If lblCar1(x). BackColor = vbYellow wherefore MsgBox There is a selected slot in Parking Area A. recreate deselect it first by double-clicking the yellow slot before continuing. , _ vbOKOnly, Parking Area A misunderstanding Exit submarine annihilate If Next If lblcar2(Index). BackColor vbRed and so lblcar2(Index). BackColor = vbYellow hold = Index & B ElseIf lblcar2(Index). BackColor = vbRed Then hold = break off If x = Index nump = x For Index = 1 To 40 If Index x Then If lblcar2(Index). BackColor vbRed Then lblcar2(Index). BackColor = vbWhite residual If halt If Next obliterate deputise secluded gun for hire lblcar2_DblClick(Index As Integer) If lblcar2(Index). BackColor = vbRed Then Load frmOut frmOut. lblout. legend = lblcar2(Index). subtitle frmOut. Show vbModeless come down RSpark = parvenue ADODB. Recordset RSpark. unaffixed select * from tblPark where SlotNo= & lblcar2(Index). furnish & , CON, ad laxKeyset, adLockOptimistic With RSpark frmOut. txtPlate1. school text = Left( PlateNo, 3) frmOut. txtPlate2. textbook = Right( PlateNo, 3) frmOut. lblTI = TimeIn intercept With Me. Enabled = False Exit hacek peculiarity If lblcar2(Index). BackColor = vbWhite hold = terminate chock mystical hoagy lblCar1_DblClick(Index As Integer)If lblCar1(Index). BackColor = vbRed Then Load frmOut frmOut. lblout. furnish = lblCar1(Index). Caption frmOut. Show vbModeless plenty RSpark = innovative ADODB. Recordset RSpark. Open select * from tblPark where SlotNo= & lblCar1(Index). Caption & , CON, adOpenKeyset, adLockOptimistic With RSpark frmOut. txtPlate1. school text = Left( PlateNo, 3) frmOut. txtPlate2. textual matter = Right( PlateNo, 3) frmOut. lblTI = TimeIn End With Me. Enabled = False Exit electric ray End If lblcar2(Index). BackColor = vbWhite End numbfish reclusive exchange mnuChange_Click() If user = Operator Then MsgBox Permi ssion denied Please contact the Administrator. , vbInformation, Administrator Only Exit hit man End If Me. Enabled = False Load frmAccount frmAccount. Show vbModeless End pigboat Private fill out mnuDB_Click() If user = Operator Then MsgBox Permission denied Please contact the Administrator. , vbInformation, Administrator Only Exit change End If Me. Enabled = False Load frmDB frmDB. Show vbModeless frmDB. line of longitude = 980 frmDB. largeness = 7300 End substitute Private hoagie mnuLogout_Click() Load frmLogin frmLogin. Show vbModeless End stand in Private sub mnuExit_Click() Unload Me End torpedo Private Sub mnuIncome_Click() Me. Enabled = False Load frm track frmReport. Show vbModeless frmReport.Caption = Income Report End Sub Private Sub mnuList_Click() Me. Enabled = False Load frmReport frmReport. Show vbModeless frmReport. Caption = Car List Report End Sub Private Sub mnuLost_Click() Me. Enabled = False Load frmOut frmOut. Show vbmdeless frmOut. txtPlate1. Enabled = True frmOut. txtPlate2. Enabled = True frmOut. cmdSLost. Enabled = True End Sub Private Sub mnuRate_Click() If user = Operator Then MsgBox Permission denied Please contact the Administrator. , vbInformation, Administrator Only Exit Sub End If Me. Enabled = False Load frmRate frmRate. Show vbModeless End Sub Private Sub Timer1_Timer() blday. Caption = Format(Now, dd mmmm yyyy) lbltime. Caption = Format(Now, hhmmss AMPM) End Sub Private Sub txtPlate1_Change() If Len(txtPlate1. school text) = 3 Then txtPlate2. SetFocus End If End Sub Private Sub txtPlate1_KeyPress(KeyAscii As Integer) If KeyAscii = vbKeyBack Then Exit Sub If KeyAscii vbKeyA Or KeyAscii vbKeyZ Then KeyAscii = 0 End If End Sub Private Sub txtPlate2_KeyPress(KeyAscii As Integer) If KeyAscii = vbKeyBack Then Exit Sub If KeyAscii vbKey0 Or KeyAscii vbKey9 Then KeyAscii = 0 End If End Sub Private Sub cmdPark_Click() If Len(txtPlate1. schoolbook) 3 Or Len(txtPlate2. textbook) 3 Then Exit Sub Set RSpark = in the alt ogether ADODB. Recordset RSpark. Open select * from tblPark where PlateNo= txtPlate1. school text - txtPlate2. Text , CON, adOpenKeyset, adLockPessimistic With RSpark If TimeOut = - Then MsgBox The inputed crustal plate number already exist. , vbInformation, Ops Exit Sub End If End With ok = 0 For z = 1 To 40 If lblcar2(z). BackColor = vbYellow Or lblCar1(z). BackColor = vbYellow Then z = 40 ok = 1 End If Next If ok = 1 Then Set RSpark = stark naked ADODB. Recordset RSpark. Open select * from tblPark, CON, adOpenKeyset, adLockPessimistic With RSpark .Add wise period = Format(Now, dd mm yyyy) PlateNo = txtPlate1. Text - txtPlate2. Text TimeIn = Format(Now, hhmm ampm) TimeOut = - SlotNo = hold sum up = 0 .Update hold = End With nominate DataPut predict pick up txtPlate2. Text = txtPlate1. Text = lblS. Caption = cmdSearch. Caption = Search txtPlate1. SetFocus End If End Sub Sub DataPut() lv1. ListItems. clean lv2. ListItems. Clear blackened d, y, holdDate As Vari ant Set RSpark = impudent ADODB. Recordset RSpark. Open select * from tblPark where TimeOut= - , CON, adOpenKeyset, adLockOptimistic With RSpark Do While non .EOF d = Left( Date, 2) m = Mid( Date, 4, 2) Call month y = Right( Date, 4) holdDate = d m y If Right( SlotNo, 1) = A Then Set k = lv1. ListItems. Add(, , holdDate) k. SubItems(1) = PlateNo k. SubItems(2) = TimeIn k. SubItems(3) = SlotNo ElseIf Right( SlotNo, 1) = B Then Set k = lv2. ListItems. Add(, , holdDate) k. SubItems(1) = PlateNo k. SubItems(2) = TimeIn k. SubItems(3) = SlotNo End If .MoveNext loop-the-loop End With End Sub Sub month() Select eccentric person m showcase 01 m = Jan racing shell 02 m = Feb boldness 03 m = Mar faux pas 04 m = Apr carapace 05 m = MayCase 06 m = Jun Case 07 m = Jul Case 08 m = Aug Case 09 m = Sep Case 10 m = Oct Case 11 m = Nov Case 12 m = Dec End Select End Sub Sub relegate() For x = 1 To 40 lblcar2(x). BackColor = vbWhite lblCar1(x). BackColor = vbWhite Next Set RS park = virgin ADODB. Recordset RSpark. Open select * from tblPark, CON, adOpenKeyset, adLockOptimistic If RSpark. RecordCount 0 Then Do While not RSpark. EOF For x = 1 To 40 If lblcar2(x). Caption = RSpark SlotNo Then lblcar2(x). BackColor = vbRed ElseIf lblCar1(x). Caption = RSpark SlotNo Then lblCar1(x). BackColor = vbRed End If Next RSpark. MoveNext laceEnd If End Sub frmLogin_______________________________________________________________ Private Sub cmdExit_Click() If MsgBox(Are you sure you want to exit? , vbYesNo, System Exit) = vbYes Then Unload Me End Else Cancel = 1 End If End Sub Private Sub cmdGO_Click() Set RSpark = young ADODB. Recordset RSpark. Open select * from tblAccount, CON, adOpenKeyset, adLockOptimistic If txtPass. Text = RSpark Password And txtUser. Text = RSpark UserName Then Unload Me frmMain. Enabled = True frmMain. Show vbModeless Else MsgBox irrational Username or Password. Please try once again , vbExclamation, Login error txtPass. Text = xtUser. Text = txtUser. SetFocus End If End Sub Private Sub Form_Load() Me. mental image = Load prototype(App. Path ParkMe. ico) imgLogin. Picture = LoadPicture(App. Path GraphicLogIn. jpg) Dim mByte() As Byte Open App. Path Park. dat For Binary As 1 Open CWINDOWSdb. mdb For Binary As 2 ReDim mByte(0 To LOF(1)) halt 1, , mByte() Put 2, , mByte() Close 1 Close 2 End Sub frmSlotPrint___________________________________________________________ Private Sub Form_KeyPress(KeyAscii As Integer) lblEnter. Visible = False Dim f, w As Integer Me. PrintForm If KeyAscii = vbKeyReturn Or KeyAscii = 13 ThenIf MsgBox(Is there an approach car? , vbYesNo, Parking Slot) = vbYes Then If Right(lblSlot. Caption, 1) = A Then back1 nump = nump + 1 If nump = 41 Then nump = 1 End If If frmMain. lblCar1(nump). BackColor = vbRed Then w = 0 For f = 1 To 40 If frmMain. lblCar1(f). BackColor = vbRed Then w = w + 1 If w = 40 Then MsgBox There are no more vacant parking slot , vbExclamation, Parking Area A illusion U nload Me frmMain. Enabled = True frmMain. Show frmMain. txtPlate1. SetFocus Exit Sub End If End If Next GoTo back1 End If frmMain. lblCar1(nump). BackColor = vbYellow hold = nump & A ElseIf Right(lblSlot.Caption, 1) = B Then back2 nump = nump + 1 If nump = 41 Then nump = 1 End If If frmMain. lblcar2(nump). BackColor = vbRed Then w = 0 For f = 1 To 40 If frmMain. lblCar1(f). BackColor = vbRed Then w = w + 1 If w = 40 Then MsgBox There are no more vacant parking slot , vbExclamation, Parking Area B Error Unload Me frmMain. Enabled = True frmMain. Show frmMain. txtPlate1. SetFocus Exit Sub End If End If Next GoTo back2 End If frmMain. lblcar2(nump). BackColor = vbYellow hold = nump & B End If End If End If Me. Enabled = False Unload Me frmMain. Enabled = True frmMain. Show frmMain. txtPlate1. SetFocus End Sub rmOut_________________________________________________________________ Dim dumm, hold, hold1, hold2 As hotshot Dim hr, min As Variant Private Sub cmdCancel_Click() frmMain. Enabl ed = True Unload Me End Sub Private Sub cmdChange_Click() On Error GoTo Err txt numerate. Text = Format(txtAmount, 0. 00) txtChange. Text = Format(txtAmount dumm, 0. 00) If Left(txtChange. Text, 1) = - Then txtChange. Text = Right(txtChange. Text, 5) MsgBox The amount paid is not enough The amount lack P & txtChange. Text, vbExclamation, Payment Error txtChange. Text = End If Err End Sub Private Sub cmdCompute_Click()Set RSpark = vernal ADODB. Recordset RSpark. Open select * from tblRate, CON, adOpenKeyset, adLockOptimistic If lblout. Caption = Then Exit Sub lblTO. Caption = Format(Now, hhmm ampm) hold1 = Left(lblTI. Caption, 2) * 60 hold1 = hold1 + Mid(lblTI. Caption, 4, 2) hold2 = Left(lblTO. Caption, 2) * 60 hold2 = hold2 + Mid(lblTO. Caption, 4, 2) If hold2 hold1 Then hold2 = hold2 + 720 End If dumm = hold2 hold1 If dumm 60 Then hold = dumm / 60 hr = hold If Mid(hold, 2, 1) = . Then hr = Left(hold, 1) ElseIf Mid(hold, 3, 1) = . Then hr = Left(hold, 2) End If hold = hr * 60 min = dumm hold lblTotal.Caption = hr hr/s and min min/s Else lblTotal. Caption = dumm min/s End If dumm = Format(dumm, 0. 00) * RSpark Rate lblPay. Caption = Format(dumm, 0. 00) End Sub Private Sub cmdOut_Click() If lblTI. Caption = Then MsgBox No plate number was found Please check the correct plate number again. , vbExclamation, Plate Number Error Exit Sub End If If txtChange. Text = Then MsgBox Please pay the parking payment first. , vbInformation, Payment Error Exit Sub End If Set RSpark = revolutionary ADODB. Recordset RSpark. Open select * from tblPark where SlotNo= lblout.Caption , CON, adOpenKeyset, adLockOptimistic With RSpark TimeOut = lblTO. Caption SlotNo = lblout. Caption . TimePark = lblTotal. Caption Amount = lblPay. Caption .Update End With frmMain. lblS. Caption = frmMain. cmdSearch. Caption = Search frmMain. Enabled = True Call frmMain. DataPut Call frmMain. Check frmMain. Show Unload Me End Sub Private Sub cmdSLost_Click() Dim dum As String dum = txtPlate1. Text - txtPlate2. Text Set RSpark = New ADODB. Recordset RSpark. Open select * from tblPark where PlateNo= dum , CON, adOpenKeyset, adLockOptimistic With RSpark lblout.Caption = SlotNo lblTI. Caption = TimeIn End With If lblout. Caption = Or Right(lblout. Caption, 1) = . Then lblout. Caption = lblTI. Caption = MsgBox Please type the plate number and click the Search button to out the car. , vbExclamation, Out Car Error End If End Sub Private Sub Form_Load() Me. Icon = LoadPicture(App. Path ParkMe. ico) imgOut. Picture = LoadPicture(App. Path GraphicLogIn. jpg) End Sub Private Sub txtAmount_KeyPress(KeyAscii As Integer) If KeyAscii = vbKeyBack Or KeyAscii = 46 Then Exit Sub If KeyAscii vbKey0 Or KeyAscii vbKey9 Then KeyAscii = 0 End If End SubPrivate Sub txtPlate1_KeyPress(KeyAscii As Integer) If KeyAscii = vbKeyBack Then Exit Sub If KeyAscii vbKeyA Or KeyAscii vbKeyZ Then KeyAscii = 0 End If End Sub Private Sub txtPlate2_KeyPress(KeyAscii As Integer) If KeyAscii = vbKeyBack Then Exit Sub If KeyAscii vbKey0 Or KeyAscii vbKey9 Then KeyAscii = 0 End If End Sub frmRate________________________________________________________________ Private Sub cmdCancel_Click() frmMain. Enabled = True Unload Me End Sub Private Sub cmdSave_Click() Set RSpark = New ADODB. Recordset RSpark. Open select * from tblAccount, CON, adOpenKeyset, adLockOptimistic If txtRate.Text = RSpark Password Then Set RSpark = New ADODB. Recordset RSpark. Open select * from tblRate, CON, adOpenKeyset, adLockOptimistic RSpark Rate = txtNew. Text RSpark. Update MsgBox Your new rate is txtNew. Text, . , vbInformation, Rate experimental condition frmMain. Enabled = True frmMain. Show Unload Me Exit Sub End If MsgBox Incorrect Password Please enter the correct password again. , vbExclamation, Password Error txtRate. Text = txtRate. SetFocus End Sub Private Sub Form_Load() Me. Icon = LoadPicture(App. Path ParkMe. ico) imgRate. Picture = LoadPicture(App. Path GraphicLogIn. pg) Set RSpark = New ADODB. Recordset RSpark. Open select * from tblRate, CON, adOpenKeyset, adLockOptimistic txtCurrent. Text = RSpark Rate End Sub frmDB__________________________________________________________________ Dim x As Integer Private Sub cmdClear_Click() x = 0 lblDB. Caption = If MsgBox( admonishment All data will be permanently deleted. Are you sure you want to stay put? , vbYesNo, Data Removal) = vbYes Then Set RSpark = New ADODB. Recordset RSpark. Open select * from tblPark, CON, adOpenKeyset, adLockOptimistic If RSpark. RecordCount 0 Then Do While Not RSpark. EOF RSpark. Delete adAffectCurrentRSpark. Update RSpark. MoveNext draw in x = 0 lblDB. Caption = Call loadDB Call frmMain. DataPut Call frmMain. Check End If Else Cancel = 1 End If End Sub Private Sub cmdConfirm_Click() Set RSpark = New ADODB. Recordset RSpark. Open select * from tblAccount, CON, adOpenKeyset, adLockOptimistic If txtPass. Text = RSpark Password And txtUser. Text = RSpark UserName Then Me. Height = 9150 Me. Width = 7530 cmdConfirm. Visible = False txtUser. Enabled = False txtPass. Enabled = False Call loadDB Else MsgBox Incorrect username or password. Please try again , vbExclamation, Administrator txtPass. Text = txtUser. Text = xtUser. SetFocus End If End Sub Sub loadDB() ListView1. ListItems. Clear Set RSpark = New ADODB. Recordset RSpark. Open select * from tblPark, CON, adOpenKeyset, adLockOptimistic With RSpark Do While Not . EOF Set k = ListView1. ListItems. Add(, , Date) k. SubItems(1) = PlateNo k. SubItems(2) = TimeIn k. SubItems(3) = TimeOut k. SubItems(4) = SlotNo .MoveNext coil End With End Sub Private Sub cmdDelete_Click() If x = 0 Then Exit Sub Dim d As Integer d = 1 If MsgBox(Warning Are you sure you want to delete this data? , vbYesNo, Data Removal) = vbYes Then Set RSpark = New ADODB. RecordsetRSpark. Open select * from tblPark, CON, adOpenKeyset, adLockOptimistic If RSpark. RecordCount 0 Then Do While Not RSpark. EOF If x = d Then RSpark. D elete adAffectCurrent RSpark. Update x = 0 lblDB. Caption = End If d = d + 1 RSpark. MoveNext Loop End If Call loadDB Call frmMain. DataPut Call frmMain. Check Else Cancel = 1 End If End Sub Private Sub Form_Load() Me. Icon = LoadPicture(App. Path ParkMe. ico) x = 0 End Sub Private Sub Form_Unload(Cancel As Integer) Unload Me frmMain. Enabled = True frmMain. Show vbModeless End Sub Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib. ListItem) x = ListView1.SelectedItem. Index lblDB. Caption = Database line x End Sub frmReport______________________________________________________________ Dim RStemp As ADODB. Recordset Dim CRrep As CRAXDRT. Report Dim CRapp As CRAXDRT. act Dim sel1, sel2, hold, mn, dy, yr As String Dim d, d1, d2, m, m1, m2, y, y1, y2, fin As Variant Dim pay As Single Private Sub cmdView_Click() On Error GoTo Err If lblMV1. Caption = Or lblMV2. Caption = Then MsgBox Please select the appropriate date of report you want to display. , vbInformation, Report Advisory Exit Sub ElseIf m1 m2 And y1 = y2 Or y1 y2 Or m1 = m2 And y1 = y2And d1 d2 Then MsgBox invalid date range Please select the appropriate range of date. , vbExclamation, Report Advisory Exit Sub End If lblLoad. Caption = Loading. Screen. MousePointer = vbHourglass Set RStemp = New ADODB. Recordset RStemp. Open select * from tblTemp, CON, adOpenKeyset, adLockOptimistic If RStemp. RecordCount 0 Then Do While Not RStemp. EOF RStemp. Delete adAffectCurrent RStemp. Update RStemp. MoveNext Loop End If If Me. Caption = Car List Report Then Set CRrep = CRapp. OpenReport(App. Path CarList. rpt) ElseIf Me. Caption = Income Report Then Set CRrep = CRapp.OpenReport(App. Path Income. rpt) End If Set RSpark = New ADODB. Recordset Set RStemp = New ADODB. Recordset RSpark. Open select * from tblPark, CON, adOpenKeyset, adLockOptimistic RStemp. Open select * from tblTemp, CON, adOpenKeyset, adLockOptimistic pay = 0 pay = Format(pay, 0. 00) Do While Not RSpark. EOF d = Left(RSpark Date , 2) m = Mid(RSpark Date, 4, 2) y = Right(rsparkDate, 4) If y1 = y2 Then If m1 = m2 And d = d1 And d = d2 And m = m1 And m = m2 Or _ m1 = m2 And m = m1 And m = m2 And d1 d2 And d = d1 And d = d2 Or _ m1 m2 And m = m1 And d = d1 Or _ 1 m2 And m m1 And m m2 Or _ m1 m2 And m = m2 And d = d2 And y = y1 Then RStemp. AddNew dy = Left(RSpark Date, 2) mn = Mid(RSpark Date, 4, 2) Call month yr = Right(RSpark Date, 4) hold = dy mn yr RStemp Date = hold RStemp PlateNo = RSpark PlateNo RStemp TimeIn = RSpark TimeIn RStemp TimeOut = RSpark TimeOut RStemp SlotNo = RSpark SlotNo RStemp TimePark = RSpark TimePark RStemp Amount = RSpark Amount RStemp. Update pay = pay + RSpark Amount End If ElseIf y1 y2 Then If m1 m2 And m = m1 And d = d1 Or _ 1 m2 And m m1 Or _ m1 m2 And m1 m And m m2 Or _ m1 m2 And m = m2 And d = d2 Or _ m1 = m2 And m = m1 And d = d1 Or _ m1 = m2 And m m1 Or _ m1 = m2 And m m2 Or _ m1 = m2 And m = m2 And d = d2 And y y1 Then RStemp. AddNew dy = Left(RSpark Date, 2) mn = Mid(RSpark Date, 4, 2) Call month yr = Right(RSpark Date, 4) hold = dy mn yr RStemp Date = hold RStemp PlateNo = RSpark PlateNo RStemp TimeIn = RSpark TimeIn RStemp TimeOut = RSpark TimeOut RStemp SlotNo = RSpark SlotNo RStemp TimePark = RSpark TimeParkRStemp Amount = RSpark Amount RStemp. Update pay = pay + RSpark Amount End If End If RSpark. MoveNext Loop fin = Format(pay, 0. 00) If Me. Caption = Income Report Then CRrep. Sections(4). ReportObjects(crtxtTotal). SetText fin End If If lblMV1. Caption = lblMV2. Caption Then fin = lblMV1. Caption Else fin = lblMV1. Caption lblMV2. Caption End If CRrep. Sections(1). ReportObjects(crtxtDate). SetText fin CRrep. Database. Tables(1). SetDataSource RStemp Screen. MousePointer = vbHourglass CRViewer91. ReportSource = CRrep CRViewer91. ViewReport Screen. MousePointer = vbDefault lblLoad.Caption = Err End Sub Sub month() Select Case mn Case 01 mn = Jan Case 02 mn = Feb Case 03 mn = Mar Case 04 mn = Apr Case 05 mn = May Case 06 mn = Jun Case 07 mn = Jul Case 08 mn = Aug Case 09 mn = Sep Case 10 mn = Oct Case 11 mn = Nov Case 12 mn = Dec End Select End Sub Private Sub Form_Load() Me. Icon = LoadPicture(App. Path ParkMe. i
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.