Class SolverLN
- Direct Known Subclasses:
LN
SolverLN implements layered queueing network analysis through decomposition into simpler queueing models. LQNs extend traditional queueing networks by modeling software systems with nested service requests, where servers can act as clients to other services, creating layered dependencies.
Key LQN solver capabilities:
- Multi-layer model decomposition and iteration
- Software system modeling with nested service calls
- Client-server interaction patterns
- Convergence detection across model layers
- Ensemble-based performance analysis
The solver iterates between layers, updating service demands and arrival rates until convergence is achieved across all layers. This enables analysis of complex distributed software architectures and service-oriented systems.
- Since:
- 1.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classState class for exporting/importing SolverLN solution state.protected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanbooleandouble[]double[][]double[][]intintintdoubleFields inherited from class jline.solvers.EnsembleSolver
ensemble, numThreads, results, solvers, threadPool -
Constructor Summary
ConstructorsConstructorDescriptionSolverLN(LayeredNetwork lqnmodel) SolverLN(LayeredNetwork lqnmodel, SolverType solverType) SolverLN(LayeredNetwork lqnmodel, SolverType solverType, LNOptions lnOptions, SolverOptions solverOptions) SolverLN(LayeredNetwork lqnmodel, SolverType solverType, SolverOptions options) SolverLN(LayeredNetwork lqnmodel, SolverFactory solverFactory) SolverLN(LayeredNetwork lqnmodel, SolverFactory solverFactory, SolverOptions options) SolverLN(LayeredNetwork lqnmodel, SolverOptions options) -
Method Summary
Modifier and TypeMethodDescriptionanalyze(int it, int e) aT()avgT()avgTable()voidvoidbuildLayersRecursive(int idx, List<Integer> callers, boolean ishostlayer) voidbooleanconverged(int it) static SolverOptionsvoidfinish()getEntryServiceMatrixRecursion(LayeredNetworkStruct lqn, int aidx, int eidx, Matrix U) getState()Export current solver state for continuation.voidinit()integerMapToMatrix(Map<Integer, List<Integer[]>> cell) doubleovertakeProb(int eidx) Compute overtaking probability using transient Markov chain.voidpost(int it) voidpre(int it) voidExecutes the solver algorithm to analyze the model.voidsetState(SolverLN.LNState state) Import solution state for continuation.booleanvoidupdateLayers(int it) voidupdateMetrics(int it) voidupdateMetricsDefault(int it) voidupdateMetricsMomentBased(int it) voidupdatePopulations(int it) voidupdateRoutingProbabilities(int it) voidupdateSolver(SolverFactory newSolverFactory) Change the solver for all layers.voidupdateThinkTimes(int it) Methods inherited from class jline.solvers.EnsembleSolver
ensembleAvg, getNumberOfModels, getNumThreads, iterate, numberOfModels, numThreads, printEnsembleAvgTables, printEnsembleAvgTs, setNumThreadsMethods inherited from class jline.solvers.Solver
getName, getOptions, getResults, hasResults, isJavaAvailable, isValidOption, listValidOptions, parseOptions, parseOptions, reset, resetRandomGeneratorSeed, runAnalyzerChecks, setChecks, setOptions, supports
-
Field Details
-
nlayers
public int nlayers -
lqn
-
hasconverged
public boolean hasconverged -
averagingstart
-
idxhash
-
servtmatrix
-
ptaskcallers
-
ptaskcallers_step
-
ilscaling
-
njobs
-
njobsorig
-
routereset
-
svcreset
-
maxitererr
-
util
-
tput
-
tputproc
-
servt
-
residt
-
servtproc
-
servtcdf
-
thinkt
-
thinkproc
-
thinktproc
-
callresidt
-
callservt
-
callservtproc
-
callservtcdf
-
ignore
-
arvproc_classes_updmap
-
thinkt_classes_updmap
-
servt_classes_updmap
-
call_classes_updmap
-
route_prob_updmap
-
unique_route_prob_updmap
-
cell_arvproc_classes_updmap
-
cell_thinkt_classes_updmap
-
cell_servt_classes_updmap
-
cell_call_classes_updmap
-
cell_route_prob_updmap
-
temp_ensemble
-
curClassC
-
entryproc
-
relax_omega
public double relax_omega -
relax_err_history
-
servt_prev
-
residt_prev
-
tput_prev
-
thinkt_prev
-
singleReplicaTasks
-
callservt_prev
-
callresidt_prev
-
hostLayerIndices
-
taskLayerIndices
-
molItHostOuter
public int molItHostOuter -
molItTaskInner
public int molItTaskInner -
solverFactory
-
hasPhase2
public boolean hasPhase2 -
servt_ph1
-
servt_ph2
-
util_ph1
-
util_ph2
-
prOvertake
-
il_table_all
public double[][] il_table_all -
il_table_ph1
public double[][] il_table_ph1 -
il_common_entries
-
il_source_tasks_all
-
il_source_tasks_ph2
-
il_num_sources
public double[] il_num_sources
-
-
Constructor Details
-
SolverLN
-
SolverLN
-
SolverLN
-
SolverLN
-
SolverLN
-
SolverLN
public SolverLN(LayeredNetwork lqnmodel, SolverType solverType, LNOptions lnOptions, SolverOptions solverOptions) -
SolverLN
-
-
Method Details
-
defaultOptions
-
analyze
- Specified by:
analyzein classEnsembleSolver
-
buildLayers
public void buildLayers() -
buildLayersRecursive
-
construct
public void construct() -
converged
public boolean converged(int it) - Specified by:
convergedin classEnsembleSolver
-
finish
public void finish()- Specified by:
finishin classEnsembleSolver
-
getArvproc_classes_updmap
-
getAvgTable
-
avgTable
-
avgT
-
aT
-
getCall_classes_updmap
-
getEnsemble
-
getEnsembleAvg
- Specified by:
getEnsembleAvgin classEnsembleSolver
-
getEntryServiceMatrix
-
getEntryServiceMatrixRecursion
public Matrix getEntryServiceMatrixRecursion(LayeredNetworkStruct lqn, int aidx, int eidx, Matrix U) -
getIdxhash
-
getRoute_prob_updmap
-
getServt_classes_updmap
-
getThinkt_classes_updmap
-
init
public void init()- Specified by:
initin classEnsembleSolver
-
integerMapToMatrix
-
post
public void post(int it) - Specified by:
postin classEnsembleSolver
-
pre
public void pre(int it) - Specified by:
prein classEnsembleSolver
-
runAnalyzer
Description copied from class:SolverExecutes the solver algorithm to analyze the model. This abstract method must be implemented by concrete solver classes.- Specified by:
runAnalyzerin classSolver- Throws:
IllegalAccessException- if access to required resources is denied
-
supports
-
updateLayers
public void updateLayers(int it) -
updateMetrics
public void updateMetrics(int it) -
updateMetricsDefault
public void updateMetricsDefault(int it) -
updateMetricsMomentBased
public void updateMetricsMomentBased(int it) -
updatePopulations
public void updatePopulations(int it) -
updateRoutingProbabilities
public void updateRoutingProbabilities(int it) -
updateThinkTimes
public void updateThinkTimes(int it) -
getState
Export current solver state for continuation.Returns a LNState object containing the current solution state, which can be used to continue iteration with a different solver via setState().
- Returns:
- LNState object containing exported state
-
setState
Import solution state for continuation.Initializes the solver with a previously exported state, allowing iteration to continue from where a previous solver left off.
- Parameters:
state- LNState object to import
-
updateSolver
Change the solver for all layers.Replaces all layer solvers with new solvers created by the given factory function. This allows switching between different solving methods (e.g., from MVA to JMT) while preserving the current solution state.
- Parameters:
newSolverFactory- Factory to create new layer solvers
-
overtakeProb
public double overtakeProb(int eidx) Compute overtaking probability using transient Markov chain.This computes the probability that a new arrival to entry eidx finds the server in phase-2 (post-reply processing).
Uses a 3-state Continuous Time Markov Chain (CTMC):
- State 0: Server idle
- State 1: Server in phase-1 (caller is blocked)
- State 2: Server in phase-2 (caller has been released)
- Parameters:
eidx- Entry index- Returns:
- Overtaking probability (0 to 1)
-