Package jline.solvers.env
Class SolverENV
java.lang.Object
jline.solvers.Solver
jline.solvers.EnsembleSolver
jline.solvers.env.SolverENV
- Direct Known Subclasses:
ENV
ENV - Ensemble environment solver for models immersed in a random environment.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classContainer class holding the generator matrices and related data structures for both stage-specific and random environment transitions.static classResult container for sample path analysis, containing metrics for each segment. -
Field Summary
Fields inherited from class jline.solvers.EnsembleSolver
ensemble, numThreads, results, solvers, threadPool -
Constructor Summary
ConstructorsConstructorDescriptionSolverENV(Environment renv, NetworkSolver[] solvers) SolverENV(Environment renv, NetworkSolver[] solvers, SolverOptions options) -
Method Summary
Modifier and TypeMethodDescriptionprotected SolverResultanalyze(int it, int e) protected booleanconverged(int it) static jline.solvers.env.SolverENV.Compression_resultctmc_courtois(Matrix Q, MatrixCell MS) static jline.solvers.env.SolverENV.Compression_resultctmc_courtois(Matrix Q, MatrixCell MS, double q) static jline.solvers.env.SolverENV.Compression_resultctmc_decompose(Matrix Q, MatrixCell MS, SolverOptions options) Perform CTMC decomposition using the configured method.static SolverOptionsprotected voidfinish()voidgetAvg()final NetworkAvgTablefinal NetworkAvgTablegetAvgTable(SolverOptions options) final NetworkAvgTablegetAvgTable(SolverOptions options, boolean keepDisabled) static FeatureSetgetName()Returns the name identifier of this solver.getSamplePathTable(List<Object[]> samplePath) Computes transient performance metrics for a sample path through environment states.Returns the network structures for all stages in the environment.protected voidinit()String[]Returns the list of valid solution methods supported by this solver.protected voidpost(int it) protected voidpre(int it) voidvoidprintAvgTable(boolean keepDisabled) Prints the average metrics table for all stations and job classes.voidExecutes the solver algorithm to analyze the model.voidsetCompression(boolean compression) voidsetRef(int i) voidsetSMPMethod(boolean SMPMethod) voidsetStateDepMethod(String method) booleanChecks if this solver supports the given network model.Methods inherited from class jline.solvers.EnsembleSolver
ensembleAvg, getNumberOfModels, getNumThreads, iterate, numberOfModels, numThreads, printEnsembleAvgTables, printEnsembleAvgTs, setNumThreadsMethods inherited from class jline.solvers.Solver
getOptions, getResults, hasResults, isJavaAvailable, isValidOption, listValidOptions, parseOptions, parseOptions, reset, resetRandomGeneratorSeed, runAnalyzerChecks, setChecks, setOptions
-
Constructor Details
-
SolverENV
-
SolverENV
-
-
Method Details
-
getFeatureSet
-
supports
Description copied from class:SolverChecks if this solver supports the given network model. Default implementation returns true; subclasses should override to provide specific feature validation. -
defaultOptions
-
setStateDepMethod
-
setSMPMethod
public void setSMPMethod(boolean SMPMethod) -
setCompression
public void setCompression(boolean compression) -
converged
protected boolean converged(int it) - Specified by:
convergedin classEnsembleSolver
-
init
protected void init()- Specified by:
initin classEnsembleSolver
-
pre
protected void pre(int it) - Specified by:
prein classEnsembleSolver
-
post
protected void post(int it) - Specified by:
postin classEnsembleSolver
-
finish
protected void finish()- Specified by:
finishin classEnsembleSolver
-
getName
Description copied from class:SolverReturns the name identifier of this solver. -
getGenerator
-
setRef
public void setRef(int i) -
getAvg
public void getAvg() -
getEnsembleAvg
- Specified by:
getEnsembleAvgin classEnsembleSolver
-
getSamplePathTable
Computes transient performance metrics for a sample path through environment states. The method runs transient analysis for each segment and extracts initial and final metric values.- Parameters:
samplePath- List of entries where each entry is an Object[] containing: - entry[0]: stage identifier (Integer for 0-based index, or String for stage name) - entry[1]: duration (Double, time spent in that stage)- Returns:
- SamplePathResult containing metrics for each segment
- Throws:
IllegalArgumentException- if sample path is empty, stage not found, or duration non-positive Example:Listinvalid input: '<'Object[]> path = new ArrayListinvalid input: '<'>(); path.add(new Object[]{"Fast", 5.0}); path.add(new Object[]{"Slow", 10.0}); path.add(new Object[]{"Fast", 3.0}); SamplePathResult result = solver.getSamplePathTable(path);
-
analyze
- Specified by:
analyzein classEnsembleSolver
-
runAnalyzerByCTMC
-
getAvgTable
-
getAvgTable
-
getAvgTable
-
printAvgTable
public void printAvgTable(boolean keepDisabled) Prints the average metrics table for all stations and job classes.- Parameters:
keepDisabled- If true, includes disabled/inactive entries (0-valued metrics).
-
printAvgTable
public void printAvgTable() -
runAnalyzer
public void 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
-
getStruct
Returns the network structures for all stages in the environment. Each element in the returned array corresponds to a stage's network structure.- Returns:
- Array of NetworkStruct objects, one for each stage
-
listValidMethods
Returns the list of valid solution methods supported by this solver. Currently only supports the "default" method.- Returns:
- Array of method names
-
ctmc_courtois
public static jline.solvers.env.SolverENV.Compression_result ctmc_courtois(Matrix Q, MatrixCell MS, double q) -
ctmc_courtois
-
ctmc_decompose
public static jline.solvers.env.SolverENV.Compression_result ctmc_decompose(Matrix Q, MatrixCell MS, SolverOptions options) Perform CTMC decomposition using the configured method. Uses options.config.da to select the decomposition algorithm: 'courtois' - Courtois decomposition (default) 'kms' - Koury-McAllister-Stewart method 'takahashi' - Takahashi's method 'multi' - Multigrid method- Parameters:
Q- Infinitesimal generator matrixMS- Macro-state partitionoptions- Solver options containing config.da and config.da_iter- Returns:
- Compression_result with decomposition results
-