Question: MATH MODELING CLASS USING MATH LAB In the posed elevator problem, your assistant notified you that there are 60 workers operating on each of 5
MATH MODELING CLASS USING MATH LAB
In the posed elevator problem, your assistant notified you that there are 60 workers operating on each of 5 floors atop the ground floor in your office building - 300 in total. The elevator occupancy is 10 people, and there are 3 elevators in total. In the worst-case scenario in terms of total transition time, on each elevator ride at least one person is getting off at each floor. Naturally, we can ask: what is the probability that an elevator with 10 passengers has none of the 5th floor workers? For that trip, it should reduce the elevator travel time by t45 + texit + t54 = 5 + 15 + 5 = 25sec. To see how often this might happen, we can perform random draws of elevator occupants, and average over a long time. This is a way to check the validity of certain modeling assumptions.
Part 1 Write a script which computes random draws for the 10 elevator occupants, and perform this 1000 times. Count the number of times a 5th floor occupant is present, and divide the that count by 1000. A basic structure for this may look like:
N=1000;
f o r . . . % loop ove r a l l N t r i e s
Elev= % g e n e r a t e v al u e s f o r Elev u si ng pseudorandom numbers
i f % put a c o n di ti o n on v al u e s to check f o r a 5 th f l o o r worker
% inc remen t co u n t e r
e l s e
% do no thing ( can l e a v e e l s e s ta temen t blank )
end
% do more t hi n g s i f n e c e s s a r y
end
% output count / N A very useful matlab command to look up would be "randi" or similarly "rand".
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
