Package jline.lang
Class ModelAdapter
java.lang.Object
jline.lang.ModelAdapter
Static class to transform and adapt models, providing functionality for:
- Creating tagged job models for response time analysis
- Fork-join network transformations (formerly from FJ.java)
- Model preprocessing and adaptation operations
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classResult of aggregating chains in a modelstatic classDeaggregation information for converting chain-level results back to class-levelstatic classResult of tagging a chain in a model -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaggregateChains(Network model) Transform a multi-class model into an equivalent chain-aggregated model This function transforms a queueing network model with multiple classes into a stochastically equivalent model where each chain becomes a single class.aggregateChains(Network model, String suffix) Transform a multi-class model into an equivalent chain-aggregated modelstatic FESResultaggregateFES(Network model, List<Station> stationSubset) Replace a station subset with a Flow-Equivalent Server (FES) This function replaces a subset of stations in a closed product-form queueing network with a single Flow-Equivalent Server (FES).static FESResultaggregateFES(Network model, List<Station> stationSubset, FESOptions options) Replace a station subset with a Flow-Equivalent Server (FES) with optionsstatic MatrixfindPaths(NetworkStruct sn, Matrix P, int startNode, int endNode, int r, ArrayList<Integer> toMerge, Matrix QN, Matrix TN, double currentTime, Matrix fjclassmap, Matrix fjforkmap, Network nonfjmodel) Finds the response times along each path leading out of startNode up to (and not including) endNodestatic MatrixfindPathsCS(NetworkStruct sn, Matrix P, int curNode, int endNode, int curClass, ArrayList<Integer> toMerge, Matrix QN, Matrix TN, double currentTime, Matrix fjclassmap, Matrix fjforkmap, Network nonfjmodel) Finds the response times along each path leading out of curNode up to (and not including) endNode Variant for models with class switchingstatic Ret.FJApproxHeidelberger-Trivedi fork-join queueing network transformation.static Ret.FJApproxFork-Join Transform approach with default forkLambda parameterstatic Ret.FJApproxFork-Join Transform approach to evaluate queueing networks including fork-join systems.static Ret.FJsortForkssort_forks(NetworkStruct sn, NetworkStruct nonfjstruct, Matrix fjforkmap, Matrix fjclassmap, Network nonfjmodel) Determines a directed acyclic graph of relationships among fork nodes.Convenience method with default parametersConvenience method with default parametersCreate a tagged version of a job chain for response time analysis
-
Constructor Details
-
ModelAdapter
public ModelAdapter()
-
-
Method Details
-
tagChain
public static ModelAdapter.TaggedChainResult tagChain(Network model, Chain chain, JobClass jobclass, String suffix) Create a tagged version of a job chain for response time analysis- Parameters:
model- The original modelchain- The chain to tagjobclass- The specific job class to tag (optional, defaults to first class in chain)suffix- The suffix to add to tagged class names (optional, defaults to ".tagged")- Returns:
- TaggedChainResult containing the tagged model and tagged job class
-
tagChain
public static ModelAdapter.TaggedChainResult tagChain(Network model, Chain chain, JobClass jobclass) Convenience method with default parameters -
tagChain
Convenience method with default parameters -
findPaths
public static Matrix findPaths(NetworkStruct sn, Matrix P, int startNode, int endNode, int r, ArrayList<Integer> toMerge, Matrix QN, Matrix TN, double currentTime, Matrix fjclassmap, Matrix fjforkmap, Network nonfjmodel) Finds the response times along each path leading out of startNode up to (and not including) endNode -
findPathsCS
public static Matrix findPathsCS(NetworkStruct sn, Matrix P, int curNode, int endNode, int curClass, ArrayList<Integer> toMerge, Matrix QN, Matrix TN, double currentTime, Matrix fjclassmap, Matrix fjforkmap, Network nonfjmodel) Finds the response times along each path leading out of curNode up to (and not including) endNode Variant for models with class switching -
ht
Heidelberger-Trivedi fork-join queueing network transformation. Transforms the queueing network containing a FJ subsystem into a queueing network without one. Fork nodes changed to Router nodes. Join nodes changed to Delay nodes. One artificial class is created for each parallel branch and for each class. Another delay is added to model the sojourn time of the original classes. -- This approach is derived by PHILIP HEIDELBERGER and KISHOR S. TRIVEDI in "Analytic Queueing Models for Programs with Internal Concurrency"- Parameters:
model- - the original network- Returns:
- - queueing network with no FJ system, the class and the fork maps for the artificial classes, and the auxiliary delay map (each join node is mapped to a corresponding auxiliary delay).
-
mmt
Fork-Join Transform approach with default forkLambda parameter -
mmt
Fork-Join Transform approach to evaluate queueing networks including fork-join systems. An equivalent network is created where the fork nodes are replaced by routers, the join nodes are replaced by delays, and the parallelism induced by a fork-join system is simulated through the addition of artificial open customer classes.- Parameters:
model- - the original queueing networkforkLambda- - the arrival rates of the artificial classes- Returns:
- - the equivalent queueing network with the fork-join systems replaced with other nodes, a mapping of the artificial classes and their corresponding original classes, a mapping of the artificial classes and their FJ systems, and the fanout of each artificial class
-
sort_forks
public static Ret.FJsortForks sort_forks(NetworkStruct sn, NetworkStruct nonfjstruct, Matrix fjforkmap, Matrix fjclassmap, Network nonfjmodel) Determines a directed acyclic graph of relationships among fork nodes. -
aggregateChains
Transform a multi-class model into an equivalent chain-aggregated model This function transforms a queueing network model with multiple classes into a stochastically equivalent model where each chain becomes a single class. Classes belonging to the same chain (i.e., classes that can switch into each other) are merged into one aggregate class. The aggregated model preserves: - Total chain population (closed chains) - Total arrival rate (open chains) - Service demands at each station - Routing structure at the chain level- Parameters:
model- Source Network model with potentially multiple classes per chain- Returns:
- AggregateChainResult containing the aggregated model, alpha, and deaggInfo
-
aggregateChains
Transform a multi-class model into an equivalent chain-aggregated model- Parameters:
model- Source Network model with potentially multiple classes per chainsuffix- Optional suffix for chain class names- Returns:
- AggregateChainResult containing the aggregated model, alpha, and deaggInfo
-
aggregateFES
Replace a station subset with a Flow-Equivalent Server (FES) This function replaces a subset of stations in a closed product-form queueing network with a single Flow-Equivalent Server (FES). The FES has Limited Joint Dependence (LJD) service rates where the rate for class-c in state (n1,...,nK) equals the throughput of class-c in an isolated subnetwork consisting only of the subset stations.- Parameters:
model- Closed product-form Network modelstationSubset- List of Station objects to aggregate- Returns:
- FESResult containing the FES model, FES station, and deaggregation info
-
aggregateFES
public static FESResult aggregateFES(Network model, List<Station> stationSubset, FESOptions options) Replace a station subset with a Flow-Equivalent Server (FES) with options- Parameters:
model- Closed product-form Network modelstationSubset- List of Station objects to aggregateoptions- FES aggregation options- Returns:
- FESResult containing the FES model, FES station, and deaggregation info
-