/*invcust.s */
/***************************************************************************
invcust()
*****************************************************************************
This star generates inventory customers.
The customers each have an inter arrival time and a product demand.
The inter arrival time is packaged with the product demand into a complex
data structure and output.
The real part of the complex data structure is the inter arrival time.
The imaginary part is the product demand.
The first parameter, which defaults to NUMBER_SAMPLES,
tells how many total samples to send out.
CONTROL PARAMETERS:
num_of_samples = total number of samples to output.
pace_rate = multiplies the number of samples received
on pace input (if connected) to determine
how many samples to output.
samples_first_time = the number of samples to put out on the
first call if pace input connected. It can
be zero. negative values = 0.
CONTROL DESCRIPTION:
If the pace input is not connected:
The num_of_samples parameter sets the maximum number of samples
that the star will output. If num_of_samples < 0, an indefinite
number of samples can be output.
The star will output a maximum of NUMBER_SAMPLES on each call.
If the pace input is connected:
The num_of_samples parameter sets the maximum number of samples
that the star will output. If num_samples_out < 0, an infinite
number of samples can be output.
The pace input paces the number of output samples on each call.
At each call of the star all samples are read from the pace input
and a running total of how many there have been is kept.
An output_target is computed at each pass = pace_input_total *
pace_rate. If pace_rate < 0, the absolute value is used.
On the first call:
output = lesser of (samples_first_time, num_of_samples)
On subsequent calls:
output = lesser of (NUMBER_SAMPLES, output_target)
output_target = samples_first_time +
pace_rate * pace_input_total - to that point
The total number of samples that will be output:
samples_out_total = lesser of (num_of_samples,
samples_first_time + pace_rate * pace_input_total)
invcust
This star generates inventory customers.
The customers each have an inter arrival time and a product demand.
The inter arrival time is packaged with the product demand into a complex
data structure and output.
The real part of the complex data structure is the inter arrival time.
The imaginary part is the product demand.
The first parameter, which defaults to NUMBER_SAMPLES,
tells how many total samples to send out.
CONTROL PARAMETERS:
num_of_samples = total number of samples to output.
pace_rate = multiplies the number of samples received
on pace input (if connected) to determine
how many samples to output.
samples_first_time = the number of samples to put out on the
first call if pace input connected. It can
be zero. negative values = 0.
CONTROL DESCRIPTION:
If the pace input is not connected:
The num_of_samples parameter sets the maximum number of samples
that the star will output. If num_of_samples < 0, an indefinite
number of samples can be output.
The star will output a maximum of NUMBER_SAMPLES on each call.
If the pace input is connected:
The num_of_samples parameter sets the maximum number of samples
that the star will output. If num_samples_out < 0, an infinite
number of samples can be output.
The pace input paces the number of output samples on each call.
At each call of the star all samples are read from the pace input
and a running total of how many there have been is kept.
An output_target is computed at each pass = pace_input_total *
pace_rate. If pace_rate < 0, the absolute value is used.
On the first call:
output = lesser of (samples_first_time, num_of_samples)
On subsequent calls:
output = lesser of (NUMBER_SAMPLES, output_target)
output_target = samples_first_time +
pace_rate * pace_input_total - to that point
The total number of samples that will be output:
samples_out_total = lesser of (num_of_samples,
samples_first_time + pace_rate * pace_input_total)
Sasan Ardalan
*/