Package jline.io

Class LineModelIO

  • All Implemented Interfaces:

    
    public class LineModelIO
    
                        

    Provides save/load functionality for LINE queueing network models to/from JSON format.

    Supports both Network (queueing network) and LayeredNetwork (layered queueing network) models. The JSON format follows the line-model.schema.json specification.

    Usage:

      // Save a Network model
      LineModelIO.save(model, "mymodel.json");
    
      // Save a LayeredNetwork model
      LineModelIO.save(lqnModel, "mylqn.json");
    
      // Load any model
      Object model = LineModelIO.load("mymodel.json");
      if (model instanceof Network) { ... }
      if (model instanceof LayeredNetwork) { ... }
    
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      LineModelIO()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • LineModelIO

        LineModelIO()
    • Method Detail

      • toJsonObject

         static JsonObject toJsonObject(Network model)

        Builds a JsonObject representation of a Network model.

        Parameters:
        model - the queueing network model to serialize
        Returns:

        the JSON document representing the model

      • save

         static void save(Network model, String filename)

        Saves a Network model to a JSON file.

        Parameters:
        model - the queueing network model to save
        filename - the output file path (should end with .
      • toJsonObject

         static JsonObject toJsonObject(LayeredNetwork model)

        Builds a JsonObject representation of a LayeredNetwork model.

        Parameters:
        model - the layered queueing network model to serialize
        Returns:

        the JSON document representing the model

      • save

         static void save(LayeredNetwork model, String filename)

        Saves a LayeredNetwork model to a JSON file.

        Parameters:
        model - the layered queueing network model to save
        filename - the output file path (should end with .
      • save

         static void save(Workflow model, String filename)

        Saves a Workflow model to a JSON file.

        Parameters:
        model - the workflow model to save
        filename - the output file path (should end with .
      • save

         static void save(Environment env, String filename)

        Saves an Environment model to a JSON file.

        Parameters:
        env - the environment model to save
        filename - the output file path (should end with .