Class Station
-
- All Implemented Interfaces:
-
java.io.Serializable
,jline.lang.Copyable
public abstract class Station extends ServiceNode implements Serializable
A node where jobs can spend time stationing there
-
-
Field Summary
Fields Modifier and Type Field Description protected int
numberOfServers
protected int
cap
protected Map<JobClass, Integer>
classCap
protected Map<JobClass, DropStrategy>
dropRule
protected Matrix
lldScaling
protected SerializableFunction<Matrix, Double>
lcdScaling
protected Map<JobClass, Map<JobClass, Distribution>>
switchoverTimes
protected List<ServiceBinding>
serviceProcesses
protected SchedStrategy
schedStrategy
protected SchedStrategyType
schedPolicy
protected HashMap<JobClass, Double>
schedStrategyPar
public Matrix
state
public Matrix
statePrior
public final NodeAttribute
attribute
public Network
model
protected InputSection
input
protected OutputSection
output
protected ServiceSection
server
protected DropStrategy
dropStrategy
protected int
statefulIdx
protected int
nodeIndex
protected int
stationIdx
protected String
name
-
Method Summary
Modifier and Type Method Description double
getCap()
Returns the total capacity limit for this node. void
setCap(int cap)
Sets the total capacity limit for this station. double
getClassCap(JobClass jobClass)
Returns the capacity limit for a specific job class at this node. DropStrategy
getDropRule(JobClass jobclass)
Gets the drop strategy for a specific job class when capacity is exceeded. SerializableFunction<Matrix, Double>
getLimitedClassDependence()
Gets the limited class-dependent scaling function for this station. void
setLimitedClassDependence(SerializableFunction<Matrix, Double> gamma)
Sets the limited class-dependent scaling function for this station. Matrix
getLimitedLoadDependence()
Gets the limited load-dependent scaling matrix for this station. void
setLimitedLoadDependence(Matrix alpha)
Sets the limited load-dependent scaling matrix for this station. int
getNumberOfServers()
void
setNumberOfServers(int numberOfServers)
Sets the number of servers at this station. SchedStrategy
getSchedStrategy()
Returns the scheduling strategy used by this station. List<Object>
getServiceRates()
Gets the service rates configured for all job classes at this station. List<Object>
getSourceRates()
Gets the source (arrival) rates for all job classes at this station. boolean
isReferenceStation()
Checks if this node is a reference station. Array<boolean>
isServiceDefined()
Checks which job classes have defined service processes. boolean
isServiceDefined(JobClass jobClass)
Checks if a specific job class has a defined service process. Array<boolean>
isServiceDisabled()
Checks which job classes have disabled service processes. boolean
isServiceDisabled(JobClass jobClass)
Checks if a specific job class has a disabled service process. void
setChainCapacity(Array<double> values)
Sets the capacity for each chain in the network. void
setClassCap(JobClass jobClass, int cap)
Sets the capacity limit for a specific job class at this station. void
setDropRule(JobClass jobclass, DropStrategy drop)
Sets the drop strategy for a specific job class when capacity is exceeded. void
setSwitchoverTime(JobClass fromClass, JobClass toClass, Distribution switchoverTime)
Sets the switchover time from one job class to another. Distribution
getSwitchoverTime(JobClass fromClass, JobClass toClass)
Gets the switchover time from one job class to another. boolean
hasSwitchoverTime(JobClass fromClass, JobClass toClass)
Checks if a switchover time is set for the given job class pair. -
Methods inherited from class jline.lang.nodes.StatefulNode
clearState, getState, getStatePrior, getStateSpace, getStatefulIndex, resetStateSpace, setState, setState, setStatePrior, setStateSpace
-
Methods inherited from class jline.lang.nodes.Node
getAttribute, getDropStrategy, getInput, getModel, getNodeIndex, getOutput, getOutputStrategies, getRoutingStrategy, getSections, getServer, getStatefulIdx, getStationIdx, isStateful, printSummary, reset, resetRouting, setModel, setNodeIdx, setProbRouting, setRouting, setRouting, setStationIdx
-
Methods inherited from class jline.lang.nodes.ServiceNode
getServiceProcess, setService, setService
-
Methods inherited from class jline.lang.Element
getName, setName
-
Methods inherited from class jline.lang.Copyable
copy
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
Station
Station(String name)
Creates a new station with the specified name.- Parameters:
name
- the name for this station
-
-
Method Detail
-
getCap
double getCap()
Returns the total capacity limit for this node. Default implementation returns infinite capacity.
- Returns:
the total capacity limit
-
setCap
void setCap(int cap)
Sets the total capacity limit for this station.
- Parameters:
cap
- the maximum number of jobs that can be at this station
-
getClassCap
double getClassCap(JobClass jobClass)
Returns the capacity limit for a specific job class at this node. Default implementation returns infinite capacity.
- Parameters:
jobClass
- the job class to query- Returns:
the capacity limit for the job class
-
getDropRule
DropStrategy getDropRule(JobClass jobclass)
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
SerializableFunction<Matrix, Double> getLimitedClassDependence()
Gets the limited class-dependent scaling function for this station.
- Returns:
the class-dependent scaling function, or null if not set
-
setLimitedClassDependence
void setLimitedClassDependence(SerializableFunction<Matrix, Double> gamma)
Sets the limited class-dependent scaling function for this station.
- Parameters:
gamma
- the class-dependent scaling function
-
getLimitedLoadDependence
Matrix getLimitedLoadDependence()
Gets the limited load-dependent scaling matrix for this station.
- Returns:
the load-dependent scaling matrix
-
setLimitedLoadDependence
void setLimitedLoadDependence(Matrix alpha)
Sets the limited load-dependent scaling matrix for this station.
- Parameters:
alpha
- the load-dependent scaling matrix
-
getNumberOfServers
int getNumberOfServers()
-
setNumberOfServers
void setNumberOfServers(int numberOfServers)
Sets the number of servers at this station.
- Parameters:
numberOfServers
- the number of servers (use Integer.
-
getSchedStrategy
SchedStrategy getSchedStrategy()
Returns the scheduling strategy used by this station.
- Returns:
the scheduling strategy (FCFS, PS, etc.)
-
getServiceRates
List<Object> 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
List<Object> 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
boolean isReferenceStation()
Checks if this node is a reference station. Default implementation returns false; override in subclasses as needed.
- Returns:
true if this is a reference station, false otherwise
-
isServiceDefined
Array<boolean> isServiceDefined()
Checks which job classes have defined service processes.
- Returns:
array indicating which classes have defined service processes
-
isServiceDefined
boolean isServiceDefined(JobClass jobClass)
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
Array<boolean> isServiceDisabled()
Checks which job classes have disabled service processes.
- Returns:
array indicating which classes have disabled service processes
-
isServiceDisabled
boolean isServiceDisabled(JobClass jobClass)
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
void setChainCapacity(Array<double> values)
Sets the capacity for each chain in the network. Configures per-class capacity based on chain membership and service availability.
-
setClassCap
void setClassCap(JobClass jobClass, int cap)
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
void setDropRule(JobClass jobclass, DropStrategy drop)
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
void setSwitchoverTime(JobClass fromClass, JobClass toClass, Distribution switchoverTime)
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
Distribution getSwitchoverTime(JobClass fromClass, JobClass toClass)
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
boolean hasSwitchoverTime(JobClass fromClass, JobClass toClass)
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
-
-
-
-