Class CustomerGenerator

java.lang.Object
  extended by CustomerGenerator

public class CustomerGenerator
extends java.lang.Object


Method Summary
 Customer[] getArrivals()
          Returns an array of Customers arriving in a given time step.
static void main(java.lang.String[] args)
           
static CustomerGenerator makeHeavy()
          Returns a "heavy traffic" stream of customers.
static CustomerGenerator makeHeavy(int seed)
          Returns a "heavy traffic" stream of customers, using the specified seed.
static CustomerGenerator makeLight()
          Returns a "light traffic" stream of customers.
static CustomerGenerator makeLight(int seed)
          Returns a "light traffic" stream of customers, using the specified seed.
static CustomerGenerator makeModerate()
          Returns a "moderate traffic" stream of customers.
static CustomerGenerator makeModerate(int seed)
          Returns a "moderate traffic" stream of customers, using the specified seed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getArrivals

public Customer[] getArrivals()
Returns an array of Customers arriving in a given time step. (Inspect the length field of the returned array to see how many Customers arrived.) Each has been initialized with an item count; it is up to you to set their arrival times.

Returns:
an array of Customers arriving in a given time step.

makeLight

public static CustomerGenerator makeLight()
Returns a "light traffic" stream of customers.

Returns:
a newly-allocated CustomerGenerator instance representing a "light traffic" stream of customers.

makeLight

public static CustomerGenerator makeLight(int seed)
Returns a "light traffic" stream of customers, using the specified seed.

Parameters:
seed - the seed to start the pseudorandom sequence
Returns:
a newly-allocated CustomerGenerator instance representing a "light traffic" stream of customers.

makeModerate

public static CustomerGenerator makeModerate()
Returns a "moderate traffic" stream of customers.

Returns:
a newly-allocated CustomerGenerator instance representing a "moderate traffic" stream of customers.

makeModerate

public static CustomerGenerator makeModerate(int seed)
Returns a "moderate traffic" stream of customers, using the specified seed.

Parameters:
seed - the seed to start the pseudorandom sequence
Returns:
a newly-allocated CustomerGenerator instance representing a "moderate traffic" stream of customers.

makeHeavy

public static CustomerGenerator makeHeavy()
Returns a "heavy traffic" stream of customers.

Returns:
a newly-allocated CustomerGenerator instance representing a "heavy traffic" stream of customers.

makeHeavy

public static CustomerGenerator makeHeavy(int seed)
Returns a "heavy traffic" stream of customers, using the specified seed.

Parameters:
seed - the seed to start the pseudorandom sequence
Returns:
a newly-allocated CustomerGenerator instance representing a "heavy traffic" stream of customers.

main

public static void main(java.lang.String[] args)