Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I NEED THE CODE FOR PART 2-MATH MODELING CLASS USING MATH LAB in thrve posed elevator problem, your assistant notified you that there are 60

I NEED THE CODE FOR PART 2-MATH MODELING CLASS USING MATH LAB

in thrve 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

PART 2

A back-of-the-napkin calculation for this probability can be done using simple combinatorics. Assume that the full pool of workers are available to enter this particular elevator. The probability of there being no 5th floor workers on the elevator is given by: Combinations without 5th floor employees/Combinations of all workers =(240C10* 60C0)/300C10

the binomial coefficient stated as "N choose k". Calculate this probability using the MATLAB command "nchoosek". Answer the following questions in your lab report: 1. How does your value calculated in Part 1 compare to the result of th calculation shown in Part 2? 2. What is probability that a given elevator only contains workers from the 1st, 2nd, and 3rd floors? 3. (Tougher) Given your answers to 1. and 2., can you justify and calculate a more realistic expected transition time than if you were to simply assume each elevator goes to each floor on its travel?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions