Class SolverSSA
- Direct Known Subclasses:
SSA
-
Nested Class Summary
Nested classes/interfaces inherited from class jline.solvers.NetworkSolver
NetworkSolver.SolverConfigurator -
Field Summary
FieldsFields inherited from class jline.solvers.NetworkSolver
avgHandles, lastPerctMethod, lastPermEngine, model, sn, tranHandles -
Constructor Summary
ConstructorsConstructorDescriptionSolverSSA(Network model, NetworkSolver initSolver, Object... args) Creates a new SolverSSA that warm-starts the simulated trajectory from the steady-state solution of an auxiliary solver (seeNetworkSolver.initFromSolver(jline.solvers.NetworkSolver)).SolverSSA(Network model, SolverOptions options) -
Method Summary
Modifier and TypeMethodDescriptionstatic SolverOptionsReturns the default solver options for the SSA solver.Not available: SolverSSA does not record per-job response times.Returns cumulative distribution functions of response times at steady-state.static FeatureSetReturns the feature set supported by the SSA solverint(stations x classes) rate at which a class-r job HOLDING A SERVER at station i is pushed back into the buffer.Get marginal probability for a specific node state (by node index).doubleGet probability for a specific node state using the node's default statedoubleGet probability for a specific node stategetProbAggr(int node, Matrix state) Aggregated probability for a node state, addressed by NODE INDEX.doublegetProbAggr(Node node) Get aggregated probability for a specific node state using the node's default statedoublegetProbAggr(Node node, Matrix state) Get aggregated probability for a specific node stateGet system-wide probability for the current system stateGet aggregated system-wide probability for the current system state(stations x classes) rate at which a class-r job BEGINS or RESUMES holding a server at station i, estimated over the simulated path exactly as the throughput is.Get the active streaming collector (for use by Solver_ssa.kt).booleanisStochasticMethod(String method) All SSA methods are stochastic simulation.listValidMethods(Network model) planRunLength(SolverOptions options, Matrix means, Matrix ciHalfWidth, double samplesUsed) The run length the caller would need for the precision they asked for.voidExecutes the solver algorithm to analyze the model.Sample node state evolution using SSA simulation using default sample countSample node state evolution using SSA simulationSample node state evolution using SSA simulationsampleAggr(Node node) Sample aggregated node state evolution using SSA simulation using default sample countsampleAggr(Node node, int numEvents) Sample aggregated node state evolution using SSA simulationsampleAggr(Node node, Integer numEvents, boolean markActivePassive) Sample aggregated node state evolution using SSA simulationSample system-wide state evolution using SSA simulation using default sample countsampleSys(int numEvents) Sample system-wide state evolution using SSA simulationSample aggregated system-wide state evolution using SSA simulation using default sample countsampleSysAggr(int numEvents) Sample aggregated system-wide state evolution using SSA simulationvoidsetEventCache(EventCache eventCache) voidsetNumThreads(int numThreads) voidsetParallelism(int numThreads) voidsetThreadPool(ExecutorService threadPool) stream(Node node, Integer numEvents, StreamingOptions streamingOptions) Sample node state with real-time streaming to OTLP receiver.stream(Node node, StreamingOptions streamingOptions) Sample node state with real-time streaming to OTLP receiver.streamAggr(Node node, Integer numEvents, StreamingOptions streamingOptions) Sample aggregated node state with real-time streaming to OTLP receiver.streamAggr(Node node, StreamingOptions streamingOptions) Sample aggregated node state with real-time streaming to OTLP receiver.booleanChecks if this solver supports the given network model.supportsModelMethod(String method) The fork-join model class, which EVERY SSA method has to clear.Methods inherited from class jline.solvers.NetworkSolver
aCaT, aCT, aCT, aCT, aCT, aCT, aCT, aIT, aLT, aNCT, aNCT, aNCT, aNCT, aNCT, aNCT, aNT, aNT, aNT, aNT, aNT, aNT, aOT, aRLT, 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, bindingCapacityReason, cacheAvgT, cdfPassT, cdfPassT, cdfRespT, cdfRespT, chainAvgT, chainAvgT, chainAvgT, chainAvgT, chainAvgT, chainAvgT, checkDeclaredMethod, citations, declaredAllMethods, declaredAllMethods, declaredValidMethods, declaredValidMethods, getAllSolvers, getAvg, getAvg, getAvg, getAvgArvR, getAvgArvRChain, getAvgArvRHandles, getAvgCacheT, getAvgCacheTable, getAvgCacheTableImpl, getAvgChain, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTableImpl, getAvgChainTableImpl, getAvgHandles, getAvgItemT, getAvgItemTable, getAvgItemTableImpl, getAvgLossT, getAvgLossTable, getAvgNode, getAvgNodeArvRChain, getAvgNodeChain, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTableImpl, getAvgNodeChainTableImpl, getAvgNodeQLenChain, getAvgNodeResidTChain, getAvgNodeRespTChain, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTableImpl, getAvgNodeTableImpl, getAvgNodeTputChain, getAvgNodeUtilChain, getAvgOrbit, getAvgOrbitT, getAvgOrbitTable, getAvgOrbitTableImpl, getAvgQLen, getAvgQLenChain, getAvgQLenHandles, getAvgRegionLossT, getAvgRegionLossTable, getAvgResidT, getAvgResidTChain, getAvgResidTHandles, getAvgRespT, getAvgRespTChain, getAvgRespTHandles, getAvgSys, getAvgSys, getAvgSys, getAvgSysRespT, getAvgSysTable, getAvgSysTable, getAvgSysTable, getAvgSysTableImpl, getAvgSysTput, getAvgT, getAvgT, getAvgT, getAvgT, getAvgT, getAvgT, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTableImpl, getAvgTableImpl, getAvgTput, getAvgTputChain, getAvgTputHandles, getAvgUtil, getAvgUtilChain, getAvgUtilHandles, getAvgWaitT, getCdfPassT, getCdfPassT, getChainAvgT, getChainAvgT, getChainAvgT, getChainAvgT, getChainAvgT, getChainAvgT, getDeadlineTable, getLibrariesUsed, getModel, getMomentChainT, getMomentChainT, getMomentChainT, getMomentChainTable, getMomentChainTable, getMomentChainTable, getMomentStationT, getMomentStationT, getMomentStationT, getMomentStationTable, getMomentStationTable, getMomentStationTable, getMomentT, getMomentT, getMomentT, getMomentTable, getMomentTable, getMomentTable, getMomentTable, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getPerctRespT, getProb, getProbAggr, getProbMarg, getProbMarg, getProbNormConstAggr, getProbSysMarg, getProbSysMarg, getSensitivityT, getSensitivityT, getSensitivityTable, getSensitivityTable, getStageT, getStageT, getStageTable, getStageTable, getSysAvgT, getSysAvgT, getSysAvgT, getTranAvg, getTranCdfPassT, getTranCdfPassT, getTranCdfRespT, getTranCdfRespT, getTranHandles, hasAvgResults, hasBoundedBuffer, hasDistribResults, hasReneging, hasTranResults, initFromSolver, initHandles, itemAvgT, libraries, lossAvgT, mapEnvApprox, mCT, mCT, mCT, model, momentChainT, momentChainT, momentChainT, momentStationT, momentStationT, momentStationT, momentT, momentT, momentT, mST, mST, mST, mT, mT, mT, needsMapEnv, nodeAvgT, nodeAvgT, nodeAvgT, nodeAvgT, nodeAvgT, nodeAvgT, nodeChainAvgT, nodeChainAvgT, nodeChainAvgT, nodeChainAvgT, nodeChainAvgT, nodeChainAvgT, options, orbitAvgT, print, prob, prob, probAggr, probAggr, probMarg, probMarg, probNormConstAggr, probSys, probSysAggr, regionLossAvgT, runAnalyzerChecks, sample, sampleAggr, sensitivityT, sensitivityT, setAvgHandles, setAvgResults, setDistribResults, setLang, setModel, setTranAvgResults, setTranHandles, setTranProb, showLibraryAttribution, sT, sT, stageT, stageTable, supportsExactSensitivity, sysAvgT, sysAvgT, sysAvgT, tranAvg, tranCdfPassT, tranCdfPassT, tranCdfRespT, tranCdfRespT, tranHandles, unsupportedMethodReasonMethods inherited from class jline.solvers.Solver
getMethodFeatureSet, getName, getOptions, getResults, hasResults, isJavaAvailable, isStochastic, isValidOption, listValidOptions, parseOptions, parseOptions, reset, resetRandomGeneratorSeed, resolveMethod, selectMethod, setChecks, setOptions, supportsTransientAnalysis, timeExceeded
-
Field Details
-
threadPool
-
numThreads
public int numThreads -
eventCache
-
-
Constructor Details
-
SolverSSA
-
SolverSSA
-
SolverSSA
Creates a new SolverSSA that warm-starts the simulated trajectory from the steady-state solution of an auxiliary solver (seeNetworkSolver.initFromSolver(jline.solvers.NetworkSolver)).- Parameters:
model- The network model to analyzeinitSolver- auxiliary solver used to compute the steady-state distributionargs- Variable arguments for solver options
-
SolverSSA
-
SolverSSA
-
-
Method Details
-
getFeatureSet
Returns the feature set supported by the SSA solver- Returns:
- - the feature set supported by the SSA solver
-
getEventCache
-
setEventCache
-
getNumThreads
public int getNumThreads() -
setNumThreads
public void setNumThreads(int numThreads) -
getStruct
-
getThreadPool
-
setThreadPool
-
listValidMethods
-
listValidMethods
-
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 deniedParserConfigurationException- if XML parsing configuration failsIOException- if I/O operations fail
-
getStartRate
(stations x classes) rate at which a class-r job BEGINS or RESUMES holding a server at station i, estimated over the simulated path exactly as the throughput is.At a lossless station with no in-service abandonment getStartRate == getAvgTput + getPreemptRate up to simulation error; the CTMC accessor of the same name reports the exact value.
-
getPreemptRate
(stations x classes) rate at which a class-r job HOLDING A SERVER at station i is pushed back into the buffer. Zero at a non-preemptive station. -
setParallelism
public void setParallelism(int numThreads) -
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. -
isStochasticMethod
All SSA methods are stochastic simulation.- Overrides:
isStochasticMethodin classSolver- Parameters:
method- the method name to classify- Returns:
- true always
-
supportsModelMethod
The fork-join model class, which EVERY SSA method has to clear.runAnalyzer tag-augments a fork-join model through
ModelAdapter.fjtag, whose first act isfjValidate, so a model that validator refuses is refused whichever method was asked for. The feature set cannot state it -- Fork and Join are declared, and the rules are about how they are WIRED (the pairing, the join strategy, the tasks per link, whether an open class is routed through the fork) -- so it is structural, and it is the validator's own body of rules rather than a copy of them.Without it the report offered every ssa.* row on a fork-join model whose Join names no fork, and each one then threw; SolverCTMC gates on the same predicate for the same reason.
- Overrides:
supportsModelMethodin classSolver- Parameters:
method- the concrete method name- Returns:
- empty string if supported, else the offending reason
-
sample
public SampleNodeState sample(Node node, Integer numEvents, boolean markActivePassive) throws Exception Sample node state evolution using SSA simulation- Parameters:
node- The node to sample fromnumEvents- Number of samples to generate (overrides solver options if provided)markActivePassive- Whether to mark events as active/passive- Returns:
- SampleNodeState containing the sampling results
- Throws:
Exception- if sampling fails
-
sample
Sample node state evolution using SSA simulation- Parameters:
node- The node to sample fromnumEvents- Number of samples to generate- Returns:
- SampleNodeState containing the sampling results
- Throws:
Exception- if sampling fails
-
sample
Sample node state evolution using SSA simulation using default sample count- Parameters:
node- The node to sample from- Returns:
- SampleNodeState containing the sampling results
- Throws:
Exception- if sampling fails
-
sampleAggr
public SampleNodeState sampleAggr(Node node, Integer numEvents, boolean markActivePassive) throws Exception Sample aggregated node state evolution using SSA simulation- Parameters:
node- The node to sample fromnumEvents- Number of samples to generate (overrides solver options if provided)markActivePassive- Whether to mark events as active/passive- Returns:
- SampleNodeState containing the aggregated sampling results
- Throws:
Exception- if sampling fails
-
sampleAggr
Sample aggregated node state evolution using SSA simulation- Parameters:
node- The node to sample fromnumEvents- Number of samples to generate- Returns:
- SampleNodeState containing the aggregated sampling results
- Throws:
Exception- if sampling fails
-
sampleAggr
Sample aggregated node state evolution using SSA simulation using default sample count- Parameters:
node- The node to sample from- Returns:
- SampleNodeState containing the aggregated sampling results
- Throws:
Exception- if sampling fails
-
stream
Sample node state with real-time streaming to OTLP receiver. Streams phase-detailed state information during simulation.- Parameters:
node- The node to sample fromstreamingOptions- Configuration for streaming (endpoint, mode, frequency)- Returns:
- SampleNodeState containing the sampling results
- Throws:
Exception- if sampling fails
-
stream
public SampleNodeState stream(Node node, Integer numEvents, StreamingOptions streamingOptions) throws Exception Sample node state with real-time streaming to OTLP receiver. Streams phase-detailed state information during simulation.- Parameters:
node- The node to sample fromnumEvents- Number of samples to generatestreamingOptions- Configuration for streaming (endpoint, mode, frequency)- Returns:
- SampleNodeState containing the sampling results
- Throws:
Exception- if sampling fails
-
streamAggr
Sample aggregated node state with real-time streaming to OTLP receiver. Streams state information aggregated by job class during simulation.- Parameters:
node- The node to sample fromstreamingOptions- Configuration for streaming (endpoint, mode, frequency)- Returns:
- SampleNodeState containing the aggregated sampling results
- Throws:
Exception- if sampling fails
-
streamAggr
public SampleNodeState streamAggr(Node node, Integer numEvents, StreamingOptions streamingOptions) throws Exception Sample aggregated node state with real-time streaming to OTLP receiver. Streams state information aggregated by job class during simulation.- Parameters:
node- The node to sample fromnumEvents- Number of samples to generatestreamingOptions- Configuration for streaming (endpoint, mode, frequency)- Returns:
- SampleNodeState containing the aggregated sampling results
- Throws:
Exception- if sampling fails
-
getStreamingCollector
Get the active streaming collector (for use by Solver_ssa.kt). Returns null if streaming is not active.- Returns:
- The active Collector, or null
-
sampleSys
Sample system-wide state evolution using SSA simulation- Overrides:
sampleSysin classNetworkSolver- Parameters:
numEvents- Number of samples to generate- Returns:
- SampleSysState containing the system-wide sampling results
- Throws:
Exception- if sampling fails
-
sampleSys
Sample system-wide state evolution using SSA simulation using default sample count- Returns:
- SampleSysState containing the system-wide sampling results
- Throws:
Exception- if sampling fails
-
sampleSysAggr
Sample aggregated system-wide state evolution using SSA simulation- Overrides:
sampleSysAggrin classNetworkSolver- Parameters:
numEvents- Number of samples to generate- Returns:
- SampleSysState containing the aggregated system-wide sampling results
- Throws:
Exception- if sampling fails
-
sampleSysAggr
Sample aggregated system-wide state evolution using SSA simulation using default sample count- Returns:
- SampleSysState containing the aggregated system-wide sampling results
- Throws:
Exception- if sampling fails
-
getProb
Get probability for a specific node state- Parameters:
node- The node to get probability forstate- The state vector (optional - uses node's default state if null)- Returns:
- Probability of being in the specified state
- Throws:
Exception- if probability calculation fails
-
getProb
Get probability for a specific node state using the node's default state- Parameters:
node- The node to get probability for- Returns:
- Probability of being in the node's default state
- Throws:
Exception- if probability calculation fails
-
getProb
Get marginal probability for a specific node state (by node index). This overrides the base NetworkSolver method to use SSA sampling.- Overrides:
getProbin classNetworkSolver- Parameters:
node- The node index to get probability forstate- The state vector (optional - uses node's default state if null)- Returns:
- Probability result for being in the specified state
-
getProbAggr
Get aggregated probability for a specific node state- Parameters:
node- The node to get probability forstate- The state vector (optional - uses node's default state if null)- Returns:
- Aggregated probability of being in the specified state
- Throws:
Exception- if probability calculation fails
-
getProbAggr
Get aggregated probability for a specific node state using the node's default state- Parameters:
node- The node to get probability for- Returns:
- Aggregated probability of being in the node's default state
- Throws:
Exception- if probability calculation fails
-
getProbAggr
Aggregated probability for a node state, addressed by NODE INDEX.The Node-typed pair above is the implementation; this overload is what
NetworkSolver.getProbAggr(int, Matrix)declares and what every index-addressed caller reaches, LineCLI's-a prob-aggrincluded. Without it the base class answered "getProbAggr is not supported by SolverSSA" for a solver that implements it, and a delegating client read that refusal as a missing feature.- Overrides:
getProbAggrin classNetworkSolver- Parameters:
node- the node indexstate- per-class job counts, or null for the node's own state- Returns:
- scalar probability in [0,1]
-
getProbSys
Get system-wide probability for the current system state- Overrides:
getProbSysin classNetworkSolver- Returns:
- Probability of being in the system state
- Throws:
Exception- if probability calculation fails
-
getProbSysAggr
Get aggregated system-wide probability for the current system state- Overrides:
getProbSysAggrin classNetworkSolver- Returns:
- Aggregated probability of being in the system state
- Throws:
Exception- if probability calculation fails
-
defaultOptions
Returns the default solver options for the SSA solver.- Returns:
- Default solver options with SolverType.SSA
-
planRunLength
public static Map<String,Object> planRunLength(SolverOptions options, Matrix means, Matrix ciHalfWidth, double samplesUsed) The run length the caller would need for the precision they asked for.Null unless
options.config.runLengthPlanis set; it is either a Double target RELATIVE precision or a map with keysrelprecisionandconfidence.- Parameters:
options- the solver optionsmeans- the measured meansciHalfWidth- their confidence-interval half-widthssamplesUsed- the run length those half-widths came from- Returns:
- the plan, or null
- See Also:
-
getCdfRespT
Not available: SolverSSA does not record per-job response times.A simulator must report what it measured. The inherited NetworkSolver implementation fabricates an exponential law with the right mean, which carries no information about the tail and would be indistinguishable, to the caller, from a measured distribution. SSA samples state trajectories, not per-job sojourn times, so there is nothing to build an empirical CDF from -- the reference
@SolverSSA/getCdfRespT.mrefuses by name and so does this port.- Overrides:
getCdfRespTin classNetworkSolver- Returns:
- result containing CDFs for response times [stations x classes]
-
getCdfRespT
Description copied from class:NetworkSolverReturns cumulative distribution functions of response times at steady-state. Uses an exponential approximation based on average response times.- Overrides:
getCdfRespTin classNetworkSolver- Parameters:
R- response time handles (optional)- Returns:
- result containing CDFs for response times [stations x classes]
-