Package jline.io
Class LineModelIO
-
- All Implemented Interfaces:
public class LineModelIOProvides 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) { ... }
-
-
Constructor Summary
Constructors Constructor Description LineModelIO()
-
Method Summary
-
-
Method Detail
-
save
static void save(Network model, String filename)
Saves a Network model to a JSON file.
- Parameters:
model- the queueing network model to savefilename- the output file path (should end with .
-
save
static void save(LayeredNetwork model, String filename)
Saves a LayeredNetwork model to a JSON file.
- Parameters:
model- the layered queueing network model to savefilename- the output file path (should end with .
-
load
static Object load(String filename)
Loads a model from a JSON file.
- Parameters:
filename- the input file path- Returns:
a Network or LayeredNetwork depending on the model type
-
-
-
-