Package jline.lang
Class ClosedSignal
java.lang.Object
jline.lang.Element
jline.lang.NetworkElement
jline.lang.JobClass
jline.lang.ClosedClass
jline.lang.ClosedSignal
- All Implemented Interfaces:
Serializable,Copyable
A closed signal class for modeling signals in closed queueing networks.
ClosedSignal is a specialized ClosedClass for signals that need to circulate in closed networks. Unlike regular Signal (which extends OpenClass), ClosedSignal can be used in networks without Source/Sink nodes.
ClosedSignal has zero population - signals are created dynamically through class switching from the target job class.
Signal types:
- NEGATIVE: Removes a job from the destination queue
- REPLY: Unblocks servers waiting for a reply (LQN synchronous call semantics)
- See Also:
-
Field Summary
Fields inherited from class jline.lang.ClosedClass
model, population -
Constructor Summary
ConstructorsConstructorDescriptionClosedSignal(Network model, String name, SignalType signalType, Station refstat) Creates a new closed signal class with the specified type, reference station, and default priority (0).ClosedSignal(Network model, String name, SignalType signalType, Station refstat, int priority) Creates a new closed signal class with the specified type, reference station, and priority.ClosedSignal(Network model, String name, SignalType signalType, Station refstat, int priority, DiscreteDistribution removalDistribution, RemovalPolicy removalPolicy) Creates a new closed signal class with full configuration for batch removal.ClosedSignal(Network model, String name, Station refstat) Creates a new negative closed signal class with default priority (0). -
Method Summary
Modifier and TypeMethodDescriptionforJobClass(JobClass jobClass) Associates this signal with a job class.Gets the removal distribution for this negative signal.Gets the removal policy for this negative signal.Gets the signal type for this signal class.Gets the associated job class.intGets the index of the associated job class.booleanReturns whether this signal is a catastrophe (removes all jobs).voidPrints a summary of this closed signal class configuration.voidsetRemovalDistribution(DiscreteDistribution removalDistribution) Sets the removal distribution for this negative signal.voidsetRemovalPolicy(RemovalPolicy removalPolicy) Sets the removal policy for this negative signal.voidsetSignalType(SignalType signalType) Sets the signal type for this signal class.Methods inherited from class jline.lang.ClosedClass
getNumberOfJobs, getPopulation, getReferenceStation, setPopulationMethods inherited from class jline.lang.JobClass
expectsReply, getAttribute, getBalkingStrategy, getBalkingThresholds, getCompletes, getDeadline, getImpatienceType, getIndex, getJobClassType, getMaxRetrialAttempts, getPatience, getPriority, getReplySignalClassIndex, getRetrialDelayDistribution, hasBalking, hasImmediateFeedback, hasPatience, hasRetrial, isReferenceClass, isReferenceStation, setAttribute, setBalking, setBalking, setCompletes, setDeadline, setImmediateFeedback, setPatience, setPatience, setPriority, setReferenceClass, setReferenceStation, setReplySignalClassIndex, setRetrial, setRetrial
-
Constructor Details
-
ClosedSignal
public ClosedSignal(Network model, String name, SignalType signalType, Station refstat, int priority, DiscreteDistribution removalDistribution, RemovalPolicy removalPolicy) Creates a new closed signal class with full configuration for batch removal.- Parameters:
model- the network model to add this class toname- the name for this signal classsignalType- the type of signal (NEGATIVE or REPLY)refstat- the reference station (should match target job class)priority- the priority level for signals in this classremovalDistribution- the distribution for number of jobs to remove (null for exactly 1)removalPolicy- the policy for selecting which jobs to remove
-
ClosedSignal
public ClosedSignal(Network model, String name, SignalType signalType, Station refstat, int priority) Creates a new closed signal class with the specified type, reference station, and priority. Uses default removal behavior (remove exactly 1 job, random selection).- Parameters:
model- the network model to add this class toname- the name for this signal classsignalType- the type of signal (NEGATIVE or REPLY)refstat- the reference station (should match target job class)priority- the priority level for signals in this class
-
ClosedSignal
Creates a new closed signal class with the specified type, reference station, and default priority (0). Uses default removal behavior (remove exactly 1 job, random selection).- Parameters:
model- the network model to add this class toname- the name for this signal classsignalType- the type of signal (NEGATIVE or REPLY)refstat- the reference station (should match target job class)
-
ClosedSignal
Creates a new negative closed signal class with default priority (0). Uses default removal behavior (remove exactly 1 job, random selection).- Parameters:
model- the network model to add this class toname- the name for this signal classrefstat- the reference station
-
-
Method Details
-
getSignalType
Gets the signal type for this signal class.- Returns:
- the signal type
-
setSignalType
Sets the signal type for this signal class.- Parameters:
signalType- the new signal type
-
forJobClass
Associates this signal with a job class.For REPLY signals, this specifies which job class's servers will be unblocked when this signal arrives.
- Parameters:
jobClass- the JobClass to associate with this signal- Returns:
- this ClosedSignal instance (for method chaining)
-
getTargetJobClass
Gets the associated job class.- Returns:
- the JobClass associated with this signal, or null if none
-
getTargetJobClassIndex
public int getTargetJobClassIndex()Gets the index of the associated job class.- Returns:
- the index of the associated JobClass, or -1 if none
-
getRemovalDistribution
Gets the removal distribution for this negative signal.- Returns:
- the removal distribution, or null for single removal
-
setRemovalDistribution
Sets the removal distribution for this negative signal.- Parameters:
removalDistribution- the distribution for number of removals
-
getRemovalPolicy
Gets the removal policy for this negative signal.- Returns:
- the removal policy (RANDOM, FCFS, or LCFS)
-
setRemovalPolicy
Sets the removal policy for this negative signal.- Parameters:
removalPolicy- the policy for selecting customers to remove
-
isCatastrophe
public boolean isCatastrophe()Returns whether this signal is a catastrophe (removes all jobs).- Returns:
- true if signalType is CATASTROPHE
-
printSummary
public void printSummary()Prints a summary of this closed signal class configuration.- Overrides:
printSummaryin classClosedClass
-