Class SolverJMT
-
- All Implemented Interfaces:
public class SolverJMT extends NetworkSolver
Solver interface to the Java Modelling Tools (JMT) simulation engine.
SolverJMT provides integration with the JMT discrete-event simulation toolkit for analyzing queueing networks through simulation. JMT offers powerful simulation capabilities for complex network topologies and general service distributions that may not be analytically tractable.
Key JMT solver capabilities:
- Discrete-event simulation via JMT engine
- Complex network topology support (fork-join, finite capacity, etc.)
- General service and interarrival time distributions
- Statistical analysis with confidence intervals
- Transient and steady-state performance metrics
- Model export to JMT JSIMG format
Requirements: This solver requires JMT.jar to be available in the classpath. The solver can operate with or without the external JMT GUI application installed.
- Since:
1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumSolverJMT.ViewModepublic classSolverJMT.EventInfo
-
Field Summary
Fields Modifier and Type Field Description public final static StringFILE_FORMATpublic final static StringJSIMG_PATHpublic final static StringXSI_NO_NAMESPACE_SCHEMA_LOCATIONpublic StringfilePathpublic StringfileNamepublic doublemaxSimulatedTimepublic longmaxSamplespublic longmaxEventspublic longseedpublic doublesimConfIntpublic doublesimMaxRelErrpublic Networkmodelpublic NetworkStructsnpublic SolverAvgHandlesavgHandlespublic SolverTranHandlestranHandlespublic Modelmodelpublic Stringnamepublic SolverOptionsoptionspublic SolverResultresultpublic booleanenableCheckspublic Randomrandom
-
Method Summary
Modifier and Type Method Description StringgetFilePath()voidsetFilePath(String filePath)StringgetFileName()voidsetFileName(String fileName)doublegetMaxSimulatedTime()voidsetMaxSimulatedTime(double maxSimulatedTime)longgetMaxSamples()voidsetMaxSamples(long maxSamples)longgetMaxEvents()voidsetMaxEvents(long maxEvents)longgetSeed()doublegetSimConfInt()voidsetSimConfInt(double simConfInt)doublegetSimMaxRelErr()voidsetSimMaxRelErr(double simMaxRelErr)static SolverOptionsdefaultOptions()static FeatureSetgetFeatureSet()static voidviewModel(String jmtPath, String filename, SolverJMT.ViewMode viewMode)static voidviewModel(String jmtPath, String filename, SolverJMT.ViewMode viewMode, VerboseLevel verboseLevel)static voidviewModel(String filename, SolverJMT.ViewMode viewMode)static StringwriteJMVA(NetworkStruct sn, String outputFileName, SolverOptions options)Ret.DistributionResultgetCdfRespT()Returns cumulative distribution functions of response times at steady-state. Ret.DistributionResultgetCdfRespT(AvgHandle RH)Returns cumulative distribution functions of response times at steady-state. StringgetJMVATempPath()StringgetJSIMTempPath()StringgetJmtJarPath()voidsetJmtJarPath(String path)doublegetProbAggr(Node node, Matrix state_a)doublegetProbAggr(Node node)Ret.ProbabilityResultgetProbNormConstAggr()Returns the logarithm of the normalizing constant of state probabilities. SolverResultgetResults()Returns the results from the most recent solver execution. JMTResultgetResultsJMVA()JMTResultgetResultsJSIM()SolverResultgetAvgNode()Computes average performance metrics at steady-state for all nodes. voidsetSeed(int seed)NetworkStructgetStruct()Ret.DistributionResultgetTranCdfPassT()Returns cumulative distribution functions of passage times during transient analysis. Ret.DistributionResultgetTranCdfPassT(AvgHandle R)Returns cumulative distribution functions of passage times during transient analysis. Ret.DistributionResultgetTranCdfRespT()Returns cumulative distribution functions of response times during transient analysis. Ret.DistributionResultgetTranCdfRespT(AvgHandle R)Returns cumulative distribution functions of response times during transient analysis. voidgetTranAvg()Computes transient average station metrics over the specified time interval. Array<Array<Matrix>>getTranQLen()Returns transient queue length results from the last getTranAvg() call. Array<Array<Matrix>>getTranUtil()Returns transient utilization results from the last getTranAvg() call. Array<Array<Matrix>>getTranTput()Returns transient throughput results from the last getTranAvg() call. booleanhasAvgResults()Checks if the solver has computed steady-state average metrics. voidjsimgView()voidjsimgView(SolverOptions options)voidjsimgView(String jmtPath, SolverOptions options)voidjsimgView(String jmtPath)voidjsimwView(String jmtPath)voidjsimwView(String jmtPath, SolverOptions options)voidjsimwView()List<String>listValidMethods()List<String>listValidMethods(Network model)doubleprobSysStateAggr()voidrunAnalyzer()Executes the solver algorithm to analyze the model. Ret.SampleResultsampleAggr(Node node, int numEvents, boolean markActivePassive)Ret.SampleResultsampleAggr(Node node, int numEvents)Ret.SampleResultsampleAggr(Node node)Ret.SampleResultsampleSysAggr(long numEvents, boolean markActivePassive)Ret.SampleResultsampleSysAggr(long numEvents)Ret.SampleResultsampleSysAggr()JMTResult.TransientProbabilityResultgetTranProbAggr(Node node)Gets transient probability for a specific node's aggregated state. Ret.ProbabilityResultgetProbSysAggr()Gets probability of the current system state in aggregated form. booleansupports(Network model)Checks if this solver supports the given network model. StringwriteJSIM(NetworkStruct sn, String outputFileName)StringwriteJSIM(NetworkStruct sn)StringQN2JSIMG(NetworkStruct sn, String outputFileName)Writes queueing network model to JMT JSIMG format. StringQN2JSIMG(NetworkStruct sn)Writes queueing network model to JMT JSIMG format. -
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, getAvgArvRHandles, getAvgChain, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgHandles, getAvgNodeArvRChain, getAvgNodeChain, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeQLenChain, getAvgNodeResidTChain, getAvgNodeRespTChain, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTputChain, getAvgNodeUtilChain, getAvgQLen, getAvgQLenChain, getAvgQLenHandles, getAvgResidT, getAvgResidTChain, getAvgResidTHandles, getAvgRespT, getAvgRespTChain, getAvgRespTHandles, getAvgSys, getAvgSys, getAvgSys, getAvgSysRespT, getAvgSysTable, getAvgSysTable, getAvgSysTable, getAvgSysTput, getAvgT, getAvgT, getAvgT, getAvgT, getAvgT, getAvgT, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTput, getAvgTputChain, getAvgTputHandles, getAvgUtil, getAvgUtilChain, getAvgUtilHandles, getAvgWaitT, getCdfPassT, getCdfPassT, getChainAvgT, getChainAvgT, getChainAvgT, getChainAvgT, getChainAvgT, getChainAvgT, getDeadlineTable, getModel, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getProb, getProb, getProbAggr, getProbAggr, getProbMarg, getProbMarg, getProbSys, getSjrnT, getSjrnT, getStageT, getStageT, getStageTable, getStageTable, getSysAvgT, getSysAvgT, getSysAvgT, getTranHandles, 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, runAnalyzerChecks, sample, sampleAggr, sampleSys, sampleSysAggr, setAvgHandles, setAvgResults, setDistribResults, setLang, setModel, setTranAvgResults, setTranHandles, setTranProb, sjrnT, sjrnT, stageT, stageTable, sysAvgT, sysAvgT, sysAvgT, tranAvg, tranCdfPassT, tranCdfPassT, tranCdfRespT, tranCdfRespT, tranHandles -
Methods inherited from class jline.solvers.Solver
getName, getOptions, hasResults, isJavaAvailable, isValidOption, listValidOptions, parseOptions, parseOptions, reset, resetRandomGeneratorSeed, setChecks, setOptions -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getFilePath
String getFilePath()
-
setFilePath
void setFilePath(String filePath)
-
getFileName
String getFileName()
-
setFileName
void setFileName(String fileName)
-
getMaxSimulatedTime
double getMaxSimulatedTime()
-
setMaxSimulatedTime
void setMaxSimulatedTime(double maxSimulatedTime)
-
getMaxSamples
long getMaxSamples()
-
setMaxSamples
void setMaxSamples(long maxSamples)
-
getMaxEvents
long getMaxEvents()
-
setMaxEvents
void setMaxEvents(long maxEvents)
-
getSeed
long getSeed()
-
getSimConfInt
double getSimConfInt()
-
setSimConfInt
void setSimConfInt(double simConfInt)
-
getSimMaxRelErr
double getSimMaxRelErr()
-
setSimMaxRelErr
void setSimMaxRelErr(double simMaxRelErr)
-
defaultOptions
static SolverOptions defaultOptions()
-
getFeatureSet
static FeatureSet getFeatureSet()
-
viewModel
static void viewModel(String jmtPath, String filename, SolverJMT.ViewMode viewMode)
-
viewModel
static void viewModel(String jmtPath, String filename, SolverJMT.ViewMode viewMode, VerboseLevel verboseLevel)
-
viewModel
static void viewModel(String filename, SolverJMT.ViewMode viewMode)
-
writeJMVA
static String writeJMVA(NetworkStruct sn, String outputFileName, SolverOptions options)
-
getCdfRespT
Ret.DistributionResult getCdfRespT()
Returns cumulative distribution functions of response times at steady-state. Uses default response time handles.
- Returns:
result containing CDFs for response times [stations x classes]
-
getCdfRespT
Ret.DistributionResult getCdfRespT(AvgHandle RH)
Returns cumulative distribution functions of response times at steady-state. This is an abstract method that must be implemented by concrete solver subclasses.
- Returns:
result containing CDFs for response times [stations x classes]
-
getJMVATempPath
String getJMVATempPath()
-
getJSIMTempPath
String getJSIMTempPath()
-
getJmtJarPath
String getJmtJarPath()
-
setJmtJarPath
void setJmtJarPath(String path)
-
getProbAggr
double getProbAggr(Node node, Matrix state_a)
-
getProbAggr
double getProbAggr(Node node)
-
getProbNormConstAggr
Ret.ProbabilityResult getProbNormConstAggr()
Returns the logarithm of the normalizing constant of state probabilities. This is an abstract method that must be implemented by concrete solver subclasses.
- Returns:
result containing the log normalizing constant
-
getResults
SolverResult getResults()
Returns the results from the most recent solver execution.
- Returns:
the solver results
-
getResultsJMVA
JMTResult getResultsJMVA()
-
getResultsJSIM
JMTResult getResultsJSIM()
-
getAvgNode
SolverResult getAvgNode()
Computes average performance metrics at steady-state for all nodes. This method overrides NetworkSolver.getAvgNode() to use JMT simulation values for cache node throughputs and arrival rates instead of computing them from routing probabilities.
- Returns:
solver result containing node-level average metrics
-
setSeed
void setSeed(int seed)
-
getStruct
NetworkStruct getStruct()
-
getTranCdfPassT
Ret.DistributionResult getTranCdfPassT()
Returns cumulative distribution functions of passage times during transient analysis. Uses default response time handles.
- Returns:
result containing transient CDFs for passage times
-
getTranCdfPassT
Ret.DistributionResult getTranCdfPassT(AvgHandle R)
Returns cumulative distribution functions of passage times during transient analysis. This is an abstract method that must be implemented by concrete solver subclasses.
- Parameters:
R- response time handles (optional)- Returns:
result containing transient CDFs for passage times
-
getTranCdfRespT
Ret.DistributionResult getTranCdfRespT()
Returns cumulative distribution functions of response times during transient analysis. Uses default response time handles.
- Returns:
result containing transient CDFs for response times
-
getTranCdfRespT
Ret.DistributionResult getTranCdfRespT(AvgHandle R)
Returns cumulative distribution functions of response times during transient analysis. This is an abstract method that must be implemented by concrete solver subclasses.
- Parameters:
R- response time handles (optional)- Returns:
result containing transient CDFs for response times
-
getTranAvg
void getTranAvg()
Computes transient average station metrics over the specified time interval. This method overrides NetworkSolver.getTranAvg() to provide JMT-specific transient analysis.
-
getTranQLen
Array<Array<Matrix>> getTranQLen()
Returns transient queue length results from the last getTranAvg() call.
- Returns:
Matrix array with transient queue length data [stations x classes]
-
getTranUtil
Array<Array<Matrix>> getTranUtil()
Returns transient utilization results from the last getTranAvg() call.
- Returns:
Matrix array with transient utilization data [stations x classes]
-
getTranTput
Array<Array<Matrix>> getTranTput()
Returns transient throughput results from the last getTranAvg() call.
- Returns:
Matrix array with transient throughput data [stations x classes]
-
hasAvgResults
boolean hasAvgResults()
Checks if the solver has computed steady-state average metrics.
- Returns:
true if steady-state results are available, false otherwise
-
jsimgView
void jsimgView()
-
jsimgView
void jsimgView(SolverOptions options)
-
jsimgView
void jsimgView(String jmtPath, SolverOptions options)
-
jsimwView
void jsimwView(String jmtPath, SolverOptions options)
-
jsimwView
void jsimwView()
-
listValidMethods
List<String> listValidMethods()
-
listValidMethods
List<String> listValidMethods(Network model)
-
probSysStateAggr
double probSysStateAggr()
-
runAnalyzer
void runAnalyzer()
Executes the solver algorithm to analyze the model. This abstract method must be implemented by concrete solver classes.
-
sampleAggr
Ret.SampleResult sampleAggr(Node node, int numEvents, boolean markActivePassive)
-
sampleAggr
Ret.SampleResult sampleAggr(Node node, int numEvents)
-
sampleAggr
Ret.SampleResult sampleAggr(Node node)
-
sampleSysAggr
Ret.SampleResult sampleSysAggr(long numEvents, boolean markActivePassive)
-
sampleSysAggr
Ret.SampleResult sampleSysAggr(long numEvents)
-
sampleSysAggr
Ret.SampleResult sampleSysAggr()
-
getTranProbAggr
JMTResult.TransientProbabilityResult getTranProbAggr(Node node)
Gets transient probability for a specific node's aggregated state. Currently not fully implemented - returns empty result.
- Parameters:
node- The node of interest- Returns:
TransientProbabilityResult containing time points and probabilities
-
getProbSysAggr
Ret.ProbabilityResult getProbSysAggr()
Gets probability of the current system state in aggregated form. Uses simulation sampling to estimate the probability.
- Returns:
Probability of the current system state
-
supports
boolean supports(Network model)
Checks if this solver supports the given network model. Default implementation returns true; subclasses should override to provide specific feature validation.
- Parameters:
model- the network model to check- Returns:
true if the model is supported, false otherwise
-
writeJSIM
String writeJSIM(NetworkStruct sn, String outputFileName)
-
writeJSIM
String writeJSIM(NetworkStruct sn)
-
QN2JSIMG
String QN2JSIMG(NetworkStruct sn, String outputFileName)
Writes queueing network model to JMT JSIMG format. Delegates to the standalone QN2JSIMG class in the io package.
- Parameters:
sn- the network structureoutputFileName- the output file name- Returns:
the path to the JSIM file
-
QN2JSIMG
String QN2JSIMG(NetworkStruct sn)
Writes queueing network model to JMT JSIMG format. Delegates to the standalone QN2JSIMG class in the io package.
- Parameters:
sn- the network structure- Returns:
the path to the JSIM file
-
-
-
-