Class SolverJMT

Direct Known Subclasses:
JMT

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
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • defaultOptions

      public static SolverOptions defaultOptions()
    • getFeatureSet

      public static FeatureSet getFeatureSet()
    • viewModel

      public static void viewModel(String jmtPath, String filename, SolverJMT.ViewMode viewMode)
    • viewModel

      public static void viewModel(String jmtPath, String filename, SolverJMT.ViewMode viewMode, VerboseLevel verboseLevel)
    • viewModel

      public static void viewModel(String filename, SolverJMT.ViewMode viewMode)
    • writeJMVA

      public static String writeJMVA(NetworkStruct sn, String outputFileName, SolverOptions options)
    • getCdfRespT

      public Ret.DistributionResult getCdfRespT()
      Description copied from class: NetworkSolver
      Returns cumulative distribution functions of response times at steady-state. Uses default response time handles.
      Overrides:
      getCdfRespT in class NetworkSolver
      Returns:
      result containing CDFs for response times [stations x classes]
    • getCdfRespT

      public Ret.DistributionResult getCdfRespT(AvgHandle RH)
      Description copied from class: NetworkSolver
      Returns cumulative distribution functions of response times at steady-state. Uses an exponential approximation based on average response times.
      Overrides:
      getCdfRespT in class NetworkSolver
      Parameters:
      RH - response time handles (optional)
      Returns:
      result containing CDFs for response times [stations x classes]
    • getFileName

      public String getFileName()
    • setFileName

      public void setFileName(String fileName)
    • getFilePath

      public String getFilePath()
    • setFilePath

      public void setFilePath(String filePath)
    • getJMVATempPath

      public String getJMVATempPath()
    • getJSIMTempPath

      public String getJSIMTempPath()
    • getJmtJarPath

      public String getJmtJarPath()
    • setJmtJarPath

      public void setJmtJarPath(String path)
    • getMaxEvents

      public long getMaxEvents()
    • setMaxEvents

      public void setMaxEvents(long maxEvents)
    • getMaxSamples

      public long getMaxSamples()
    • setMaxSamples

      public void setMaxSamples(long maxSamples)
    • getMaxSimulatedTime

      public double getMaxSimulatedTime()
    • setMaxSimulatedTime

      public void setMaxSimulatedTime(double maxSimulatedTime)
    • getSimulationTimeoutSeconds

      public long getSimulationTimeoutSeconds()
    • setSimulationTimeoutSeconds

      public void setSimulationTimeoutSeconds(long timeoutSeconds)
    • getProbAggr

      public double getProbAggr(Node node, Matrix state_a)
    • getProbAggr

      public double getProbAggr(Node node)
    • getProbNormConstAggr

      public Ret.ProbabilityResult getProbNormConstAggr()
      Description copied from class: NetworkSolver
      Returns the logarithm of the normalizing constant of state probabilities. This is an abstract method that must be implemented by concrete solver subclasses.
      Overrides:
      getProbNormConstAggr in class NetworkSolver
      Returns:
      result containing the log normalizing constant
    • getResults

      public SolverResult getResults()
      Description copied from class: Solver
      Returns the results from the most recent solver execution.
      Overrides:
      getResults in class Solver
      Returns:
      the solver results
    • getResultsJMVA

      public JMTResult getResultsJMVA()
    • getResultsJSIM

      public JMTResult getResultsJSIM()
    • getAvgNode

      public 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.
      Overrides:
      getAvgNode in class NetworkSolver
      Returns:
      solver result containing node-level average metrics
    • getSeed

      public long getSeed()
    • setSeed

      public void setSeed(int seed)
    • getSimConfInt

      public double getSimConfInt()
    • setSimConfInt

      public void setSimConfInt(double simConfInt)
    • getSimMaxRelErr

      public double getSimMaxRelErr()
    • setSimMaxRelErr

      public void setSimMaxRelErr(double simMaxRelErr)
    • getStruct

      public NetworkStruct getStruct()
    • getTranCdfPassT

      public Ret.DistributionResult getTranCdfPassT()
      Description copied from class: NetworkSolver
      Returns cumulative distribution functions of passage times during transient analysis. Uses default response time handles.
      Overrides:
      getTranCdfPassT in class NetworkSolver
      Returns:
      result containing transient CDFs for passage times
    • getTranCdfPassT

      public Ret.DistributionResult getTranCdfPassT(AvgHandle R)
      Description copied from class: NetworkSolver
      Returns cumulative distribution functions of passage times during transient analysis. This is an abstract method that must be implemented by concrete solver subclasses.
      Overrides:
      getTranCdfPassT in class NetworkSolver
      Parameters:
      R - response time handles (optional)
      Returns:
      result containing transient CDFs for passage times
    • getTranCdfRespT

      public Ret.DistributionResult getTranCdfRespT()
      Description copied from class: NetworkSolver
      Returns cumulative distribution functions of response times during transient analysis. Uses default response time handles.
      Overrides:
      getTranCdfRespT in class NetworkSolver
      Returns:
      result containing transient CDFs for response times
    • getTranCdfRespT

      public Ret.DistributionResult getTranCdfRespT(AvgHandle R)
      Description copied from class: NetworkSolver
      Returns cumulative distribution functions of response times during transient analysis. This is an abstract method that must be implemented by concrete solver subclasses.
      Overrides:
      getTranCdfRespT in class NetworkSolver
      Parameters:
      R - response time handles (optional)
      Returns:
      result containing transient CDFs for response times
    • getTranAvg

      public void getTranAvg()
      Computes transient average station metrics over the specified time interval. This method overrides NetworkSolver.getTranAvg() to provide JMT-specific transient analysis.
      Overrides:
      getTranAvg in class NetworkSolver
    • getTranQLen

      public Matrix[][] getTranQLen()
      Returns transient queue length results from the last getTranAvg() call.
      Returns:
      Matrix array with transient queue length data [stations x classes]
    • getTranUtil

      public Matrix[][] getTranUtil()
      Returns transient utilization results from the last getTranAvg() call.
      Returns:
      Matrix array with transient utilization data [stations x classes]
    • getTranTput

      public Matrix[][] getTranTput()
      Returns transient throughput results from the last getTranAvg() call.
      Returns:
      Matrix array with transient throughput data [stations x classes]
    • hasAvgResults

      protected boolean hasAvgResults()
      Description copied from class: NetworkSolver
      Checks if the solver has computed steady-state average metrics.
      Overrides:
      hasAvgResults in class NetworkSolver
      Returns:
      true if steady-state results are available, false otherwise
    • jsimgView

      public void jsimgView()
    • jsimgView

      public void jsimgView(SolverOptions options)
    • jsimgView

      public void jsimgView(String jmtPath, SolverOptions options)
    • jsimgView

      public void jsimgView(String jmtPath)
    • jsimwView

      public void jsimwView(String jmtPath)
    • jsimwView

      public void jsimwView(String jmtPath, SolverOptions options)
    • jsimwView

      public void jsimwView() throws ParserConfigurationException
      Throws:
      ParserConfigurationException
    • listValidMethods

      public List<String> listValidMethods()
    • listValidMethods

      public List<String> listValidMethods(Network model)
    • probSysStateAggr

      public double probSysStateAggr()
    • runAnalyzer

      public void runAnalyzer() throws ParserConfigurationException
      Description copied from class: Solver
      Executes the solver algorithm to analyze the model. This abstract method must be implemented by concrete solver classes.
      Specified by:
      runAnalyzer in class Solver
      Throws:
      ParserConfigurationException - if XML parsing configuration fails
    • sampleAggr

      public Ret.SampleResult sampleAggr(Node node, int numEvents, boolean markActivePassive) throws IOException
      Throws:
      IOException
    • sampleAggr

      public Ret.SampleResult sampleAggr(Node node, int numEvents) throws IOException
      Throws:
      IOException
    • sampleAggr

      public Ret.SampleResult sampleAggr(Node node) throws IOException
      Throws:
      IOException
    • sampleSysAggr

      public Ret.SampleResult sampleSysAggr(long numEvents, boolean markActivePassive)
    • sampleSysAggr

      public Ret.SampleResult sampleSysAggr(long numEvents)
    • sampleSysAggr

      public Ret.SampleResult sampleSysAggr()
    • getTranProbAggr

      public 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

      public Ret.ProbabilityResult getProbSysAggr()
      Gets probability of the current system state in aggregated form. Uses simulation sampling to estimate the probability.
      Overrides:
      getProbSysAggr in class NetworkSolver
      Returns:
      Probability of the current system state
    • supports

      public boolean supports(Network model)
      Description copied from class: Solver
      Checks if this solver supports the given network model. Default implementation returns true; subclasses should override to provide specific feature validation.
      Overrides:
      supports in class Solver
      Parameters:
      model - the network model to check
      Returns:
      true if the model is supported, false otherwise
    • writeJSIM

      public String writeJSIM(NetworkStruct sn, String outputFileName) throws ParserConfigurationException
      Throws:
      ParserConfigurationException
    • writeJSIM

      public String writeJSIM(NetworkStruct sn) throws ParserConfigurationException
      Throws:
      ParserConfigurationException
    • QN2JSIMG

      public String QN2JSIMG(NetworkStruct sn, String outputFileName) throws ParserConfigurationException
      Writes queueing network model to JMT JSIMG format. Delegates to the standalone QN2JSIMG class in the io package.
      Parameters:
      sn - the network structure
      outputFileName - the output file name
      Returns:
      the path to the JSIM file
      Throws:
      ParserConfigurationException - if XML parsing fails
    • QN2JSIMG

      public String QN2JSIMG(NetworkStruct sn) throws ParserConfigurationException
      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
      Throws:
      ParserConfigurationException - if XML parsing fails