|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.tudelft.simulation.event.EventProducer
nl.tudelft.simulation.dsol.formalisms.flow.Station
nl.tudelft.simulation.dsol.formalisms.flow.Generator
This class defines a generator
(c) copyright 2003 Delft
University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public
License (GPL) , no warranty
| Field Summary | |
protected nl.tudelft.simulation.language.reflection.SerializableConstructor |
constructor
constructor refers to the constructor to be invoked |
protected java.lang.Object[] |
constructorArguments
constructorArguments refer to the arguments invoked by the |
static nl.tudelft.simulation.event.EventType |
CREATE_EVENT
CREATE_EVENT is fired on creation |
protected nl.tudelft.simulation.jstats.distributions.DistContinuous |
interval
interval defines the inter construction time |
protected SimEvent |
nextEvent
nextEvent refers to the next simEvent |
protected nl.tudelft.simulation.jstats.distributions.DistContinuous |
startTime
startTime defines the absolute startTime for the generator |
| Fields inherited from class nl.tudelft.simulation.dsol.formalisms.flow.Station |
destination, simulator |
| Fields inherited from class nl.tudelft.simulation.event.EventProducer |
listeners |
| Fields inherited from interface nl.tudelft.simulation.dsol.formalisms.flow.StationInterface |
RECEIVE_EVENT, RELEASE_EVENT |
| Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface |
FIRST_POSITION, LAST_POSITION |
| Constructor Summary | |
Generator(DEVSSimulatorInterface simulator,
java.lang.Class myClass,
java.lang.Object[] constructorArguments)
constructs a new generator for objects in a simulation. |
|
| Method Summary | |
void |
generate()
generates a new entity with the basic constructorArguments |
void |
generate(java.lang.Object[] constructorArguments)
generates a new entity |
nl.tudelft.simulation.jstats.distributions.DistDiscrete |
getBatchSize()
returns the batchSize |
nl.tudelft.simulation.jstats.distributions.DistContinuous |
getInterval()
returns the interarrival intercal |
long |
getMaxNumber()
returns the maximum number of entities to be created |
nl.tudelft.simulation.jstats.distributions.DistContinuous |
getStartTime()
returns the startTime of the generator |
void |
receiveObject(java.lang.Object object)
receives an object is invoked whenever an entity arrives |
void |
setBatchSize(nl.tudelft.simulation.jstats.distributions.DistDiscrete batchSize)
sets the batchsize of the generator |
void |
setInterval(nl.tudelft.simulation.jstats.distributions.DistContinuous interval)
sets the interarrival distribution |
void |
setMaxNumber(long maxNumber)
sets the maximum number of entities to be created |
void |
setStartTime(nl.tudelft.simulation.jstats.distributions.DistContinuous startTime)
sets the startTime |
| Methods inherited from class nl.tudelft.simulation.dsol.formalisms.flow.Station |
getDestination, releaseObject, setDestination |
| Methods inherited from class nl.tudelft.simulation.event.EventProducer |
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface nl.tudelft.simulation.event.EventProducerInterface |
addListener, addListener, addListener, addListener, getEventTypes, removeListener |
| Field Detail |
public static final nl.tudelft.simulation.event.EventType CREATE_EVENT
protected java.lang.Object[] constructorArguments
protected nl.tudelft.simulation.jstats.distributions.DistContinuous interval
protected nl.tudelft.simulation.jstats.distributions.DistContinuous startTime
protected nl.tudelft.simulation.language.reflection.SerializableConstructor constructor
protected SimEvent nextEvent
| Constructor Detail |
public Generator(DEVSSimulatorInterface simulator,
java.lang.Class myClass,
java.lang.Object[] constructorArguments)
throws SimRuntimeException
simulator - is the on which the construction of the objects must be
scheduled.myClass - is the class of which entities are createdconstructorArguments - are the parameters for the constructor of
myClass. of arguments.
constructorArgument[n]=new Integer(12) may have
constructorArgumentClasses[n]=int.class;
SimRuntimeException - on constructor invokation.| Method Detail |
public void generate()
throws SimRuntimeException
SimRuntimeException - on construction failure
public void generate(java.lang.Object[] constructorArguments)
throws SimRuntimeException
constructorArguments - are the parameters used in the constructor.
SimRuntimeException - on construction failurepublic void receiveObject(java.lang.Object object)
StationInterface
receiveObject in interface StationInterfacereceiveObject in class StationStationInterface.receiveObject(Object)public nl.tudelft.simulation.jstats.distributions.DistDiscrete getBatchSize()
public nl.tudelft.simulation.jstats.distributions.DistContinuous getInterval()
public long getMaxNumber()
public void setBatchSize(nl.tudelft.simulation.jstats.distributions.DistDiscrete batchSize)
batchSize - is the number of entities simultaniously constructedpublic void setInterval(nl.tudelft.simulation.jstats.distributions.DistContinuous interval)
interval - is the interarrival timepublic void setMaxNumber(long maxNumber)
maxNumber - is the maxNumberpublic nl.tudelft.simulation.jstats.distributions.DistContinuous getStartTime()
public void setStartTime(nl.tudelft.simulation.jstats.distributions.DistContinuous startTime)
startTime - is the absolute startTime
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||