public class DStdGenerator extends Generator
DStdGenerator
generates messages according to a renewal point
process for which IAT distribution is provided/parsed. If a distribution for
the length of a message is provided/parsed it sets the message length in an
iid fashion. That is, each time a message is created, the message length is
drawn according to the given distribution. A MessageFactory may be provided
to create messages other than Message.
If a length distribution is provided, the length of the default Message
generated by the MessageFactory
is overwritten.
StdGenerator is a very flexible Generator with the following characteristics:
setInterArrivalTime()
method.
MessageFactory
, the length is adapted
by calling setLength()
of the message and passing the new length
according to the length distribution.
MessageFactory
.
StdGenerator
or during the parsing procedure.
Entity.PortAlias
Modifier and Type | Field and Description |
---|---|
protected Duration |
interArrivalTime |
protected DiscreteDistribution |
messageLengthDist |
activated, currentEventToken, messageFactory, outputPort
portAliases, ports, simNode
CREATE_INSTANCE_METHOD_NAME
Modifier | Constructor and Description |
---|---|
|
DStdGenerator(Duration iat,
DiscreteDistribution lengthdist,
SimNode ownNode) |
|
DStdGenerator(Duration iat,
DiscreteDistribution lengthdist,
SimNode ownNode,
boolean activateOnStart) |
|
DStdGenerator(Duration iat,
DiscreteDistribution lengthdist,
SimNode ownNode,
Factory<Message> factory) |
|
DStdGenerator(Duration iat,
DiscreteDistribution lengthdist,
SimNode ownNode,
Factory<Message> factory,
boolean activateOnStart)
Constructor with factory but without parsing.
|
|
DStdGenerator(Duration iat,
SimNode ownNode) |
|
DStdGenerator(Duration iat,
SimNode ownNode,
boolean activateOnStart) |
|
DStdGenerator(Duration iat,
SimNode ownNode,
Factory<Message> factory) |
|
DStdGenerator(Duration iat,
SimNode ownNode,
Factory<Message> factory,
boolean activateOnStart)
Constructor without parsing of distributions (w and w/o factory)
|
protected |
DStdGenerator(SimNode ownNode) |
protected |
DStdGenerator(SimNode ownNode,
boolean activateOnStart) |
protected |
DStdGenerator(SimNode ownNode,
Factory<Message> factory) |
protected |
DStdGenerator(SimNode ownNode,
Factory<Message> factory,
boolean activateOnStart)
to be used for subclasses parsing
|
Modifier and Type | Method and Description |
---|---|
static DStdGenerator |
createInstance(SimNode ownNode,
Parameters pars)
as required by
ReflectionConstructable |
protected Message |
createMessage() |
protected PointInTime |
getNextEventTime(PointInTime currentTime) |
void |
setInterArrivalTime(Duration interArrivalTime) |
activate, deactivate, getMessageFactory, getOutput, handleProcessEvent, setActivated, setMessageFactory
addPort, aliasPort, aliasPort, connect, disconnect, getName, getNode, getPortByName, getPorts, isPortKnown, unaliasPort
protected Duration interArrivalTime
protected DiscreteDistribution messageLengthDist
protected DStdGenerator(SimNode ownNode, Factory<Message> factory, boolean activateOnStart)
protected DStdGenerator(SimNode ownNode, boolean activateOnStart)
protected DStdGenerator(SimNode ownNode)
public DStdGenerator(Duration iat, DiscreteDistribution lengthdist, SimNode ownNode, Factory<Message> factory, boolean activateOnStart)
public DStdGenerator(Duration iat, DiscreteDistribution lengthdist, SimNode ownNode, Factory<Message> factory)
public DStdGenerator(Duration iat, DiscreteDistribution lengthdist, SimNode ownNode, boolean activateOnStart)
public DStdGenerator(Duration iat, DiscreteDistribution lengthdist, SimNode ownNode)
public DStdGenerator(Duration iat, SimNode ownNode, Factory<Message> factory, boolean activateOnStart)
public static DStdGenerator createInstance(SimNode ownNode, Parameters pars)
ReflectionConstructable
protected Message createMessage()
createMessage
in class Generator
protected PointInTime getNextEventTime(PointInTime currentTime)
getNextEventTime
in class Generator
public void setInterArrivalTime(Duration interArrivalTime)