Class SaveHandlers

java.lang.Object
jline.solvers.jmt.handlers.SaveHandlers

public class SaveHandlers extends Object
Handles the generation and serialization of JMT (Java Modelling Tools) simulation models.

This class is responsible for converting LINE network models into JMT XML format for discrete-event simulation. It provides comprehensive support for translating various network components including nodes, routing strategies, service disciplines, and performance metrics.

The class supports both JSIMg (JMT Simulation Graph) and JSIM (JMT Simulation) XML formats, with JSIMg being the default format that includes additional simulation parameters such as confidence intervals, maximum relative error, and stopping criteria.

Key Features:

  • Conversion of LINE Network models to JMT XML format
  • Support for complex routing strategies and class switching
  • Handling of various node types (Sources, Queues, Delays, Sinks, etc.)
  • Translation of service disciplines and scheduling strategies
  • Cache modeling with different replacement strategies
  • Fork-join synchronization patterns
  • Performance metric collection and measurement configuration

Supported Node Types:

  • Sources with various arrival processes
  • Queues with different scheduling disciplines
  • Delay stations for pure delays
  • Sinks for job termination
  • Routers for probabilistic routing
  • Forks and Joins for synchronization
  • Caches with replacement strategies
  • Transitions for Petri net models
See Also:
  • Constructor Details

    • SaveHandlers

      public SaveHandlers(Network simModel, double simMaxRelErr, double simConfInt, SolverAvgHandles avgHandles, long seed, String simFileName, long maxEvents, long maxSamples, double maxSimulatedTime)
      Constructs a SaveHandlers instance with full simulation parameter control.

      This constructor allows complete customization of all simulation parameters for JMT model generation. It is typically used when specific simulation configuration is required beyond the default settings.

      Parameters:
      simModel - The LINE network model to be converted to JMT format
      simMaxRelErr - Maximum relative error for simulation stopping criterion (e.g., 0.03 for 3%)
      simConfInt - Confidence interval for simulation results (e.g., 0.99 for 99%)
      avgHandles - Collection of performance metric handlers to be included in the simulation
      seed - Random number generator seed for reproducible simulation results
      simFileName - Output filename for the simulation model (empty string for default naming)
      maxEvents - Maximum number of events to simulate (0 for unlimited)
      maxSamples - Maximum number of samples to collect for each metric
      maxSimulatedTime - Maximum simulation time (use GlobalConstants.Inf for unlimited)
    • SaveHandlers

      public SaveHandlers(Network simModel)
      Constructs a SaveHandlers instance with default simulation parameters.

      This convenience constructor uses SolverJMT default values for all simulation parameters, making it suitable for most standard simulation scenarios. The default configuration provides reasonable accuracy and performance for typical queueing network analysis.

      Default Parameters:

      • Maximum relative error: 3%
      • Confidence interval: 99%
      • Random seed: 23000
      • Maximum samples: 10,000
      • Maximum events: unlimited
      • Maximum simulation time: unlimited
      Parameters:
      simModel - The LINE network model to be converted to JMT format
  • Method Details