10SimHw6Solution

# 10SimHw6Solution - IEOR E4404.001 SIMULATION Prof Mariana...

This preview shows pages 1–2. Sign up to view the full content.

IEOR E4404.001 SIMULATION Prof. Mariana Olvera-Cravioto Assignment #6 Solutions 1. Here, all you have to do is use the algorithm given in class and modify it very slightly: using the same notations as the lecture notes , we need to output the value t E when J = 3 and Y > a (i.e., the time at which the capital becomes negative). To display the amount of the shortfall, we need to output Y - a . 2. (a) Please refer to part (b) and (c) for the variables and their descriptions (b) and (c) N=500; Time=zeros(1,N); Prop=zeros(1,N); for j=1:N t=0; Na1=0; %Number of arrivals in queue 1 Na2=0; %Number of arrivals in queue 2 Nd1=0; %Number of departures in queue 1 Nd2=0; %Number of departures in queue 2 n1=0; %Current number of customers in the 1st queueing system n2=0; %Current number of customers in the 2nd queueing system N=1000; U=rand; ta=((-1)/6)*log(U); %Initialize with the 1st arrival td1=10000; td2=10000; while(ta < 10000 || n1 > 0 || n2 > 0) if ta < =min(td1,td2) %An arrival happens t=ta; if n1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 4

10SimHw6Solution - IEOR E4404.001 SIMULATION Prof Mariana...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online