JMT (Java Modelling Tools)

Methods · Configuration · Shared options · All solvers

The JMT solver is a wrapper for the Java Modelling Tools suite, providing model-to-model transformation from LINE's data structures into JMT's input XML formats. It supports both discrete-event simulation via JSIM and mean value analysis via JMVA. LINE uses a custom build of JMT: JAR, sources.

Methods

The method names and defaults below describe the MATLAB interface. Aliases share a row; model-specific restrictions and backend differences are noted. Use solver.listValidMethods() to inspect the names available for your model.

JMT methods and aliases
MethodAlgorithm and applicabilityReference
defaultResolves to jsim, or to replication when options.timespan(2) is finite.
jsimJSIMengine discrete-event simulation of the model.[1]
replicationIndependent transient replications in JSIM, averaged; needs a finite timespan.
jmvaThe JMVA analytical engine, algorithm left to JMVA.
jmva.mvaExact MVA inside JMVA.[2]
jmva.amvaJMVA's approximate MVA.
jmva.recalRECAL, the recursion by chain for the normalizing constant.[3]
jmva.comomClass-oriented method of moments; single-chain models only, because JMVA's multiclass CoMoM perturbs a singular system and reports the result as exact.[4]
jmva.chowChow's approximate MVA.[8]
jmva.bsBard-Schweitzer inside JMVA.[5]
jmva.aqlAggregate Queue Length inside JMVA.[9]
jmva.linLinearizer inside JMVA.[6]
jmva.dmlinDe Souza-Muntz Improved Linearizer inside JMVA.[7]

Configuration options

The solver-specific fields below belong to options.config. Set them on an options struct, for example opt.config.name = value, and pass that struct to the solver constructor. See shared solver options for all top-level fields, shared configuration, defaults and usage. Options apply only to the methods and model features that consume them.

Relevant top-level options: samples, seed, confint, timespan, keep, rest_url.

rest_url selects a REST engine. config.container selects the JMT Docker image. A finite timespan makes the default method use transient replications; keep controls intermediate files.

Solver-specific configuration
OptionDefaultDescription and values
container''JMT only: Docker image to run the engine in; empty uses imperialqore/jmt-rest or LINE_JMT_IMAGE. LQNS, lqsim and qnsolver ignore it and need a local binary.

Example

This example demonstrates solving a simple M/M/1 queue using the JMT solver with discrete-event simulation. The unique feature shown here is the ability to specify a random seed and number of samples for reproducible simulation results.

% Create a simple M/M/1 queue
model = Network('M/M/1 Example');
source = Source(model, 'Source');
queue = Queue(model, 'Queue1', SchedStrategy.FCFS);
sink = Sink(model, 'Sink');

jobclass = OpenClass(model, 'Class1');
source.setArrival(jobclass, Exp(0.9));
queue.setService(jobclass, Exp(1.0));

model.link(Network.serialRouting(source, queue, sink));

% Solve with JMT (simulation with specific seed and samples)
solver = JMT(model, 'seed', 23000, 'samples', 10000);

% Display average performance metrics
JMT(model, 'seed', 23000, 'samples', 10000).avgTable()

Output:

Default method: using JSIM discrete-event simulation
JMT analysis [method: default; type: approximate, randomized; lang: matlab; env: 2025a] completed in 1.068s.

ans =
  2×8 table
    Station    JobClass     QLen      Util      RespT     ResidT     ArvR       Tput
    _______    ________    ______    _______    ______    ______    _______    _______
    Source      Class1          0          0         0         0          0    0.89313
    Queue1      Class1     5.0616    0.87445    8.2595    8.2595    0.89313    0.89063
import jline.lang.*;
import jline.lang.constant.SchedStrategy;
import jline.lang.nodes.*;
import jline.lang.processes.Exp;
import jline.solvers.NetworkAvgTable;
import jline.solvers.SolverOptions;
import jline.solvers.jmt.JMT;

public class JMTExample {
    public static void main(String[] args) {
        // Create a simple M/M/1 queue
        Network model = new Network("M/M/1 Example");

        Source source = new Source(model, "Source");
        Queue queue = new Queue(model, "Queue1", SchedStrategy.FCFS);
        Sink sink = new Sink(model, "Sink");

        OpenClass jobclass = new OpenClass(model, "Class1");
        source.setArrival(jobclass, Exp.fitRate(0.9));
        queue.setService(jobclass, Exp.fitRate(1.0));

        model.link(Network.serialRouting(source, queue, sink));

        // Solve with JMT (simulation with specific seed and samples)
        JMT solver = new JMT(model);
        solver.options.seed = 23000;
        solver.options.samples = 10000;

        // Display average performance metrics
        NetworkAvgTable avgTable = solver.avgTable;
        System.out.println(avgTable);
    }
}

Output:

Default method: using JSIM discrete-event simulation
JMT analysis [method: default; type: approximate, randomized; lang: java; env: 17.0.9] completed.

Station    JobClass     QLen      Util      RespT     ResidT     ArvR       Tput
Source     Class1       0.0       0.0       0.0       0.0        0.0        0.89313
Queue1     Class1       5.0616    0.87445   8.2595    8.2595     0.89313    0.89063
from line_solver import *

# Create a simple M/M/1 queue
model = Network('M/M/1 Example')

source = Source(model, 'Source')
queue = Queue(model, 'Queue1', SchedStrategy.FCFS)
sink = Sink(model, 'Sink')

jobclass = OpenClass(model, 'Class1')
source.setArrival(jobclass, Exp(0.9))
queue.setService(jobclass, Exp(1.0))

model.link(Network.serialRouting(source, queue, sink))

# Solve with JMT (simulation with specific seed and samples)
solver = JMT(model, seed=23000, samples=10000)

# Display average performance metrics
print(solver.avg_table)

Output:

Default method: using JSIM discrete-event simulation
JMT analysis [method: default; type: approximate, randomized; lang: python; env: 3.13.7] completed.

  Station  JobClass    QLen     Util      RespT    ResidT     ArvR      Tput
0  Source    Class1     0.0      0.0       0.0      0.0        0.0       0.89313
1  Queue1    Class1     5.0616   0.87445   8.2595   8.2595     0.89313   0.89063

References

  1. Bertoli, M., Casale, G., & Serazzi, G. (2007). JMT: Performance evaluation software. ACM SIGMETRICS.
  2. Reiser, M., & Lavenberg, S. S. (1980). Mean-value analysis of closed multichain queuing networks. JACM.
  3. Conway, A. E., & Georganas, N. D. (1986). RECAL algorithm. JACM.
  4. Casale, G. (2009). CoMoM. IEEE TSE.
  5. Bolch, G., et al. (2006). Queueing Networks and Markov Chains. Wiley.
  6. Chandy, K. M., & Neuse, D. (1982). Linearizer. CACM.
  7. de Souza e Silva, E. G., & Muntz, R. R. (1990). Performance Evaluation.
  8. Chow, W. M. (1983). Performance Evaluation.
  9. Zahorjan, G. J., et al. (1988). IEEE TSE.