Class Network
-
- All Implemented Interfaces:
-
java.io.Serializable
,jline.lang.Copyable
public class Network extends Model implements Copyable
A queueing network model TABLE OF CONTENTS: 1. FIELDS AND INITIALIZATION 2. CONSTRUCTORS 3. FACTORY METHODS 4. NODE AND COMPONENT MANAGEMENT 5. STATE AND CACHE MANAGEMENT 6. GETTER METHODS - HANDLES 7. GETTER METHODS - CLASSES AND CHAINS 8. GETTER METHODS - CONFIGURATION 9. GETTER METHODS - INDEXES 10. GETTER METHODS - ROUTING 11. GETTER METHODS - NODES 12. GETTER METHODS - COUNTS 13. GETTER METHODS - PROCESS AND PRODUCT FORM 14. ROUTING MATRIX MANAGEMENT 15. GETTER METHODS - SOURCES AND SINKS 16. QUERY METHODS (HAS/IS) 17. INITIALIZATION METHODS 18. REFRESH METHODS 19. RESET METHODS 20. VALIDATION AND CONFIGURATION 21. UTILITY METHODS 22. INNER CLASSES
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
Network.routingMatrixReturn
-
Field Summary
Fields Modifier and Type Field Description public final List<JobClass>
jobClasses
public final List<Station>
stations
public final NetworkAttribute
attribute
public final List<Chain>
chains
public final List<FiniteCapacityRegion>
regions
public String
logPath
public List<Node>
nodes
public boolean
hasStruct
public Matrix
csMatrix
public boolean
allowReplace
-
Method Summary
Modifier and Type Method Description List<JobClass>
getJobClasses()
List<Station>
getStations()
Returns the list of stations in this network. NetworkAttribute
getAttribute()
List<Chain>
getChains()
Returns the list of job chains in this network. List<FiniteCapacityRegion>
getRegions()
String
getLogPath()
void
setLogPath(String logPath)
List<Node>
getNodes()
Returns the list of all nodes in this network. boolean
getHasStruct()
void
setHasStruct(boolean hasStruct)
Matrix
getCsMatrix()
void
setCsMatrix(Matrix csMatrix)
boolean
getAllowReplace()
void
setAllowReplace(boolean allowReplace)
static Network
cyclic(Matrix N, Matrix D, Array<SchedStrategy> strategy, Matrix S)
Creates a cyclic queueing network model with specified job populations, service demands, scheduling strategies, and server counts. static Network
cyclicFcfs(Matrix N, Matrix D)
Creates a cyclic queueing network with First Come First Served (FCFS) scheduling at all stations. static Network
cyclicFcfs(Matrix N, Matrix D, Matrix S)
Creates a cyclic queueing network with FCFS scheduling and specified server counts. static Network
cyclicFcfsInf(Matrix N, Matrix D, Matrix Z)
Creates a cyclic network with infinite server (delay) stations followed by FCFS queue stations. static Network
cyclicFcfsInf(Matrix N, Matrix D, Matrix Z, Matrix S)
Creates a cyclic network with infinite server stations followed by FCFS queue stations with specified server counts. static Network
cyclicPs(Matrix N, Matrix D)
Creates a cyclic queueing network with Processor Sharing (PS) scheduling at all stations. static Network
cyclicPs(Matrix N, Matrix D, Matrix S)
Creates a cyclic queueing network with PS scheduling and specified server counts. static Network
cyclicPsInf(Matrix N, Matrix D, Matrix Z)
Creates a cyclic network with infinite server (delay) stations followed by PS queue stations. static Network
cyclicPsInf(Matrix N, Matrix D, Matrix Z, Matrix S)
Creates a cyclic network with infinite server stations followed by PS queue stations with specified server counts. static RoutingMatrix
serialRouting(List<JobClass> jobClasses, Array<Node> nodes)
Creates a serial routing matrix connecting nodes in sequence. static RoutingMatrix
serialRouting(List<JobClass> jobClasses, List<Node> nodes)
Creates a serial routing matrix connecting nodes in sequence. static RoutingMatrix
serialRouting(JobClass jobClass, Array<Node> nodes)
Creates a serial routing matrix for a single job class. static RoutingMatrix
serialRouting(JobClass jobClass, List<Node> nodes)
Creates a serial routing matrix for a single job class. static RoutingMatrix
serialRouting(Array<Node> nodes)
Creates a serial routing matrix for all job classes in the network. static RoutingMatrix
serialRouting(List<Node> nodes)
Creates a serial routing matrix for all job classes in the network. static Network
tandem(Matrix lambda, Matrix D, Array<SchedStrategy> strategy, Matrix S)
Creates a tandem queueing network with specified arrival rates and service demands. static Network
tandemFcfs(Matrix lambda, Matrix D, Matrix S)
static Network
tandemFcfsInf(Matrix lambda, Matrix D)
Creates a tandem network with FCFS infinite servers. static Network
tandemFcfsInf(Matrix lambda, Matrix D, Matrix Z)
Creates a tandem network with FCFS infinite servers and delay centers. static Network
tandemFcfsInf(Matrix lambda, Matrix D, Matrix Z, Matrix S)
Creates a tandem network with FCFS infinite servers, delays, and specified server counts. static Network
tandemPs(Matrix lambda, Matrix D, Matrix S)
static Network
tandemPsInf(Matrix lambda, Matrix D)
Creates a tandem network with processor sharing infinite servers. static Network
tandemPsInf(Matrix lambda, Matrix D, Matrix Z)
Creates a tandem network with processor sharing infinite servers and delays. static Network
tandemPsInf(Matrix lambda, Matrix D, Matrix Z, Matrix S)
void
addItemSet(ItemSet itemSet)
Adds an item set to the network model. void
addJobClass(JobClass jobClass)
Adds a job class to the network model. void
addLink(Node sourceNode, Node destNode)
void
addLink(int sourceNodeIdx, int destNodeIdx)
void
addLinks(Array<Array<Node>> links)
boolean
addNode(Node node)
Adds a node to this network. void
addRegion(List<Node> nodes)
Adds a finite capacity region to this network. void
clearCaches()
void
generateClassLinks()
AvgHandle
getAvgArvRHandles()
SolverAvgHandles
getAvgHandles()
AvgHandle
getAvgQLenHandles()
AvgHandle
getAvgResidTHandles()
AvgHandle
getAvgRespTHandles()
AvgHandle
getAvgTputHandles()
AvgHandle
getAvgUtilHandles()
JobClass
getClassByIndex(int index)
JobClass
getClassByName(String name)
Chain
getClassChain(JobClass jobClass)
int
getClassChainIndex(JobClass jobClass)
int
getClassIndex(JobClass jobclass)
int
getClassIndex(String name)
int
getClassLinks(Node node, JobClass jobClass)
List<String>
getClassNames()
Matrix
getClassSwitchingMask()
List<JobClass>
getClasses()
Returns the list of job classes in this network. Matrix
getConnectionMatrix()
void
setConnectionMatrix(Matrix connection)
Ret.snGetDemands
getDemands()
Matrix
getDemandsChain()
Matrix
getForkJoins()
List<Integer>
getIndexClosedClasses()
Returns the indices of all closed job classes in this network. List<Integer>
getIndexOpenClasses()
Returns the indices of all open job classes in this network. int
getIndexSinkNode()
int
getIndexSourceNode()
int
getIndexSourceStation()
Gets the station index of the source List<Integer>
getIndexStatefulNodes()
JobClass
getJobClassFromIndex(int inIdx)
Returns the job class at the specified index. int
getJobClassIndex(JobClass jobClass)
Returns the index of the specified job class in this network. Map<Station, SerializableFunction<Matrix, Double>>
getLimitedClassDependence()
Matrix
getLimitedLoadDependence()
Map<JobClass, Map<JobClass, Matrix>>
getLinkedRoutingMatrix()
Node
getNodeByIndex(int idx)
Node
getNodeByName(String name)
Node
getNodeByStatefulIndex(int idx)
int
getNodeIndex(Node node)
int
getNodeIndex(String name)
List<String>
getNodeNames()
List<NodeType>
getNodeTypes()
int
getNumberOfChains()
int
getNumberOfClasses()
int
getNumberOfOpenClasses()
int
getNumberOfClosedClasses()
Matrix
getNumberOfJobs()
int
getNumberOfNodes()
Returns the total number of nodes in this network. int
getNumberOfStatefulNodes()
int
getNumberOfStations()
Returns the total number of stations in this network. ProcessType
getProcessType(Distribution distr)
Ret.snGetProductFormParams
getProductFormChainParameters()
Ret.snGetProductFormParams
getProductFormParameters()
Matrix
getReferenceClasses()
Matrix
getReferenceStations()
Network.routingMatrixReturn
getRoutingMatrix(Matrix arvRates, int returnVal)
RoutingStrategy
getRoutingStrategyFromNodeAndClassPair(Node node, JobClass c)
Sink
getSink()
Array<int>
getSize()
Returns the dimensions of this network as [nodes, classes]. Source
getSource()
State
getState()
Node
getStatefulNodeFromIndex(int inIdx)
int
getStatefulNodeIndex(Node node)
int
getStatefulNodeIndex(String name)
List<String>
getStatefulNodeNames()
List<StatefulNode>
getStatefulNodes()
Matrix
getStatefulServers()
Station
getStationByIndex(int index)
Station
getStationByName(String name)
Node
getStationFromIndex(int inIdx)
int
getStationIndex(Node node)
int
getStationIndex(String name)
List<Integer>
getStationIndexes(int index)
List<String>
getStationNames()
Map<Station, SchedStrategy>
getStationScheduling()
Matrix
getStationServers()
NetworkStruct
getStruct()
void
setStruct(NetworkStruct sn)
NetworkStruct
getStruct(boolean wantInitialState)
SolverTranHandles
getTranHandles()
AvgHandle
getTranQLenHandles()
AvgHandle
getTranTputHandles()
AvgHandle
getTranUtilHandles()
FeatureSet
getUsedLangFeatures()
Returns the language features used by the given network boolean
hasClassSwitching()
boolean
hasClasses()
Checks if this network has any job classes defined. boolean
hasClosedClasses()
Checks if this network contains any closed job classes. boolean
hasDPS()
boolean
hasDPSPrio()
boolean
hasFCFS()
boolean
hasFork()
boolean
hasGPS()
boolean
hasGPSPrio()
boolean
hasHOL()
boolean
hasHomogeneousScheduling(SchedStrategy strategy)
boolean
hasINF()
boolean
hasInitState()
boolean
hasJoin()
boolean
hasLCFS()
boolean
hasLCFSPR()
boolean
hasLEPT()
boolean
hasLJF()
boolean
hasMultiChain()
boolean
hasMultiClass()
boolean
hasMultiClassFCFS()
boolean
hasMultiClassHeterFCFS()
boolean
hasMultiServer()
boolean
hasOpenClasses()
Checks if this network contains any open job classes. boolean
hasPS()
boolean
hasPSPrio()
boolean
hasProductFormSolution()
Checks if this network has a product-form solution. boolean
hasSEPT()
boolean
hasSIRO()
boolean
hasSJF()
boolean
hasSingleChain()
boolean
hasSingleClass()
void
initDefault()
void
initFromAvgQLen(Matrix AvgQLen)
void
initFromAvgTable(NetworkAvgTable nt)
void
initFromMarginal(Matrix n)
void
initFromMarginalAndRunning(Matrix n, Matrix s)
void
initFromMarginalAndStarted(Matrix n, Matrix s)
RoutingMatrix
initRoutingMatrix()
boolean
isJavaNative()
Checks if this network is a Java native (JNetwork) implementation. boolean
isLimitedLoadDependent()
boolean
isMatlabNative()
Checks if this network is a MATLAB native (MNetwork) implementation. boolean
isStateValid()
void
jsimgView()
void
jsimwView()
void
link(RoutingMatrix P)
Array<List<Logger>>
linkAndLog(RoutingMatrix P, Array<boolean> isNodeLogged, String logPath)
Links the network with logging capability Creates Logger nodes before and after specified stations and updates routing matrix void
printRoutingMatrix()
void
refreshCapacity()
void
refreshChains(boolean propagate)
void
refreshJobs()
void
refreshLST(List<Integer> statSet, List<Integer> classSet)
void
refreshLocalVars()
void
refreshPetriNetNodes()
void
refreshPriorities()
void
refreshProcessPhases(List<Integer> statSet, List<Integer> classSet)
void
refreshProcessRepresentations()
void
refreshProcessTypes(List<Integer> statSet, List<Integer> classSet)
void
refreshProcesses(List<Integer> statSet, List<Integer> classSet)
void
refreshProcesses()
Array<boolean>
refreshRates(List<Integer> statSet, List<Integer> classSet)
void
refreshRoutingMatrix(Matrix rates)
void
refreshScheduling()
void
refreshStruct()
void
refreshStruct(boolean hardRefresh)
void
refreshSync()
void
refreshGlobalSync()
void
relink(RoutingMatrix P)
void
reset()
void
reset(boolean resetState)
void
resetHandles()
boolean
hasExistingLoggers()
Check if the network contains any Logger nodes void
resetModel(boolean resetState)
void
resetNetwork()
List<Node>
resetNetwork(boolean deleteCSNodes)
Resets the topology of the current network void
resetStruct()
Resets the struct of a given network void
sanitize()
void
setChecks(boolean doChecks)
Enables or disables validation checks for this network. void
setInitialized(boolean initStatus)
Sets the initialization status of this network. void
setJoinNodeRequired(int nodeIdx, JobClass jobClass, int njobs)
void
setJoinNodeStrategy(int nodeIdx, JobClass jobClass, JoinStrategy joinStrategy)
void
setNodeRouting(int nodeIdx, JobClass jobClass, RoutingStrategy routingStrategy)
void
setUsedLangFeature(String feature)
double
sub_jsq(int ind, int jnd, int r, int s, Matrix linksmat, Map<Node, Matrix> state_before, Map<Node, Matrix> state_after)
double
sub_rr_wrr(int ind, int jnd, int r, int s, Matrix linksmat, Map<Node, Matrix> state_before, Map<Node, Matrix> state_after)
void
summary()
void
unLink()
void
view()
void
setSn(NetworkStruct sn)
-
-
Constructor Detail
-
Network
Network(String modelName)
Creates a new queueing network model with the specified name.- Parameters:
modelName
- the name for this network model
-
-
Method Detail
-
getJobClasses
List<JobClass> getJobClasses()
-
getStations
List<Station> getStations()
Returns the list of stations in this network. Stations are nodes that can provide service to jobs.
- Returns:
list of service stations
-
getAttribute
NetworkAttribute getAttribute()
-
getChains
List<Chain> getChains()
Returns the list of job chains in this network. Job chains group classes that follow similar routing patterns.
- Returns:
list of job chains
-
getRegions
List<FiniteCapacityRegion> getRegions()
-
getLogPath
String getLogPath()
-
setLogPath
void setLogPath(String logPath)
-
getNodes
List<Node> getNodes()
Returns the list of all nodes in this network.
- Returns:
list of nodes including stations and non-station nodes
-
getHasStruct
boolean getHasStruct()
-
setHasStruct
void setHasStruct(boolean hasStruct)
-
getCsMatrix
Matrix getCsMatrix()
-
setCsMatrix
void setCsMatrix(Matrix csMatrix)
-
getAllowReplace
boolean getAllowReplace()
-
setAllowReplace
void setAllowReplace(boolean allowReplace)
-
cyclic
static Network cyclic(Matrix N, Matrix D, Array<SchedStrategy> strategy, Matrix S)
Creates a cyclic queueing network model with specified job populations, service demands, scheduling strategies, and server counts.
- Parameters:
N
- matrix of job populations for each class [1 x R] where R is the number of job classesD
- matrix of service demands [M x R] where M is the number of stations and R is the number of classesstrategy
- array of scheduling strategies for each station [M x 1]S
- matrix or vector specifying number of servers for each station [M x 1]- Returns:
a configured closed queueing network model
-
cyclicFcfs
static Network cyclicFcfs(Matrix N, Matrix D)
Creates a cyclic queueing network with First Come First Served (FCFS) scheduling at all stations.
- Parameters:
N
- matrix of job populations for each class [1 x R] where R is the number of job classesD
- matrix of service demands [M x R] where M is the number of stations and R is the number of classes- Returns:
a configured closed queueing network model with FCFS scheduling
-
cyclicFcfs
static Network cyclicFcfs(Matrix N, Matrix D, Matrix S)
Creates a cyclic queueing network with FCFS scheduling and specified server counts.
- Parameters:
N
- matrix of job populations for each class [1 x R] where R is the number of job classesD
- matrix of service demands [M x R] where M is the number of stations and R is the number of classesS
- matrix specifying number of servers for each station [M x 1]- Returns:
a configured closed queueing network model with FCFS scheduling
-
cyclicFcfsInf
static Network cyclicFcfsInf(Matrix N, Matrix D, Matrix Z)
Creates a cyclic network with infinite server (delay) stations followed by FCFS queue stations.
- Parameters:
N
- matrix of job populations for each class [1 x R] where R is the number of job classesD
- matrix of service demands at queue stations [M x R]Z
- matrix of think times at delay stations [MZ x R] where MZ is the number of delay stations- Returns:
a configured mixed queueing network model with delay and FCFS queue stations
-
cyclicFcfsInf
static Network cyclicFcfsInf(Matrix N, Matrix D, Matrix Z, Matrix S)
Creates a cyclic network with infinite server stations followed by FCFS queue stations with specified server counts.
- Parameters:
N
- matrix of job populations for each class [1 x R] where R is the number of job classesD
- matrix of service demands at queue stations [M x R]Z
- matrix of think times at delay stations [MZ x R] where MZ is the number of delay stationsS
- matrix specifying number of servers for queue stations [M x 1]- Returns:
a configured mixed queueing network model with delay and FCFS queue stations
-
cyclicPs
static Network cyclicPs(Matrix N, Matrix D)
Creates a cyclic queueing network with Processor Sharing (PS) scheduling at all stations.
- Parameters:
N
- matrix of job populations for each class [1 x R] where R is the number of job classesD
- matrix of service demands [M x R] where M is the number of stations and R is the number of classes- Returns:
a configured closed queueing network model with PS scheduling
-
cyclicPs
static Network cyclicPs(Matrix N, Matrix D, Matrix S)
Creates a cyclic queueing network with PS scheduling and specified server counts.
- Parameters:
N
- matrix of job populations for each class [1 x R] where R is the number of job classesD
- matrix of service demands [M x R] where M is the number of stations and R is the number of classesS
- matrix specifying number of servers for each station [M x 1]- Returns:
a configured closed queueing network model with PS scheduling
-
cyclicPsInf
static Network cyclicPsInf(Matrix N, Matrix D, Matrix Z)
Creates a cyclic network with infinite server (delay) stations followed by PS queue stations.
- Parameters:
N
- matrix of job populations for each class [1 x R] where R is the number of job classesD
- matrix of service demands at queue stations [M x R]Z
- matrix of think times at delay stations [MZ x R] where MZ is the number of delay stations- Returns:
a configured mixed queueing network model with delay and PS queue stations
-
cyclicPsInf
static Network cyclicPsInf(Matrix N, Matrix D, Matrix Z, Matrix S)
Creates a cyclic network with infinite server stations followed by PS queue stations with specified server counts.
- Parameters:
N
- matrix of job populations for each class [1 x R] where R is the number of job classesD
- matrix of service demands at queue stations [M x R]Z
- matrix of think times at delay stations [MZ x R] where MZ is the number of delay stationsS
- matrix specifying number of servers for queue stations [M x 1]- Returns:
a configured mixed queueing network model with delay and PS queue stations
-
serialRouting
static RoutingMatrix serialRouting(List<JobClass> jobClasses, Array<Node> nodes)
Creates a serial routing matrix connecting nodes in sequence. Jobs flow from each node to the next in the provided order. The last node connects back to the first unless it's a Sink.
- Parameters:
jobClasses
- list of job classes to routenodes
- nodes to connect in serial order- Returns:
routing matrix with serial connections
-
serialRouting
static RoutingMatrix serialRouting(List<JobClass> jobClasses, List<Node> nodes)
Creates a serial routing matrix connecting nodes in sequence. Jobs flow from each node to the next in the provided order. The last node connects back to the first unless it's a Sink.
- Parameters:
jobClasses
- list of job classes to routenodes
- list of nodes to connect in serial order- Returns:
routing matrix with serial connections
-
serialRouting
static RoutingMatrix serialRouting(JobClass jobClass, Array<Node> nodes)
Creates a serial routing matrix for a single job class.
- Parameters:
jobClass
- the job class to routenodes
- nodes to connect in serial order- Returns:
routing matrix with serial connections
-
serialRouting
static RoutingMatrix serialRouting(JobClass jobClass, List<Node> nodes)
Creates a serial routing matrix for a single job class.
- Parameters:
jobClass
- the job class to routenodes
- list of nodes to connect in serial order- Returns:
routing matrix with serial connections
-
serialRouting
static RoutingMatrix serialRouting(Array<Node> nodes)
Creates a serial routing matrix for all job classes in the network.
- Parameters:
nodes
- nodes to connect in serial order- Returns:
routing matrix with serial connections
-
serialRouting
static RoutingMatrix serialRouting(List<Node> nodes)
Creates a serial routing matrix for all job classes in the network.
- Parameters:
nodes
- list of nodes to connect in serial order- Returns:
routing matrix with serial connections
-
tandem
static Network tandem(Matrix lambda, Matrix D, Array<SchedStrategy> strategy, Matrix S)
Creates a tandem queueing network with specified arrival rates and service demands.
- Parameters:
lambda
- matrix of arrival rates [classes x sources]D
- matrix of service demands [stations x classes]strategy
- array of scheduling strategies for each stationS
- matrix of server counts [stations x classes]- Returns:
configured tandem network model
-
tandemFcfs
static Network tandemFcfs(Matrix lambda, Matrix D, Matrix S)
-
tandemFcfsInf
static Network tandemFcfsInf(Matrix lambda, Matrix D)
Creates a tandem network with FCFS infinite servers.
- Parameters:
lambda
- arrival rate matrixD
- service demand matrix- Returns:
configured tandem FCFS infinite server network
-
tandemFcfsInf
static Network tandemFcfsInf(Matrix lambda, Matrix D, Matrix Z)
Creates a tandem network with FCFS infinite servers and delay centers.
- Parameters:
lambda
- arrival rate matrixD
- service demand matrixZ
- delay time matrix- Returns:
configured tandem FCFS infinite server network with delays
-
tandemFcfsInf
static Network tandemFcfsInf(Matrix lambda, Matrix D, Matrix Z, Matrix S)
Creates a tandem network with FCFS infinite servers, delays, and specified server counts.
- Parameters:
lambda
- arrival rate matrixD
- service demand matrixZ
- delay time matrixS
- server count matrix- Returns:
configured tandem FCFS infinite server network
-
tandemPsInf
static Network tandemPsInf(Matrix lambda, Matrix D)
Creates a tandem network with processor sharing infinite servers.
- Parameters:
lambda
- arrival rate matrixD
- service demand matrix- Returns:
configured tandem PS infinite server network
-
tandemPsInf
static Network tandemPsInf(Matrix lambda, Matrix D, Matrix Z)
Creates a tandem network with processor sharing infinite servers and delays.
- Parameters:
lambda
- arrival rate matrixD
- service demand matrixZ
- delay time matrix- Returns:
configured tandem PS infinite server network with delays
-
addItemSet
void addItemSet(ItemSet itemSet)
Adds an item set to the network model. Item sets define the types of resources or items that can be processed by the network nodes.
- Parameters:
itemSet
- the item set to add to the network
-
addJobClass
void addJobClass(JobClass jobClass)
Adds a job class to the network model. Job classes define different types of jobs that traverse the network with potentially different service requirements and routing.
- Parameters:
jobClass
- the job class to add to the network
-
addLink
void addLink(int sourceNodeIdx, int destNodeIdx)
-
addNode
boolean addNode(Node node)
Adds a node to this network. If the node is a station, it's also added to the stations list. If allowReplace is true and a node with the same name already exists, it will be replaced.
- Parameters:
node
- the node to add to the network- Returns:
true if the node replaced an existing node, false otherwise
-
addRegion
void addRegion(List<Node> nodes)
Adds a finite capacity region to this network.
- Parameters:
nodes
- list of nodes forming the capacity region
-
clearCaches
void clearCaches()
-
generateClassLinks
void generateClassLinks()
-
getAvgArvRHandles
AvgHandle getAvgArvRHandles()
-
getAvgHandles
SolverAvgHandles getAvgHandles()
-
getAvgQLenHandles
AvgHandle getAvgQLenHandles()
-
getAvgResidTHandles
AvgHandle getAvgResidTHandles()
-
getAvgRespTHandles
AvgHandle getAvgRespTHandles()
-
getAvgTputHandles
AvgHandle getAvgTputHandles()
-
getAvgUtilHandles
AvgHandle getAvgUtilHandles()
-
getClassByIndex
JobClass getClassByIndex(int index)
-
getClassByName
JobClass getClassByName(String name)
-
getClassChain
Chain getClassChain(JobClass jobClass)
-
getClassChainIndex
int getClassChainIndex(JobClass jobClass)
-
getClassIndex
int getClassIndex(JobClass jobclass)
-
getClassIndex
int getClassIndex(String name)
-
getClassLinks
int getClassLinks(Node node, JobClass jobClass)
-
getClassNames
List<String> getClassNames()
-
getClassSwitchingMask
Matrix getClassSwitchingMask()
-
getClasses
List<JobClass> getClasses()
Returns the list of job classes in this network.
- Returns:
list of job classes
-
getConnectionMatrix
Matrix getConnectionMatrix()
-
setConnectionMatrix
void setConnectionMatrix(Matrix connection)
-
getDemands
Ret.snGetDemands getDemands()
-
getDemandsChain
Matrix getDemandsChain()
-
getForkJoins
Matrix getForkJoins()
-
getIndexClosedClasses
List<Integer> getIndexClosedClasses()
Returns the indices of all closed job classes in this network.
- Returns:
list of indices for closed job classes
-
getIndexOpenClasses
List<Integer> getIndexOpenClasses()
Returns the indices of all open job classes in this network.
- Returns:
list of indices for open job classes
-
getIndexSinkNode
int getIndexSinkNode()
-
getIndexSourceNode
int getIndexSourceNode()
-
getIndexSourceStation
int getIndexSourceStation()
Gets the station index of the source
- Returns:
-
-
getIndexStatefulNodes
List<Integer> getIndexStatefulNodes()
-
getJobClassFromIndex
JobClass getJobClassFromIndex(int inIdx)
Returns the job class at the specified index.
- Parameters:
inIdx
- index of the job class- Returns:
job class at the given index
-
getJobClassIndex
int getJobClassIndex(JobClass jobClass)
Returns the index of the specified job class in this network.
- Parameters:
jobClass
- the job class to find- Returns:
index of the job class, or -1 if not found
-
getLimitedClassDependence
Map<Station, SerializableFunction<Matrix, Double>> getLimitedClassDependence()
-
getLimitedLoadDependence
Matrix getLimitedLoadDependence()
-
getNodeByIndex
Node getNodeByIndex(int idx)
-
getNodeByName
Node getNodeByName(String name)
-
getNodeByStatefulIndex
Node getNodeByStatefulIndex(int idx)
-
getNodeIndex
int getNodeIndex(Node node)
-
getNodeIndex
int getNodeIndex(String name)
-
getNodeNames
List<String> getNodeNames()
-
getNodeTypes
List<NodeType> getNodeTypes()
-
getNumberOfChains
int getNumberOfChains()
-
getNumberOfClasses
int getNumberOfClasses()
-
getNumberOfOpenClasses
int getNumberOfOpenClasses()
-
getNumberOfClosedClasses
int getNumberOfClosedClasses()
-
getNumberOfJobs
Matrix getNumberOfJobs()
-
getNumberOfNodes
int getNumberOfNodes()
Returns the total number of nodes in this network.
- Returns:
number of nodes
-
getNumberOfStatefulNodes
int getNumberOfStatefulNodes()
-
getNumberOfStations
int getNumberOfStations()
Returns the total number of stations in this network.
- Returns:
number of service stations
-
getProcessType
ProcessType getProcessType(Distribution distr)
-
getProductFormChainParameters
Ret.snGetProductFormParams getProductFormChainParameters()
-
getProductFormParameters
Ret.snGetProductFormParams getProductFormParameters()
-
getReferenceClasses
Matrix getReferenceClasses()
-
getReferenceStations
Matrix getReferenceStations()
-
getRoutingMatrix
Network.routingMatrixReturn getRoutingMatrix(Matrix arvRates, int returnVal)
-
getRoutingStrategyFromNodeAndClassPair
RoutingStrategy getRoutingStrategyFromNodeAndClassPair(Node node, JobClass c)
-
getSize
Array<int> getSize()
Returns the dimensions of this network as [nodes, classes].
- Returns:
array containing [number of nodes, number of job classes]
-
getStatefulNodeFromIndex
Node getStatefulNodeFromIndex(int inIdx)
-
getStatefulNodeIndex
int getStatefulNodeIndex(Node node)
-
getStatefulNodeIndex
int getStatefulNodeIndex(String name)
-
getStatefulNodeNames
List<String> getStatefulNodeNames()
-
getStatefulNodes
List<StatefulNode> getStatefulNodes()
-
getStatefulServers
Matrix getStatefulServers()
-
getStationByIndex
Station getStationByIndex(int index)
-
getStationByName
Station getStationByName(String name)
-
getStationFromIndex
Node getStationFromIndex(int inIdx)
-
getStationIndex
int getStationIndex(Node node)
-
getStationIndex
int getStationIndex(String name)
-
getStationIndexes
List<Integer> getStationIndexes(int index)
-
getStationNames
List<String> getStationNames()
-
getStationScheduling
Map<Station, SchedStrategy> getStationScheduling()
-
getStationServers
Matrix getStationServers()
-
getStruct
NetworkStruct getStruct()
-
setStruct
void setStruct(NetworkStruct sn)
-
getStruct
NetworkStruct getStruct(boolean wantInitialState)
-
getTranHandles
SolverTranHandles getTranHandles()
-
getTranQLenHandles
AvgHandle getTranQLenHandles()
-
getTranTputHandles
AvgHandle getTranTputHandles()
-
getTranUtilHandles
AvgHandle getTranUtilHandles()
-
getUsedLangFeatures
FeatureSet getUsedLangFeatures()
Returns the language features used by the given network
- Returns:
- the language features used by the given network
-
hasClassSwitching
boolean hasClassSwitching()
-
hasClasses
boolean hasClasses()
Checks if this network has any job classes defined.
- Returns:
true if job classes exist, false otherwise
-
hasClosedClasses
boolean hasClosedClasses()
Checks if this network contains any closed job classes. Closed classes have fixed populations with no external arrivals.
- Returns:
true if closed classes exist, false otherwise
-
hasDPS
boolean hasDPS()
-
hasDPSPrio
boolean hasDPSPrio()
-
hasFCFS
boolean hasFCFS()
-
hasFork
boolean hasFork()
-
hasGPS
boolean hasGPS()
-
hasGPSPrio
boolean hasGPSPrio()
-
hasHOL
boolean hasHOL()
-
hasHomogeneousScheduling
boolean hasHomogeneousScheduling(SchedStrategy strategy)
-
hasINF
boolean hasINF()
-
hasInitState
boolean hasInitState()
-
hasJoin
boolean hasJoin()
-
hasLCFS
boolean hasLCFS()
-
hasLCFSPR
boolean hasLCFSPR()
-
hasLEPT
boolean hasLEPT()
-
hasLJF
boolean hasLJF()
-
hasMultiChain
boolean hasMultiChain()
-
hasMultiClass
boolean hasMultiClass()
-
hasMultiClassFCFS
boolean hasMultiClassFCFS()
-
hasMultiClassHeterFCFS
boolean hasMultiClassHeterFCFS()
-
hasMultiServer
boolean hasMultiServer()
-
hasOpenClasses
boolean hasOpenClasses()
Checks if this network contains any open job classes. Open classes have external arrivals and departures.
- Returns:
true if open classes exist, false otherwise
-
hasPS
boolean hasPS()
-
hasPSPrio
boolean hasPSPrio()
-
hasProductFormSolution
boolean hasProductFormSolution()
Checks if this network has a product-form solution. Product-form networks can be solved efficiently using MVA methods.
- Returns:
true if the network has product-form, false otherwise
-
hasSEPT
boolean hasSEPT()
-
hasSIRO
boolean hasSIRO()
-
hasSJF
boolean hasSJF()
-
hasSingleChain
boolean hasSingleChain()
-
hasSingleClass
boolean hasSingleClass()
-
initDefault
void initDefault()
-
initFromAvgQLen
void initFromAvgQLen(Matrix AvgQLen)
-
initFromAvgTable
void initFromAvgTable(NetworkAvgTable nt)
-
initFromMarginal
void initFromMarginal(Matrix n)
-
initFromMarginalAndRunning
void initFromMarginalAndRunning(Matrix n, Matrix s)
-
initFromMarginalAndStarted
void initFromMarginalAndStarted(Matrix n, Matrix s)
-
initRoutingMatrix
RoutingMatrix initRoutingMatrix()
-
isJavaNative
boolean isJavaNative()
Checks if this network is a Java native (JNetwork) implementation. Always returns true for JNetwork implementations.
- Returns:
true, as this is a Java implementation
-
isLimitedLoadDependent
boolean isLimitedLoadDependent()
-
isMatlabNative
boolean isMatlabNative()
Checks if this network is a MATLAB native (MNetwork) implementation. Always returns false for JNetwork implementations.
- Returns:
false, as this is a Java implementation
-
isStateValid
boolean isStateValid()
-
jsimgView
void jsimgView()
-
jsimwView
void jsimwView()
-
link
void link(RoutingMatrix P)
-
linkAndLog
Array<List<Logger>> linkAndLog(RoutingMatrix P, Array<boolean> isNodeLogged, String logPath)
Links the network with logging capability Creates Logger nodes before and after specified stations and updates routing matrix
- Parameters:
P
- the routing matrixisNodeLogged
- boolean array indicating which nodes should be loggedlogPath
- path where log files will be stored (optional, uses existing logPath if null)- Returns:
array containing [loggersBefore, loggersAfter] as List arrays
-
printRoutingMatrix
void printRoutingMatrix()
-
refreshCapacity
void refreshCapacity()
-
refreshChains
void refreshChains(boolean propagate)
-
refreshJobs
void refreshJobs()
-
refreshLST
void refreshLST(List<Integer> statSet, List<Integer> classSet)
-
refreshLocalVars
void refreshLocalVars()
-
refreshPetriNetNodes
void refreshPetriNetNodes()
-
refreshPriorities
void refreshPriorities()
-
refreshProcessPhases
void refreshProcessPhases(List<Integer> statSet, List<Integer> classSet)
-
refreshProcessRepresentations
void refreshProcessRepresentations()
-
refreshProcessTypes
void refreshProcessTypes(List<Integer> statSet, List<Integer> classSet)
-
refreshProcesses
void refreshProcesses(List<Integer> statSet, List<Integer> classSet)
-
refreshProcesses
void refreshProcesses()
-
refreshRoutingMatrix
void refreshRoutingMatrix(Matrix rates)
-
refreshScheduling
void refreshScheduling()
-
refreshStruct
void refreshStruct()
-
refreshStruct
void refreshStruct(boolean hardRefresh)
-
refreshSync
void refreshSync()
-
refreshGlobalSync
void refreshGlobalSync()
-
relink
void relink(RoutingMatrix P)
-
reset
void reset()
-
reset
void reset(boolean resetState)
-
resetHandles
void resetHandles()
-
hasExistingLoggers
boolean hasExistingLoggers()
Check if the network contains any Logger nodes
- Returns:
true if Logger nodes exist in the network
-
resetModel
void resetModel(boolean resetState)
-
resetNetwork
void resetNetwork()
-
resetNetwork
List<Node> resetNetwork(boolean deleteCSNodes)
Resets the topology of the current network
- Parameters:
deleteCSNodes
- - flag to indicate whether to delete the class switch nodes
-
resetStruct
void resetStruct()
Resets the struct of a given network
-
sanitize
void sanitize()
-
setChecks
void setChecks(boolean doChecks)
Enables or disables validation checks for this network.
- Parameters:
doChecks
- true to enable validation checks, false to disable
-
setInitialized
void setInitialized(boolean initStatus)
Sets the initialization status of this network.
- Parameters:
initStatus
- true if the network is initialized, false otherwise
-
setJoinNodeRequired
void setJoinNodeRequired(int nodeIdx, JobClass jobClass, int njobs)
-
setJoinNodeStrategy
void setJoinNodeStrategy(int nodeIdx, JobClass jobClass, JoinStrategy joinStrategy)
-
setNodeRouting
void setNodeRouting(int nodeIdx, JobClass jobClass, RoutingStrategy routingStrategy)
-
setUsedLangFeature
void setUsedLangFeature(String feature)
-
sub_jsq
double sub_jsq(int ind, int jnd, int r, int s, Matrix linksmat, Map<Node, Matrix> state_before, Map<Node, Matrix> state_after)
-
sub_rr_wrr
double sub_rr_wrr(int ind, int jnd, int r, int s, Matrix linksmat, Map<Node, Matrix> state_before, Map<Node, Matrix> state_after)
-
summary
void summary()
-
unLink
void unLink()
-
view
void view()
-
setSn
void setSn(NetworkStruct sn)
-
-
-
-