[SOLVED] C algorithm operating system graph software OpenCL THE UNIVERSITY OF BRITISH COLUMBIA

$25

File Name: C_algorithm_operating_system_graph_software_OpenCL_THE_UNIVERSITY_OF_BRITISH_COLUMBIA.zip
File Size: 800.7 KB

5/5 - (1 vote)

THE UNIVERSITY OF BRITISH COLUMBIA
Department of ElectricalComputer Engineering
CPEN 333Software Systems Engineering
Assignment 1Sept 2019
Introduction:
Sources within UBC have recently put out to contract, the design and installation of a tenstorey duplex Elevator system for a new high technology science block that it is intending to build in June 2020.
However, following recent complaints about the inefficiency of other elevator systems within the University it has been unanimously decided that each of the companies putting forward a proposal for their new elevator system, should first supply a simulation model which accurately reflects the algorithms used by each company to dispatch elevators to deal with passenger requests. The various simulation models are to be judged by an independent expert, to arrive at the most effective design.
For the purposes of this assignment, you are an employee of one of the companies involved in demonstrating your design, the dubiously named Freefall Elevator Company of Toronto.You have been asked by your manager to design a simulation model of such a duplex elevator incorporating the dispatcher algorithm used in your real elevator, so that it can be presented for evaluation. As is typical in such circumstances, only a brief specification of the model is available, so you will have to use some imagination in implementing it. The following description of the model is available.
Model Specification: Part A worth 80
1A double elevator system, responding to requests made either from within the elevator, or from requests made outside the elevator for transportation of passengers both updown and to the specifieddestination floors. Fault simulation must be implemented, with particular attention then being placed on the effective use of the other elevators.
2The simulation model should at all times, inform the person running the simulation of its actions, so that an effective comparison can be made.The simulation output is to take place via the computer display window and should show the following information relating to each elevator: Direction updown, General Status inout of service etc, Door Status openclosed and Current Floor Number.
3The time taken to travel between floors, open and close doors etc. should be reasonably accurately modelled, but scaled down to run faster but not too fast as this is a simulation.
4The elevator and its floor numbers should be shown graphically on the display screen, using two animated vertical columns, showing the position and status of both elevators as they move between floors.
5All simulation inputs are to be entered via the computer keyboard, and the following key codes have been negotiated by all parties concerned
Requesting Transport once inside the elevator:
Requesting elevator movement from INSIDE the elevator involves entering a two character keyboard sequence. It should NOT be necessary to press the return key at any point in the simulation. Investigate functions like getch in Visual C to help with this.
The first character can be a 1, or 2, to designate a command directed to elevator 1 or 2 respectively, followed by a second character in the range 09 to indicate which floor the elevator is being directed to travel to. This simulates a passenger pressing one of the 10 floor destination buttons located inside the elevator. Therefore a passenger stepping into elevator 1 and wishing to travel to floor 3 would be simulated by entering the characters 1 then 3.

Requesting an elevator while stood outside on a given floor:
A passenger requesting to go UP or DOWN whilst stood OUTSIDE the elevator on a given floor will be simulated by entering two character commands such as u0,u8 and d1,d9, where the letters u and d refer to a request by the passenger to go UP or DOWN respectively. The subsequent single digit number tells the simulation which floor the request is being made from, not which floor the person wishes to be subsequently transported to. Obviously the passenger cannot direct an UP or DOWN request to a specific elevator, that decision will be left to your dispatcher algorithm which should attempt to send the elevator that is most likely to pick up the passenger in the shortest time, perhaps when passing that floor on its way to somewhere else. Once inside the elevator, the passenger may then direct the elevator to a specific floor by entering a INSIDE command such as 12 etc.

Simulating Elevator Faults and Halting the System:
Faults are to be generated by pressing 1 or 1, 2 or 2.The minus signinforms the simulator that a fault has occurred with that numbered elevator and that it is effectively out of action. The plus signindicates that the fault has been cleared and operation can resume with that elevator.Each elevator should freeze its actions immediately upon receipt of a simulated fault condition, and should ignore subsequent commands except a command to end the simulation, or clear the fault.There is NO need to transfer outstanding floor requests for an elevator to another one when a fault develops with it. Similarly, when the fault is cleared, the elevator should wait for new commands and NOT try to service any pending requests it had before the fault developed.
The simulation may be terminated at any time by entering the two character sequence ee.All elevators are then to return to the ground floor, open their doors and stop.No further commands should be accepted during this time and the simulation will then stop.

The Architecture:
Your Instructor will give you the final architecture for this assignment Part A. It is this model which you MUST attempt to implement. Any other model is invalid and will NOT be marked. The reason for this strict rule is that variations of this model are given out to CPEN 333 students from time to time and each is different to others.
The programs are to be written in C, to run under the Win32 Operating system and should be demonstrated working on the systems currently in the lab or your own laptop.
As with all realtime, safety critical systems, marks will be awarded for completeness, reliability and faulttolerance.You will also be marked on the quality of your elevator dispatch algorithm. A better algorithm will attract more marks. Better in this sense means an algorithm that makes the most efficient use of the elevators, i.e. how long does your algorithm keep a passenger waiting, does your algorithm send the closest elevator etc.
You will be asked to demonstrate your elevator software to your InstructorTA, it will be assumed during this demonstration that the elevator is real, and has been installed, ready for public use.
Any faults in the software such as a sending an elevator to the 23rd floor, failing to open the doors when arriving at a floor, or even forgetting to stop at a floor, will be marked down. This emphasises the need to get it right, and the problems in drawing up a complete specification for the problem.It also highlights the difficulties involved in completely testing an asynchronous realtime system.
Additional marks will be awarded for what the assessor considers to be bells and whistles features, such as the clever use of say colour graphics see online notes on cursor control under Win32 and colour in the rt.hrt.cpp files, clever dispatcher algorithm, or any other innovative feature you can come up with that are relevant to the elevator simulation, such as more than 2 elevators. Some bells and whistles features will obviously attract more marks than others, colour for example is not too difficult, while clever algorithms to deal with more than 2 elevators are more interesting and worth more marks.
For those of you not too confident with your C programming ability, you might want to start of by implementing a very simple dispatcher algorithm, for example, all up requests entered at the simulation could be sent to elevator 1, down requests to elevator 2 etc. Of course this is not very efficient, but it will allow you to demonstrate a working elevator which is critical to the demonstration phase of the assignment. If you have nothing to show, its very difficult to award it a fair mark. If you get this simple elevator dispatching algorithm to work and you have time, you could always modify it to make a better one which would hopefully get more marks, but make sure you save the old working version. You would not believe now many students change something critical 10 mins before the demo and end up with something that does not work and no fall back situation!!!!
The same goes for backing up your work. YOU are responsible for this, please do not come to the day of the demo and tell me your laptop has crashed and you have lost all your work. You have an obligation to safeguard your work. Ill say no more.

Part B Worth 20Adding Dynamic Passengers
You should also see an architecture for Part B from your instructor. This one allows for the dynamic creation of passengers as active objects. They are created at random with objectives in mind, e.g. they are designed to stand outside the elevator on say floor 2 and make an UP request, before travelling to say floor 5 and getting off these are just example, you can play around with floor numbers and updown requests at run time using some random number generator.
To enable this feature, you should press the character sequence d and to end it the sequence d. You can still enter new requests at the keyboard etc as in Part A

DeadlineYou should arrange to present your demonstration and submit all work to the TA in your designated lab period of week 9. Please do not ask to demonstrate in any other lab period because for example, you want another 2448 hours more to work on it as this is not feasible, the TA can only mark so many demos in a two hour period. Similarly, you should come to the lab prepared to demo WHEN ASKED to do so. Do not continue to develop your solution on that day as this serves only to push back all the demos into the last 10 mins of the lab period which is likewise unacceptable. If you cannot demo when asked by the TA you may not get a mark!!

Group Work:
This assignment may be done in groups of NO MORE THAN 2, or, if you prefer, individually. Do not ask to work in a group of 3 or more. All students who wish to be awarded marks for their work must attend the demonstration and expect to be asked questions about their design. If you cannot find a partner, then ask and I will announce it in the class and try to hook you up with someone.
All students within a group will be awarded the same mark i.e. that awarded for the assignment itself, unless there is clear disagreement about the amount of work each person did. If this cannot be resolved amongst the students themselves, then the TA will interview the students to determine their knowledge of the work they are submitting and award individual marks on that basis alone. The TAs decision is final. If you dont turn up you dont get a mark regardless of whether or not your name is on a submission.

SUBMISSION OF WORK and Assessment Strategy
YOUR DESIGN AND ALL SUPPORTING WORK MUST BE SUBMITTED VIA THE CANVAS DROP BOX.
YOUR NAMES AND STUDENT IDS MUST BE CLEARLY INDICATED ON YOUR SUBMISSION.
THE FINAL DECISION ABOUT WHAT IS A BETTER DESIGN RESTS WITH THE INSTRUCTOR ANDOR TA. THEIR WORD AND DISCRETION ARE FINAL. IT SHOULD BE NOTED THAT DESIGN IS NOT AN EXACT SCIENCE AND EVERYONES SOLUTION WILL BE SOMEWHAT DIFFERENT. IT FOLLOWS FROM THIS THAT NEITHER IS MARKING SUCH A DESIGN AN EXACT SCIENCE.
THE MARKING PROCESS WILL THEREFORE NOT BE AN ABSOLUTE MEASURE OF ANYTHING, RATHER DEMONSTRATIONS WILL BE AWARDED MARKS RELATIVE TO THE PERFORMANCE OF OTHERS IN THE GROUP, IN SIMPLE TERMS, BETTER ASSIGNMENTS WILL ATTRACT BETTER MARKS, IF YOUR ASSIGNMENT IS INCOMPLETE, CONTAINS BUGS OR IS NOT AS EFFICIENT AT DISPATCHING ELEVATORS, THEN DO NOT EXPECT TO GET THE SAME MARK AS SOMEONE ELSES PROGRAM THAT DOES NOT SUFFER FROM THESE LIMITATIONS.

CPEN 333Page PAGE 42019

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] C algorithm operating system graph software OpenCL THE UNIVERSITY OF BRITISH COLUMBIA
$25