Package jline.solvers.fluid
Class SolverFluid
java.lang.Object
jline.solvers.Solver
jline.solvers.NetworkSolver
jline.solvers.fluid.SolverFluid
FLD - Fluid/Mean-Field Approximation solver.
SolverFluid is based on fluid and mean-field approximation methods.
It provides fluid-based analysis for queueing networks, particularly
useful for large-scale systems where discrete-event simulation would
be computationally expensive.
-
Field Summary
Fields inherited from class jline.solvers.NetworkSolver
avgHandles, model, sn, tranHandles -
Constructor Summary
ConstructorsConstructorDescriptionSolverFluid(Network model) Creates a new SolverFluid instance with default options.SolverFluid(Network model, Object... varargin) Creates a new SolverFluid instance with variable arguments for options.SolverFluid(Network model, String method) Creates a new SolverFluid instance with a specific method.SolverFluid(Network model, SolverOptions options) Creates a new SolverFluid instance with specific options. -
Method Summary
Modifier and TypeMethodDescriptionstatic SolverOptionsReturns the default solver options for the Fluid solver.Get average Age of Information metrics.Get arrival rate handles with fluid-specific validationEnhanced method to get average handles with validationGet queue length handles with fluid-specific validationGet residence time handles with fluid-specific validationGet response time handles with fluid-specific validationGet throughput handles with fluid-specific validationGet utilization handles with fluid-specific validationMatrix[]Get CDF of Age of Information with automatic time range.Matrix[]Get CDF of Age of Information.Get cumulative distribution function for passage time.Get cumulative distribution function for passage time with specific response time handles.Returns cumulative distribution functions of response times at steady-state.static FeatureSetReturns the feature set supported by the Fluid solvergetProbAggr(int ist) Probability of a SPECIFIC per-class job distribution at a station (current state).getSjrnT()Get sojourn time CDF.Get model structure data structure summarizing the networkReturns cumulative distribution functions of passage times during transient analysis.Enhanced method to get transient handles with validationprotected voidInitialize performance metric handles from the model.voidinitSol()Initializes the solution vector for the fluid analysis.String[]List all valid solution methods supported by this solvervoidRuns the fluid analyzer to solve the queueing network.voidrunAnalyzerChecks(SolverOptions options) Validates model compatibility and method support before analysisvoidsetAvgHandles(SolverAvgHandles handles) Enhanced method to set average handles with validationvoidsetFluidDistribResults(Matrix RD, double runtime) Set distribution results with enhanced metadata for fluid solvervoidsetFluidTranAvgResults(Matrix[][] Qt, Matrix[][] Ut, Matrix[][] Rt, Matrix[][] Tt, Matrix[][] Ct, Matrix[][] Xt, double runtimet) Set transient average results with proper validationvoidsetTranHandles(SolverTranHandles handles) Enhanced method to set transient handles with validationsjrnT()Get sojourn time CDF.booleanChecks whether the given model is supported by the Fluid solver.Methods inherited from class jline.solvers.NetworkSolver
aCT, aCT, aCT, aCT, aCT, aCT, aNCT, aNCT, aNCT, aNCT, aNCT, aNCT, aNT, aNT, aNT, aNT, aNT, aNT, aST, aST, aST, aT, aT, aT, aT, aT, aT, avg, avg, avg, avgArvR, avgArvRChain, avgArvRHandles, avgChain, avgChainT, avgChainT, avgChainT, avgChainT, avgChainT, avgChainT, avgChainTable, avgChainTable, avgChainTable, avgChainTable, avgChainTable, avgChainTable, avgHandles, avgNode, avgNodeArvRChain, avgNodeChain, avgNodeChainT, avgNodeChainT, avgNodeChainT, avgNodeChainT, avgNodeChainT, avgNodeChainT, avgNodeChainTable, avgNodeChainTable, avgNodeChainTable, avgNodeChainTable, avgNodeChainTable, avgNodeChainTable, avgNodeQLenChain, avgNodeResidTChain, avgNodeRespTChain, avgNodeT, avgNodeT, avgNodeT, avgNodeT, avgNodeT, avgNodeT, avgNodeTable, avgNodeTable, avgNodeTable, avgNodeTable, avgNodeTable, avgNodeTable, avgNodeTputChain, avgNodeUtilChain, avgQLen, avgQLenChain, avgQLenHandles, avgResidT, avgResidTChain, avgResidTHandles, avgRespT, avgRespTChain, avgRespTHandles, avgSys, avgSysRespT, avgSysT, avgSysT, avgSysT, avgSysTable, avgSysTable, avgSysTable, avgSysTput, avgT, avgT, avgT, avgT, avgT, avgT, avgTable, avgTable, avgTable, avgTable, avgTable, avgTable, avgTput, avgTputChain, avgTputHandles, avgUtil, avgUtilChain, avgUtilHandles, avgWaitT, cdfPassT, cdfPassT, cdfRespT, cdfRespT, chainAvgT, chainAvgT, chainAvgT, chainAvgT, chainAvgT, chainAvgT, getAllSolvers, getAvg, getAvg, getAvg, getAvgArvR, getAvgArvRChain, getAvgChain, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgNode, getAvgNodeArvRChain, getAvgNodeChain, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeQLenChain, getAvgNodeResidTChain, getAvgNodeRespTChain, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTputChain, getAvgNodeUtilChain, getAvgQLen, getAvgQLenChain, getAvgResidT, getAvgResidTChain, getAvgRespT, getAvgRespTChain, getAvgSys, getAvgSys, getAvgSys, getAvgSysRespT, getAvgSysTable, getAvgSysTable, getAvgSysTable, getAvgSysTput, getAvgT, getAvgT, getAvgT, getAvgT, getAvgT, getAvgT, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTput, getAvgTputChain, getAvgUtil, getAvgUtilChain, getAvgWaitT, getCdfRespT, getChainAvgT, getChainAvgT, getChainAvgT, getChainAvgT, getChainAvgT, getChainAvgT, getDeadlineTable, getModel, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getProb, getProb, getProbAggr, getProbMarg, getProbMarg, getProbNormConstAggr, getProbSys, getProbSysAggr, getStageT, getStageT, getStageTable, getStageTable, getSysAvgT, getSysAvgT, getSysAvgT, getTranAvg, getTranCdfPassT, getTranCdfRespT, getTranCdfRespT, hasAvgResults, hasDistribResults, hasTranResults, initHandles, model, nodeAvgT, nodeAvgT, nodeAvgT, nodeAvgT, nodeAvgT, nodeAvgT, nodeChainAvgT, nodeChainAvgT, nodeChainAvgT, nodeChainAvgT, nodeChainAvgT, nodeChainAvgT, print, prob, prob, probAggr, probAggr, probMarg, probMarg, probNormConstAggr, probSys, probSysAggr, sample, sampleAggr, sampleSys, sampleSysAggr, setAvgResults, setDistribResults, setLang, setModel, setTranAvgResults, setTranProb, stageT, stageTable, sysAvgT, sysAvgT, sysAvgT, tranAvg, tranCdfPassT, tranCdfPassT, tranCdfRespT, tranCdfRespT, tranHandlesMethods inherited from class jline.solvers.Solver
getName, getOptions, getResults, hasResults, isJavaAvailable, isValidOption, listValidOptions, parseOptions, parseOptions, reset, resetRandomGeneratorSeed, setChecks, setOptions
-
Constructor Details
-
SolverFluid
Creates a new SolverFluid instance with default options.- Parameters:
model- The network model to analyze
-
SolverFluid
Creates a new SolverFluid instance with variable arguments for options.- Parameters:
model- The network model to analyzevarargin- Variable arguments for solver options
-
SolverFluid
Creates a new SolverFluid instance with a specific method.- Parameters:
model- The network model to analyzemethod- The fluid analysis method to use
-
SolverFluid
Creates a new SolverFluid instance with specific options.- Parameters:
model- The network model to analyzeoptions- The solver options to use
-
-
Method Details
-
defaultOptions
Returns the default solver options for the Fluid solver.- Returns:
- Default solver options with SolverType.FLUID
-
getFeatureSet
Returns the feature set supported by the Fluid solver- Returns:
- - the feature set supported by the Fluid solver
-
getCdfRespT
Description copied from class:NetworkSolverReturns cumulative distribution functions of response times at steady-state. Uses default response time handles.- Overrides:
getCdfRespTin classNetworkSolver- Returns:
- result containing CDFs for response times [stations x classes]
-
getProbAggr
Description copied from class:NetworkSolverProbability of a SPECIFIC per-class job distribution at a station (current state). Returns P(n1 jobs of class 1, n2 jobs of class 2, ...).Compare with
NetworkSolver.getProbMarg(int, int, jline.util.matrix.Matrix): returns queue-length distribution for a single class, i.e., P(n jobs of class r) for n=0,1,...,N(r).- Overrides:
getProbAggrin classNetworkSolver- Parameters:
ist- the node index for which to compute probabilities- Returns:
- scalar probability in [0,1]
-
getTranCdfPassT
Description copied from class:NetworkSolverReturns cumulative distribution functions of passage times during transient analysis. Uses default response time handles.- Overrides:
getTranCdfPassTin classNetworkSolver- Returns:
- result containing transient CDFs for passage times
-
initSol
public void initSol()Initializes the solution vector for the fluid analysis. This method sets up the initial state representation for the fluid solver. -
runAnalyzer
public void runAnalyzer()Runs the fluid analyzer to solve the queueing network. This method executes the fluid approximation algorithm and stores the results in the solver's result object.- Specified by:
runAnalyzerin classSolver
-
runMethodSpecificAnalyzer
-
supports
Checks whether the given model is supported by the Fluid solver. This method compares the features used by the model against the features supported by the Fluid solver. -
getStruct
Get model structure data structure summarizing the network- Returns:
- NetworkStruct containing the model structure
-
listValidMethods
List all valid solution methods supported by this solver- Returns:
- array of valid method names
-
runAnalyzerChecks
Validates model compatibility and method support before analysis- Overrides:
runAnalyzerChecksin classNetworkSolver- Parameters:
options- solver options containing method specification- Throws:
RuntimeException- if model contains unsupported features or method is invalid
-
initFluidHandles
protected void initFluidHandles()Initialize performance metric handles from the model. This method ensures all handles are properly configured for fluid analysis. -
setFluidTranAvgResults
public void setFluidTranAvgResults(Matrix[][] Qt, Matrix[][] Ut, Matrix[][] Rt, Matrix[][] Tt, Matrix[][] Ct, Matrix[][] Xt, double runtimet) Set transient average results with proper validation- Parameters:
Qt- transient queue length matrices [time][stations x classes]Ut- transient utilization matrices [time][stations x classes]Rt- transient response time matrices [time][stations x classes]Tt- transient throughput matrices [time][stations x classes]Ct- transient system response time matrices [time][chains]Xt- transient system throughput matrices [time][chains]runtimet- computation time for transient analysis
-
setFluidDistribResults
Set distribution results with enhanced metadata for fluid solver- Parameters:
RD- distribution data [stations x classes] containing CDFsruntime- computation time for distribution analysis
-
getAvgHandles
Enhanced method to get average handles with validation- Overrides:
getAvgHandlesin classNetworkSolver- Returns:
- SolverAvgHandles with all handles properly initialized
-
setAvgHandles
Enhanced method to set average handles with validation- Overrides:
setAvgHandlesin classNetworkSolver- Parameters:
handles- the average handles to set
-
getTranHandles
Enhanced method to get transient handles with validation- Overrides:
getTranHandlesin classNetworkSolver- Returns:
- SolverTranHandles with all handles properly initialized
-
setTranHandles
Enhanced method to set transient handles with validation- Overrides:
setTranHandlesin classNetworkSolver- Parameters:
handles- the transient handles to set
-
getAvgQLenHandles
Get queue length handles with fluid-specific validation- Overrides:
getAvgQLenHandlesin classNetworkSolver- Returns:
- AvgHandle for queue length metrics
-
getAvgUtilHandles
Get utilization handles with fluid-specific validation- Overrides:
getAvgUtilHandlesin classNetworkSolver- Returns:
- AvgHandle for utilization metrics
-
getAvgRespTHandles
Get response time handles with fluid-specific validation- Overrides:
getAvgRespTHandlesin classNetworkSolver- Returns:
- AvgHandle for response time metrics
-
getAvgTputHandles
Get throughput handles with fluid-specific validation- Overrides:
getAvgTputHandlesin classNetworkSolver- Returns:
- AvgHandle for throughput metrics
-
getAvgArvRHandles
Get arrival rate handles with fluid-specific validation- Overrides:
getAvgArvRHandlesin classNetworkSolver- Returns:
- AvgHandle for arrival rate metrics
-
getAvgResidTHandles
Get residence time handles with fluid-specific validation- Overrides:
getAvgResidTHandlesin classNetworkSolver- Returns:
- AvgHandle for residence time metrics
-
getCdfPassT
Get cumulative distribution function for passage time. This method computes passage time distributions for job classes based on completion events at each station.- Overrides:
getCdfPassTin classNetworkSolver- Returns:
- DistributionResult containing the passage time CDF data
-
getCdfPassT
Get cumulative distribution function for passage time with specific response time handles. This method computes passage time distributions for job classes based on completion events at each station using the provided handles.- Overrides:
getCdfPassTin classNetworkSolver- Parameters:
R- the response time handles to use for the analysis- Returns:
- DistributionResult containing the passage time CDF data
-
getAvgAoI
Get average Age of Information metrics.Returns AoI and Peak AoI statistics computed by the Fluid solver. Requires the model to have a valid AoI topology (single open class, Source-Queue-Sink, capacity 1 or 2, single server, FCFS/LCFS/LCFSPR).
- Returns:
- Map with keys "AoI" and "PAoI", each mapping to a Map with "mean", "var", "std" entries. Also includes "systemType" and "preemption" at the top level. Returns null if no AoI results are available.
-
getCdfAoI
Get CDF of Age of Information.Computes the cumulative distribution function of AoI and Peak AoI using matrix exponential representations: F(t) = 1 - g * expm(A*t) * h
- Parameters:
tValues- Time values at which to evaluate CDF. If null, uses automatic range based on mean AoI (0 to 5*mean, 200 points).- Returns:
- Array of two Matrix objects: [AoI_cdf, PAoI_cdf]. Each is an n x 2 matrix with columns [CDF_values, t_values]. Returns null if no AoI results are available.
-
getCdfAoI
Get CDF of Age of Information with automatic time range.- Returns:
- Array of two Matrix objects: [AoI_cdf, PAoI_cdf]
-
getSjrnT
Get sojourn time CDF. Alias for getCdfRespT().- Returns:
- DistributionResult containing response time CDFs
-
sjrnT
Get sojourn time CDF. Lowercase Kotlin-style alias for getSjrnT().- Returns:
- DistributionResult containing response time CDFs
-