Return-Path: william@bourbon.usc.edu
Delivery-Date: Tue Sep 5 20:37:21 2006
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on merlot.usc.edu
X-Spam-Level:
X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,AWL,NO_REAL_NAME
autolearn=ham version=3.1.0
Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75])
by merlot.usc.edu (8.13.5/8.13.5) with ESMTP id k863bLLj017419
for ; Tue, 5 Sep 2006 20:37:21 -0700
Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1])
by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id k863YDvJ010746
for ; Tue, 5 Sep 2006 20:34:13 -0700
Message-Id: <200609060334.k863YDvJ010746@bourbon.usc.edu>
To: cs551@merlot.usc.edu
Subject: Re: cs551: project 2
Date: Tue, 05 Sep 2006 20:34:13 -0700
From: william@bourbon.usc.edu
Someone wrote:
> I have a mathematical question.
> in the exponentialinterval function we are trying to get the time of
> service/arrival in millisecond.
> now we are calculating that with a random val b/w 0 and 1 and the
> rate(mu, lambda).
> in order to calculate that we are trying to find w by reserving the
> F(x),cdf.
> q1) is that w same as x? interms what they represent,i.e time, and also
> units.
The w is an instance of x (x is a free variable). You need
to make sure that the units work out.
> q2) what are the bounds of x in pdf, for the given rate? or is it
> infinity looking at the pdf graph of expo function.
Theoretically, x is between 0 and infinity. The spec says
that you should bound x between 1ms and 10,000ms.
> q3) since the rate we provide is in units/sec, so does that mean that
> the w or x calculate is in secs. which needs to be converted in
> milliseconds?
It's a small exercise in arithmetics. But you need to figure
this out and convince yourself that you are doing the right
thing. This is in general needed for simulation... You need
to convince yourself that what you are simulating is reasonable.
One easy way is to check this is to turn on arrivals with
immediate departures and collect statistics to see if the
statistics matches the model parameter (lambda).
--
Bill Cheng // bill.cheng@usc.edu
william@bourbon.usc.edu wrote:
> Someone wrote:
>
> > I wanted to clarify the inter arrival time concept.
> > q1) would we will use the GetInterval() func to calculate the time
> > customers arrival into the queue and the service time?
>
> For arrivals, you should call GetInterval() to get *inter-arrival times*.
> For service, you should call GetInterval() to get *service times*.
>
> > q2) u said to call these function is after the parsing. but wudnt u have
> > to call getInterval every time u have u get the arrival interval and the
> > service time for each customer. ?
>
> Yes. What I mentioned during class is about how much to sleep
> for your thread. If GetInterval() returns, say, 1625ms for
> an inter-arrival time, and it has been 500ms since the last
> arrival, you should sleep for 1125ms and *not* 1625ms.
>
> > q3) in the ExponentialInterval(), do we use the possion distribution to
> > calculate the time. combined with method you showed us in class last week?
>
> Yes. Please remember that inter-arrival times for a Poisson
> Process is distributed according to an exponential distribution
> with the same mean.
>
> > q4) about the book keeping. how do we estimate this time required for
> > book keeping ? is it some constant or do we calculate it using real
> > timestamps of the system?
>
> You should use the actual timestamps of the system. You are
> not suppose to model nunki.usc.edu.
> --
> Bill Cheng // bill.cheng@usc.edu