public class TandemQueueAssembly extends BasicAssembly
This is an example of multiple SimEntities that fire identical property names. This is
overcome by using instances of MultipleSimpleStatsTally
as the
designPointStats instances. The IndexedPropertyChange event is the one listened for here,
and they are separated by index - each instance of MultipleSimpleStatsTally
listens for an IndexedPropertyChangeEvent of the same base name, so two are required, one
for numberInQueue and one for numberAvailableServers.
This also illustrates the use of the Adapter class to make the tandem queue model work. Each adapter instance hears an EndService event and schedules an Arrival event, which is then heard by the following station. All the listening must be established in hookupSimEventListeners().
designPointStats, hookupsCalled, LOGGER, propertyChangeListener, propertyChangeSupport, replicationData, replicationStats, simEntity, stopped
Constructor and Description |
---|
TandemQueueAssembly() |
Modifier and Type | Method and Description |
---|---|
protected void |
createDesignPointStats()
Use MultipleSimpleStatsTally to listen to the means for the replicationStats.
|
protected void |
createReplicationStats()
Create the replicationStats array.
|
protected void |
createSimEntities()
Create the SimEntities and the adapters.
|
void |
hookupReplicationListeners()
The three workstations are listened to, not the ArrivalProcess.
|
protected void |
hookupSimEventListeners()
Set up SimEventListeners, including adapters.
|
static void |
main(java.lang.String[] args)
Use the form of setting parameters in main, leaving the unset parameters
to their defaults.
|
createObjects, createPropertyChangeListeners, getDesignPointID, getDesignPointStats, getIDforReplicationStateName, getNumberReplications, getReplicationData, getReplicationReport, getReplicationStat, getReplicationStats, getSimEntities, getStopTime, getSummaryReport, handleSimEvent, hookupDesignPointListeners, hookupPropertyChangeListeners, init, isPrintReplicationReports, isPrintSummaryReport, isReallyVerbose, isSaveReplicationData, isSingleStep, isStopped, isVerbose, performHookups, processSimEvent, replicationDidFinish, reset, run, saveReplicationStats, scheduleDidReset, scheduleWillReset, setDesignPointID, setNumberReplications, setPrintReplicationReports, setPrintSummaryReport, setReallyVerbose, setSaveReplicationData, setSingleStep, setStopTime, setVerbose, simulationDidFinish, simulationWillBeStopped, stop
protected void createSimEntities()
createSimEntities
in class BasicAssembly
protected void createReplicationStats()
createReplicationStats
in class BasicAssembly
protected void hookupSimEventListeners()
hookupSimEventListeners
in class BasicAssembly
public void hookupReplicationListeners()
hookupReplicationListeners
in class BasicAssembly
protected void createDesignPointStats()
createDesignPointStats
in class BasicAssembly
public static void main(java.lang.String[] args)
args
- the command line arguments