Class IntervalGenerator
java.lang.Object
desmoj.core.simulator.NamedObject
desmoj.core.simulator.ModelComponent
desmoj.core.simulator.Schedulable
desmoj.core.simulator.Entity
de.rss.fachstudie.MiSim.entities.networking.RequestSender
de.rss.fachstudie.MiSim.entities.generator.Generator
de.rss.fachstudie.MiSim.entities.generator.IntervalGenerator
- All Implemented Interfaces:
IRequestUpdateListener,IParsableSelfScheduled,ISelfScheduled,IParsable,Comparable<IRequestUpdateListener>
public final class IntervalGenerator extends Generator
Generator that produces UserRequestArrivalEvent at a target Service Endpoint on an interval.
This generator provides the following json options to the architecture:
| Name | Default Value | Description |
| interval | NONE(required) | Interval in ms to generate requests |
| start | 0 | Starting time in ms of the generator. |
- Author:
- Lion Wagner TODO: even or randomized distribution within a simulation time unit
-
Field Summary
Fields inherited from class de.rss.fachstudie.MiSim.entities.generator.Generator
accReporter, model, operation, reporterFields inherited from class de.rss.fachstudie.MiSim.entities.networking.RequestSender
updateListenerProxyFields inherited from class desmoj.core.simulator.Schedulable
_schedule -
Constructor Summary
Constructors Constructor Description IntervalGenerator(desmoj.core.simulator.Model model, String name, boolean showInTrace, Operation operation, double interval)IntervalGenerator(desmoj.core.simulator.Model model, String name, boolean showInTrace, Operation operation, double interval, double start) -
Method Summary
Modifier and Type Method Description protected desmoj.core.simulator.TimeInstantgetFirstTargetTime()Method to compute the first or initial target time.protected desmoj.core.simulator.TimeInstantgetNextTargetTime(desmoj.core.simulator.TimeInstant lastTargetTime)Method to compute the next target time.Methods inherited from class de.rss.fachstudie.MiSim.entities.generator.Generator
doInitialSelfSchedule, eventRoutine, getLastTargetTime, getNextTargetTime, getParserClass, onRequestFailed, onRequestResultArrivedAtRequesterMethods inherited from class de.rss.fachstudie.MiSim.entities.networking.RequestSender
addUpdateListener, addUpdateListeners, sendRequest, sendRequest, sendRequest, sendRequestMethods inherited from class desmoj.core.simulator.Entity
clone, generateTraceForScheduling, getIdentNumber, getQueueingPriority, getQueues, getScheduledEvents, isEqual, isLarger, isLargerOrEqual, isNotEqual, isQueued, isSimProcess, isSmaller, isSmallerOrEqual, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, scheduleAfter, scheduleAfter, scheduleAfter, scheduleBefore, scheduleBefore, scheduleBefore, schedulePreempt, schedulePreempt, schedulePreempt, setQueueingPriorityMethods inherited from class desmoj.core.simulator.Schedulable
assignReporter, cancel, getCorrespondingReportable, isCurrent, isScheduled, rename, reSchedule, reSchedule, reSchedulePreempt, scheduledNext, setCorrespondingReportableMethods inherited from class desmoj.core.simulator.ModelComponent
current, currentEntity, currentEntityAll, currentEvent, currentlySendDebugNotes, currentlySendTraceNotes, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOnMethods inherited from class desmoj.core.simulator.NamedObject
getName, getQuotedName, toStringMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.rss.fachstudie.MiSim.entities.networking.IRequestUpdateListener
compareTo, getListeningPriority, onRequestArrivalAtTarget, onRequestSend
-
Constructor Details
-
IntervalGenerator
-
IntervalGenerator
-
-
Method Details
-
getNextTargetTime
protected desmoj.core.simulator.TimeInstant getNextTargetTime(desmoj.core.simulator.TimeInstant lastTargetTime)Description copied from class:GeneratorMethod to compute the next target time. Called by the superclass upon need for a new target TimeInstance. Provides the TimeInstance of last scheduling.Can return
nullor throw aGeneratorStopExceptionto stop the generator.- Specified by:
getNextTargetTimein classGenerator- Parameters:
lastTargetTime- last target time- Returns:
- the next target time
-
getFirstTargetTime
protected desmoj.core.simulator.TimeInstant getFirstTargetTime()Description copied from class:GeneratorMethod to compute the first or initial target time. Called by the superclass upon need for the first TimeInstance. Should return a constant value.Can return
nullor throw aGeneratorStopExceptionto stop the generator.- Specified by:
getFirstTargetTimein classGenerator- Returns:
- the point in simulation time when the first request should be sent by this generator
-