Package jline.lang.nodes
Class Station
- All Implemented Interfaces:
Serializable,Copyable
- Direct Known Subclasses:
Join,Place,ServiceStation,Source
A node where jobs can spend time stationing there
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<JobClass, BalkingStrategy> protected Map<JobClass, List<BalkingThreshold>> protected intprotected Map<JobClass, DropStrategy> protected Map<JobClass, ImpatienceType> protected SerializableFunction<Matrix, Double> protected Matrixprotected Matrixprotected Matrixprotected Matrixprotected intprotected Map<JobClass, Distribution> protected Map<JobClass, Distribution> protected Map<JobClass, Map<JobClass, Distribution>> Fields inherited from class jline.lang.nodes.ServiceNode
schedPolicy, schedStrategy, schedStrategyPar, serviceProcessesFields inherited from class jline.lang.nodes.Node
dropStrategy, input, model, nodeIndex, output, server, statefulIdx, stationIdx -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBalkingStrategy(JobClass jobClass) Gets the effective balking strategy for a specific job class.getBalkingStrategyLocal(JobClass jobClass) Gets the station-specific balking strategy (without fallback).getBalkingThresholds(JobClass jobClass) Gets the effective balking thresholds for a specific job class.getBalkingThresholdsLocal(JobClass jobClass) Gets the station-specific balking thresholds (without fallback).doublegetCap()Returns the total capacity limit for this node.doublegetClassCap(JobClass jobClass) Returns the capacity limit for a specific job class at this node.getDropRule(JobClass jobclass) Gets the drop strategy for a specific job class when capacity is exceeded.getImpatienceType(JobClass jobClass) Gets the effective impatience type for a specific job class.getImpatienceTypeLocal(JobClass jobClass) Gets the station-specific impatience type (without fallback).Gets the limited class-dependent scaling function for this station.Gets the limited joint-class-dependent scaling tables for this station.Gets the per-class cutoffs for joint class dependence.Gets the limited joint-dependent scaling matrix for this station.Gets the per-class cutoffs for joint dependence.Gets the limited load-dependent scaling matrix for this station.intgetMaxRetrialAttempts(JobClass jobClass) Gets the effective maximum retrial attempts for a specific job class.getMaxRetrialAttemptsLocal(JobClass jobClass) Gets the station-specific maximum retrial attempts (without fallback).intgetPatience(JobClass jobClass) Gets the effective patience distribution for a specific job class.getPatienceLocal(JobClass jobClass) Gets the station-specific patience distribution (without fallback).getRetrialDelayDistribution(JobClass jobClass) Gets the effective retrial delay distribution for a specific job class.getRetrialDelayDistributionLocal(JobClass jobClass) Gets the station-specific retrial delay distribution (without fallback).Returns the scheduling strategy used by this station.Gets the service rates configured for all job classes at this station.Gets the source (arrival) rates for all job classes at this station.getSwitchoverTime(JobClass fromClass, JobClass toClass) Gets the switchover time from one job class to another.booleanhasBalking(JobClass jobClass) Checks if balking is configured for a job class (local or global).booleanhasBalkingLocal(JobClass jobClass) Checks if balking is configured locally at this station.booleanhasPatience(JobClass jobClass) Checks if patience is configured for a job class (local or global).booleanhasPatienceLocal(JobClass jobClass) Checks if patience is configured locally at this station.booleanhasRetrial(JobClass jobClass) Checks if retrial is configured for a job class (local or global).booleanhasRetrialLocal(JobClass jobClass) Checks if retrial is configured locally at this station.booleanhasSwitchoverTime(JobClass fromClass, JobClass toClass) Checks if a switchover time is set for the given job class pair.booleanChecks if this node is a reference station.boolean[]Checks which job classes have defined service processes.booleanisServiceDefined(JobClass jobClass) Checks if a specific job class has a defined service process.boolean[]Checks which job classes have disabled service processes.booleanisServiceDisabled(JobClass jobClass) Checks if a specific job class has a disabled service process.voidsetBalking(JobClass jobClass, BalkingStrategy strategy, int minJobs, double probability) Sets the balking configuration using a single threshold.voidsetBalking(JobClass jobClass, BalkingStrategy strategy, List<BalkingThreshold> thresholds) Sets the balking configuration for a specific job class at this station.voidsetCap(int cap) Alias for setCapacity() for backwards compatibility.voidsetCapacity(int cap) Sets the total capacity limit for this station.voidsetChainCapacity(double[] values) Sets the capacity for each chain in the network.voidsetClassCap(JobClass jobClass, int cap) Sets the capacity limit for a specific job class at this station.voidsetDropRule(JobClass jobclass, DropStrategy drop) Sets the drop strategy for a specific job class when capacity is exceeded.voidSets the limited class-dependent scaling function for this station.voidsetLimitedJointClassDependence(Map<JobClass, Matrix> scalingTables, Matrix cutoffs) Sets the limited joint-class-dependent scaling for this station.voidsetLimitedJointDependence(Matrix scalingTable, Matrix cutoffs) Sets the limited joint-dependent scaling for this station.voidsetLimitedLoadDependence(Matrix alpha) Sets the limited load-dependent scaling matrix for this station.voidsetNumberOfServers(int numberOfServers) Sets the number of servers at this station.voidsetPatience(JobClass jobClass, ImpatienceType impatienceType, Distribution distribution) Sets the impatience type and distribution for a specific job class at this station.voidsetPatience(JobClass jobClass, Distribution distribution) Sets the patience distribution for a specific job class at this station.voidsetRetrial(JobClass jobClass, Distribution delayDistribution) Sets the retrial configuration with unlimited retry attempts.voidsetRetrial(JobClass jobClass, Distribution delayDistribution, int maxAttempts) Sets the retrial configuration for a specific job class at this station.voidsetSwitchoverTime(JobClass fromClass, JobClass toClass, Distribution switchoverTime) Sets the switchover time from one job class to another.Methods inherited from class jline.lang.nodes.ServiceNode
getSchedStrategyPar, getServiceProcess, setService, setServiceMethods inherited from class jline.lang.nodes.StatefulNode
clearState, getState, getStatefulIndex, getStatePrior, getStateSpace, resetStateSpace, setState, setState, setStatePrior, setStateSpaceMethods inherited from class jline.lang.nodes.Node
getAttribute, getDropStrategy, getInput, getModel, getNodeIndex, getOutput, getOutputStrategies, getRoutingStrategy, getSections, getServer, getStatefulIdx, getStationIdx, isStateful, printSummary, reset, resetRouting, setKChoicesRouting, setModel, setNodeIdx, setProbRouting, setRLRouting, setRouting, setRouting, setStationIdx
-
Field Details
-
numberOfServers
protected int numberOfServers -
cap
protected int cap -
classCap
-
dropRule
-
lldScaling
-
lcdScaling
-
ljdScaling
-
ljdCutoffs
-
ljcdScaling
-
ljcdCutoffs
-
switchoverTimes
-
patienceDistributions
-
impatienceTypes
-
balkingStrategies
-
balkingThresholds
-
retrialDelayDistributions
-
retrialMaxAttempts
-
-
Constructor Details
-
Station
Creates a new station with the specified name. Initializes default capacity, scheduling, and service configurations.- Parameters:
name- the name for this station
-
-
Method Details
-
getCap
public double getCap()Description copied from class:NodeReturns the total capacity limit for this node. Default implementation returns infinite capacity. -
setCapacity
public void setCapacity(int cap) Sets the total capacity limit for this station. Capacity follows Kendall notation where K = total system capacity (queue + in-service).- Parameters:
cap- the maximum number of jobs that can be at this station
-
setCap
public void setCap(int cap) Alias for setCapacity() for backwards compatibility.- Parameters:
cap- the maximum number of jobs that can be at this station
-
getClassCap
Description copied from class:NodeReturns the capacity limit for a specific job class at this node. Default implementation returns infinite capacity.- Overrides:
getClassCapin classNode- Parameters:
jobClass- the job class to query- Returns:
- the capacity limit for the job class
-
getDropRule
Gets the drop strategy for a specific job class when capacity is exceeded.- Parameters:
jobclass- the job class to query- Returns:
- the drop strategy for the job class, or null if not set
-
getLimitedClassDependence
Gets the limited class-dependent scaling function for this station.- Returns:
- the class-dependent scaling function, or null if not set
-
setLimitedClassDependence
Sets the limited class-dependent scaling function for this station.- Parameters:
gamma- the class-dependent scaling function
-
getLimitedLoadDependence
Gets the limited load-dependent scaling matrix for this station.- Returns:
- the load-dependent scaling matrix
-
setLimitedLoadDependence
Sets the limited load-dependent scaling matrix for this station.- Parameters:
alpha- the load-dependent scaling matrix
-
getLimitedJointDependence
Gets the limited joint-dependent scaling matrix for this station.- Returns:
- the joint-dependent scaling matrix (linearized)
-
getLimitedJointDependenceCutoffs
Gets the per-class cutoffs for joint dependence.- Returns:
- the cutoffs matrix [N1, N2, ..., NR]
-
setLimitedJointDependence
Sets the limited joint-dependent scaling for this station.- Parameters:
scalingTable- the linearized scaling tablecutoffs- the per-class cutoffs [N1, N2, ..., NR]
-
getLimitedJointClassDependence
Gets the limited joint-class-dependent scaling tables for this station. Each class has its own scaling table indexed by population vector.- Returns:
- map from JobClass to scaling matrix
-
getLimitedJointClassDependenceCutoffs
Gets the per-class cutoffs for joint class dependence.- Returns:
- the cutoffs matrix [N1, N2, ..., NR]
-
setLimitedJointClassDependence
Sets the limited joint-class-dependent scaling for this station. Unlike setLimitedJointDependence which uses a single table for all classes, this method allows each class to have its own scaling table indexed by the population vector (n1, n2, ..., nK).- Parameters:
scalingTables- map from JobClass to linearized scaling tablecutoffs- the per-class cutoffs [N1, N2, ..., NR]
-
getNumberOfServers
public int getNumberOfServers()- Overrides:
getNumberOfServersin classStatefulNode
-
setNumberOfServers
public void setNumberOfServers(int numberOfServers) Sets the number of servers at this station.- Parameters:
numberOfServers- the number of servers (use Integer.MAX_VALUE for infinite servers)
-
getSchedStrategy
Returns the scheduling strategy used by this station.- Overrides:
getSchedStrategyin classServiceNode- Returns:
- the scheduling strategy (FCFS, PS, etc.)
-
getServiceRates
Gets the service rates configured for all job classes at this station. Returns a list containing rate values or Distribution objects.- Returns:
- list of service rates for each job class
-
getSourceRates
Gets the source (arrival) rates for all job classes at this station. Only applicable for source nodes.- Returns:
- list of source rates for each job class
-
isReferenceStation
public boolean isReferenceStation()Description copied from class:NodeChecks if this node is a reference station. Default implementation returns false; override in subclasses as needed.- Overrides:
isReferenceStationin classNode- Returns:
- true if this is a reference station, false otherwise
-
isServiceDefined
public boolean[] isServiceDefined()Checks which job classes have defined service processes.- Returns:
- array indicating which classes have defined service processes
-
isServiceDefined
Checks if a specific job class has a defined service process.- Parameters:
jobClass- the job class to check- Returns:
- true if service is defined for this class, false otherwise
-
isServiceDisabled
public boolean[] isServiceDisabled()Checks which job classes have disabled service processes.- Returns:
- array indicating which classes have disabled service processes
-
isServiceDisabled
Checks if a specific job class has a disabled service process.- Parameters:
jobClass- the job class to check- Returns:
- true if service is disabled for this class, false otherwise
-
setChainCapacity
public void setChainCapacity(double[] values) Sets the capacity for each chain in the network. Configures per-class capacity based on chain membership and service availability. -
setClassCap
Sets the capacity limit for a specific job class at this station.- Parameters:
jobClass- the job class to set capacity forcap- the maximum number of jobs of this class
-
setDropRule
Sets the drop strategy for a specific job class when capacity is exceeded.- Parameters:
jobclass- the job class to configuredrop- the drop strategy to apply
-
setSwitchoverTime
Sets the switchover time from one job class to another. This is used for class-to-class switchover functionality.- Parameters:
fromClass- the job class to switch fromtoClass- the job class to switch toswitchoverTime- the switchover time distribution
-
getSwitchoverTime
Gets the switchover time from one job class to another.- Parameters:
fromClass- the job class to switch fromtoClass- the job class to switch to- Returns:
- the switchover time distribution, or null if not set
-
hasSwitchoverTime
Checks if a switchover time is set for the given job class pair.- Parameters:
fromClass- the job class to switch fromtoClass- the job class to switch to- Returns:
- true if switchover time is set, false otherwise
-
setPatience
Sets the patience distribution for a specific job class at this station. Jobs that wait longer than their patience time will abandon the queue. This setting takes precedence over the global class patience. Defaults to RENEGING patience type for backwards compatibility.- Parameters:
jobClass- the job classdistribution- the patience time distribution- Throws:
IllegalArgumentException- if distribution is a modulated process or arguments are null
-
setPatience
public void setPatience(JobClass jobClass, ImpatienceType impatienceType, Distribution distribution) Sets the impatience type and distribution for a specific job class at this station. Jobs that wait longer than their patience time will abandon the queue. This setting takes precedence over the global class patience.- Parameters:
jobClass- the job classimpatienceType- the type of impatience (RENEGING or BALKING)distribution- the patience time distribution- Throws:
IllegalArgumentException- if distribution is a modulated process or arguments are null
-
getPatience
Gets the effective patience distribution for a specific job class. Returns the station-specific setting if available, otherwise falls back to the global class patience.- Parameters:
jobClass- the job class- Returns:
- the patience distribution, or null if not set
-
getPatienceLocal
Gets the station-specific patience distribution (without fallback).- Parameters:
jobClass- the job class- Returns:
- the station-specific patience distribution, or null if not set
-
getImpatienceType
Gets the effective impatience type for a specific job class. Returns the station-specific setting if available, otherwise falls back to the global class impatience type.- Parameters:
jobClass- the job class- Returns:
- the impatience type, or null if not set
-
getImpatienceTypeLocal
Gets the station-specific impatience type (without fallback).- Parameters:
jobClass- the job class- Returns:
- the station-specific impatience type, or null if not set
-
hasPatience
Checks if patience is configured for a job class (local or global).- Parameters:
jobClass- the job class- Returns:
- true if patience is configured, false otherwise
-
hasPatienceLocal
Checks if patience is configured locally at this station.- Parameters:
jobClass- the job class- Returns:
- true if local patience is configured, false otherwise
-
setBalking
public void setBalking(JobClass jobClass, BalkingStrategy strategy, List<BalkingThreshold> thresholds) Sets the balking configuration for a specific job class at this station. This setting takes precedence over the global class balking configuration.- Parameters:
jobClass- the job classstrategy- the balking strategy to usethresholds- list of balking thresholds mapping queue lengths to probabilities- Throws:
IllegalArgumentException- if any argument is null or thresholds is empty
-
setBalking
public void setBalking(JobClass jobClass, BalkingStrategy strategy, int minJobs, double probability) Sets the balking configuration using a single threshold. Convenience method for simple balking configurations.- Parameters:
jobClass- the job classstrategy- the balking strategy to useminJobs- minimum queue length to trigger balkingprobability- balking probability when queue length >= minJobs
-
getBalkingStrategy
Gets the effective balking strategy for a specific job class. Returns the station-specific setting if available, otherwise falls back to the global class balking strategy.- Parameters:
jobClass- the job class- Returns:
- the balking strategy, or null if not configured
-
getBalkingStrategyLocal
Gets the station-specific balking strategy (without fallback).- Parameters:
jobClass- the job class- Returns:
- the station-specific balking strategy, or null if not set
-
getBalkingThresholds
Gets the effective balking thresholds for a specific job class. Returns the station-specific setting if available, otherwise falls back to the global class balking thresholds.- Parameters:
jobClass- the job class- Returns:
- the balking thresholds, or null if not configured
-
getBalkingThresholdsLocal
Gets the station-specific balking thresholds (without fallback).- Parameters:
jobClass- the job class- Returns:
- the station-specific balking thresholds, or null if not set
-
hasBalking
Checks if balking is configured for a job class (local or global).- Parameters:
jobClass- the job class- Returns:
- true if balking is configured, false otherwise
-
hasBalkingLocal
Checks if balking is configured locally at this station.- Parameters:
jobClass- the job class- Returns:
- true if local balking is configured, false otherwise
-
setRetrial
Sets the retrial configuration for a specific job class at this station. This setting takes precedence over the global class retrial configuration.- Parameters:
jobClass- the job classdelayDistribution- the distribution for retrial delay timesmaxAttempts- maximum retry attempts (-1 for unlimited, 0 for no retries)- Throws:
IllegalArgumentException- if arguments are null or distribution is modulated
-
setRetrial
Sets the retrial configuration with unlimited retry attempts.- Parameters:
jobClass- the job classdelayDistribution- the distribution for retrial delay times
-
getRetrialDelayDistribution
Gets the effective retrial delay distribution for a specific job class. Returns the station-specific setting if available, otherwise falls back to the global class retrial distribution.- Parameters:
jobClass- the job class- Returns:
- the retrial delay distribution, or null if not configured
-
getRetrialDelayDistributionLocal
Gets the station-specific retrial delay distribution (without fallback).- Parameters:
jobClass- the job class- Returns:
- the station-specific retrial delay distribution, or null if not set
-
getMaxRetrialAttempts
Gets the effective maximum retrial attempts for a specific job class. Returns the station-specific setting if available, otherwise falls back to the global class max attempts.- Parameters:
jobClass- the job class- Returns:
- maximum attempts (-1 for unlimited), or -1 if not configured
-
getMaxRetrialAttemptsLocal
Gets the station-specific maximum retrial attempts (without fallback).- Parameters:
jobClass- the job class- Returns:
- the station-specific max attempts, or null if not set
-
hasRetrial
Checks if retrial is configured for a job class (local or global).- Parameters:
jobClass- the job class- Returns:
- true if retrial is configured, false otherwise
-
hasRetrialLocal
Checks if retrial is configured locally at this station.- Parameters:
jobClass- the job class- Returns:
- true if local retrial is configured, false otherwise
-