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
-
Methods inherited from class jline.solvers.NetworkSolver
avg, avg, avg, avgArvR, avgArvRChain, avgArvRHandles, avgChain, avgChainTable, avgChainTable, avgChainTable, avgChainTable, avgChainTable, avgChainTable, avgHandles, avgNode, avgNodeArvRChain, avgNodeChain, avgNodeChainTable, avgNodeChainTable, avgNodeChainTable, avgNodeChainTable, avgNodeChainTable, avgNodeChainTable, avgNodeQLenChain, avgNodeResidTChain, avgNodeRespTChain, avgNodeTable, avgNodeTable, avgNodeTable, avgNodeTable, avgNodeTable, avgNodeTable, avgNodeTputChain, avgNodeUtilChain, avgQLen, avgQLenChain, avgQLenHandles, avgResidT, avgResidTChain, avgResidTHandles, avgRespT, avgRespTChain, avgRespTHandles, avgSys, avgSysRespT, avgSysTable, avgSysTable, avgSysTable, avgSysTput, avgTable, avgTable, avgTable, avgTable, avgTable, avgTable, avgTput, avgTputChain, avgTputHandles, avgUtil, avgUtilChain, avgUtilHandles, avgWaitT, cdfPassT, cdfPassT, cdfRespT, cdfRespT, getAllSolvers, getAvg, getAvg, getAvg, getAvgArvR, getAvgArvRChain, getAvgArvRHandles, getAvgChain, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgHandles, getAvgNode, 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, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTput, getAvgTputChain, getAvgTputHandles, getAvgUtil, getAvgUtilChain, getAvgUtilHandles, getAvgWaitT, getCdfPassT, getCdfPassT, getModel, getProb, getProb, getProbAggr, getProbAggr, getProbMarg, getProbMarg, getProbSys, getStageTable, getStageTable, getTranHandles, hasDistribResults, hasTranResults, initHandles, model, print, prob, prob, probAggr, probAggr, probMarg, probMarg, probNormConstAggr, probSys, probSysAggr, runAnalyzerChecks, sample, sampleAggr, sampleSys, sampleSysAggr, setAvgHandles, setAvgResults, setDistribResults, setLang, setModel, setTranAvgResults, setTranHandles, setTranProb, stageTable, 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()
-
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
-
saveArrivalStrategy
DocumentSectionPair saveArrivalStrategy(DocumentSectionPair documentSectionPair, int ind)
-
saveBufferCapacity
DocumentSectionPair saveBufferCapacity(DocumentSectionPair documentSectionPair, int ind)
-
saveCache
ElementDocumentPair saveCache(ElementDocumentPair elementDocumentPair)
-
saveCacheStrategy
DocumentSectionPair saveCacheStrategy(DocumentSectionPair documentSectionPair, int ind)
-
saveClassSwitchStrategy
DocumentSectionPair saveClassSwitchStrategy(DocumentSectionPair documentSectionPair, int ind)
-
saveClasses
ElementDocumentPair saveClasses(ElementDocumentPair elementDocumentPair)
-
saveDropRule
DocumentSectionPair saveDropRule(DocumentSectionPair documentSectionPair, int ind)
-
saveDropStrategy
DocumentSectionPair saveDropStrategy(DocumentSectionPair documentSectionPair, int ind)
-
saveEnablingConditions
DocumentSectionPair saveEnablingConditions(DocumentSectionPair documentSectionPair, int ind)
-
saveFiringOutcomes
DocumentSectionPair saveFiringOutcomes(DocumentSectionPair documentSectionPair, int ind)
-
saveFiringPriorities
DocumentSectionPair saveFiringPriorities(DocumentSectionPair documentSectionPair, int ind)
-
saveFiringWeights
DocumentSectionPair saveFiringWeights(DocumentSectionPair documentSectionPair, int ind)
-
saveForkStrategy
DocumentSectionPair saveForkStrategy(DocumentSectionPair documentSectionPair, int ind)
-
saveGetStrategy
DocumentSectionPair saveGetStrategy(DocumentSectionPair documentSectionPair)
-
saveInhibitingConditions
DocumentSectionPair saveInhibitingConditions(DocumentSectionPair documentSectionPair, int ind)
-
saveJoinStrategy
DocumentSectionPair saveJoinStrategy(DocumentSectionPair documentSectionPair, int ind)
-
saveLinks
ElementDocumentPair saveLinks(ElementDocumentPair elementDocumentPair)
-
saveLogTunnel
DocumentSectionPair saveLogTunnel(DocumentSectionPair documentSectionPair, int ind)
-
saveMetric
ElementDocumentPair saveMetric(ElementDocumentPair elementDocumentPair, AvgHandle handles)
-
saveMetrics
ElementDocumentPair saveMetrics(ElementDocumentPair elementDocumentPair)
-
saveModeNames
DocumentSectionPair saveModeNames(DocumentSectionPair documentSectionPair, int ind)
-
saveNumberOfServers
DocumentSectionPair saveNumberOfServers(DocumentSectionPair documentSectionPair, int ind)
-
saveNumbersOfServers
DocumentSectionPair saveNumbersOfServers(DocumentSectionPair documentSectionPair, int ind)
-
savePlaceCapacities
DocumentSectionPair savePlaceCapacities(DocumentSectionPair documentSectionPair, int ind)
-
savePreemptiveStrategy
DocumentSectionPair savePreemptiveStrategy(DocumentSectionPair documentSectionPair, int ind)
-
savePreemptiveWeights
DocumentSectionPair savePreemptiveWeights(DocumentSectionPair documentSectionPair, int ind)
-
savePutStrategies
DocumentSectionPair savePutStrategies(DocumentSectionPair documentSectionPair, int ind)
-
savePutStrategy
DocumentSectionPair savePutStrategy(DocumentSectionPair documentSectionPair, int ind)
-
saveRegions
ElementDocumentPair saveRegions(ElementDocumentPair elementDocumentPair)
-
saveRoutingStrategy
DocumentSectionPair saveRoutingStrategy(DocumentSectionPair documentSectionPair, int ind)
-
saveServerVisits
DocumentSectionPair saveServerVisits(DocumentSectionPair documentSectionPair)
-
saveServiceStrategy
DocumentSectionPair saveServiceStrategy(DocumentSectionPair documentSectionPair, int ind)
-
saveSwitchoverStrategy
DocumentSectionPair saveSwitchoverStrategy(DocumentSectionPair documentSectionPair, int ind)
-
saveTimingStrategies
DocumentSectionPair saveTimingStrategies(DocumentSectionPair documentSectionPair, int ind)
-
saveTotalCapacity
DocumentSectionPair saveTotalCapacity(DocumentSectionPair documentSectionPair, int ind)
-
saveXMLHeader
ElementDocumentPair saveXMLHeader(String logPath)
-
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)
-
-
-
-