Class Burst
java.lang.Object
simEngine.SimEntity
QueueNet.NetNode
random.Burst
- All Implemented Interfaces:
Distribution, StorableDistribution
This is the Burst distribution.
Copyright (c) 2003
Politecnico di Milano - dipartimento di Elettronica e Informazione
Copyright (c) 2003
Politecnico di Milano - dipartimento di Elettronica e Informazione
- Author:
- Federico Dal Castello
-
Field Summary
Fields inherited from class NetNode
EXCEPTION_ENABLING_SECTION_ALREADY_DEFINED, EXCEPTION_INPUT_SECTION_ALREADY_DEFINED, EXCEPTION_MEASURE_DOES_NOT_EXIST, EXCEPTION_OUTPUT_SECTION_ALREADY_DEFINED, EXCEPTION_PROPERTY_NOT_AVAILABLE, EXCEPTION_SERVICE_SECTION_ALREADY_DEFINED, EXCEPTION_UNABLE_TO_BROADCAST, inputSection, logger, network, outputSection, PROPERTY_ID_ARRIVING_JOBS, PROPERTY_ID_DEPARTING_JOBS, PROPERTY_ID_RESIDENCE_TIME, PROPERTY_ID_RESIDENT_JOBS, serviceSection -
Constructor Summary
ConstructorsConstructorDescriptionBurst(Double probability, DistributionContainer distrContA, DistributionContainer distrContB) Creates a new non-Round-Robin Burst distribution with the specified probability of having events of type A.Burst(Double probability, DistributionContainer distrContA, DistributionContainer distrContB, Boolean isRoundRobin) Creates a new Burst distribution with the specified probability of having events of type A. -
Method Summary
Modifier and TypeMethodDescriptiondoubleThis method is used to obtain from the distribution its cumulative distribution function evaluated where required by the user.booleanVerifies if the parameters are correct.protected voiddispatch(NetMessage message) Message dispatcher for Burst distribution.voiddoubleThis method is used to obtain from the distribution the next number distributed according to the distribution parameter and the actual interval (A or B).doubleThis method is used to obtain from the distribution its probability distribution function evaluated where required by the user.protected voidsendMe(double delay, int eventType) Send an event to this entity with no data, specifying the delivery delay and the event type.voidsetRandomEngine(RandomEngine engine) doubleThis method is used to obtain from the distribution the value of its own theoretic mean.doubleThis method is used to obtain from the distribution the value of its own theoretic variance.Methods inherited from class NetNode
addSection, analyze, analyze, body, connect, getBlockingRegionInputStation, getClassCompatibilities, getDoubleNodeProperty, getDoubleNodeProperty, getGlobalJobInfoList, getInputNodes, getIntNodeProperty, getIntNodeProperty, getJobClasses, getJobInfoList, getNetSystem, getObjectNodeProperty, getObjectNodeProperty, getOutputNodes, getQueueNet, getSection, getServer, getServerTypes, getSimParameters, initializeSections, isBlockingRegionInputStation, isRunning, isSink, poison, receive, removeJobFromNodeJobsList, removeJobFromNodeJobsListOnly, restart, setBlockingRegionInputStation, setServer, setSimParameters, startMethods inherited from class SimEntity
getEvbuf, getId, getName, getWaitingPred, setSimSystem, simCancel, simCurrent, simGetNext, simGetNext, simHold, simHoldFor, simPutback, simSchedule, simSchedule, simSelect, simUnschedule, simWait, simWaitFor, simWaiting, simWaiting
-
Constructor Details
-
Burst
public Burst(Double probability, DistributionContainer distrContA, DistributionContainer distrContB, Boolean isRoundRobin) throws IncorrectDistributionParameterException Creates a new Burst distribution with the specified probability of having events of type A.distrContAis the DistributionContainer containing the length distribution A and the related parameters, whiledistrContBis the same ofdistrContAbut for distribution B.- Parameters:
probability- the probability of having events of type AdistrContA- the DistributionContainer containing the length distribution A and the related parameterdistrContB- the DistributionContainer containing the length distribution A and the related parameterisRoundRobin- iftrue, the behavior of the interval change is set to Round-Robin. That is, there is a pure alternation of the interval types, starting with interval A: A-B-A-B-A-B-A-B... In this case, the probability parameter is ignored. Iffalse, the interval type is changed according to the probability parameter- Throws:
IncorrectDistributionParameterException- if the probability is not a value comprised between 0 and 1
-
Burst
public Burst(Double probability, DistributionContainer distrContA, DistributionContainer distrContB) throws IncorrectDistributionParameterException Creates a new non-Round-Robin Burst distribution with the specified probability of having events of type A.distrContAis the DistributionContainer containing the length distribution A and the related parameters, whiledistrContBis the same ofdistrContAbut for distribution B.- Parameters:
probability- the probability of having events of type AdistrContA- the DistributionContainer containing the length distribution A and the related parameterdistrContB- the DistributionContainer containing the length distribution A and the related parameter- Throws:
IncorrectDistributionParameterException- if the probability is not a value comprised between 0 and 1
-
-
Method Details
-
setRandomEngine
- Specified by:
setRandomEnginein interfaceDistribution
-
initialize
-
check
Verifies if the parameters are correct. For the burst distribution the parameters are correct if the value of the probability is comprised between 0 and 1.- Parameters:
probability- the probability- Returns:
trueif the probability is correct;falseotherwise
-
cdf
Description copied from interface:DistributionThis method is used to obtain from the distribution its cumulative distribution function evaluated where required by the user.- Specified by:
cdfin interfaceDistribution- Parameters:
x- the x valuep- the p value- Returns:
- always 0 because in this type of distribution it has no sense to request the cdf of the distribution.
- Throws:
IncorrectDistributionParameterException- if the operation cannot be completed
-
pdf
Description copied from interface:DistributionThis method is used to obtain from the distribution its probability distribution function evaluated where required by the user.- Specified by:
pdfin interfaceDistribution- Parameters:
x- the x valuep- the p value- Returns:
- always 0 because in this type of distribution it has no sense to request the pdf of the distribution.
- Throws:
IncorrectDistributionParameterException- if the operation cannot be completed
-
theorMean
This method is used to obtain from the distribution the value of its own theoretic mean.- Specified by:
theorMeanin interfaceDistribution- Parameters:
p- parameter of the constant distribution.- Returns:
- double with the theoretic mean of the distribution.
- Throws:
IncorrectDistributionParameterException
-
theorVariance
Description copied from interface:DistributionThis method is used to obtain from the distribution the value of its own theoretic variance.- Specified by:
theorVariancein interfaceDistribution- Parameters:
p- the p value- Returns:
- always 0 because in this type of distribution it has no sense to request the variance of the distribution.
- Throws:
IncorrectDistributionParameterException- if the operation cannot be completed
-
nextRand
This method is used to obtain from the distribution the next number distributed according to the distribution parameter and the actual interval (A or B).- Specified by:
nextRandin interfaceDistribution- Parameters:
p- parameter of the burst distribution- Returns:
- double with the next random number of this distribution, according to the actual interval (A or B)
- Throws:
IncorrectDistributionParameterException- if the value distributions parameter are not correct
-
sendMe
protected void sendMe(double delay, int eventType) Send an event to this entity with no data, specifying the delivery delay and the event type.- Parameters:
delay- how long from the current simulation time the event should be senteventType- an user-defined number representing the type of event
-
dispatch
Message dispatcher for Burst distribution. When an EVENT_DISTRIBUTION_CHANGE message arrives, it chooses the new interval type based on the probability and sends to itself a new EVENT_DISTRIBUTION_CHANGE message with a delay generated by the chosen interval. Otherwise it discards the message, if it is set to discard.- Overrides:
dispatchin classNetNode- Throws:
NetException
-