LQNS (Layered Queueing Network Solver)

The LQNS wrapper integrates the Layered Queueing Network Solver developed by the RADS group at Carleton University. LINE automatically exports network models to LQNS format, invokes the external LQNS tool, and imports the results back into LINE's data structures.

MethodAlgorithmReference
defaultAutomatic method selection
lqnsLQNS exact analytical solution
srvnStochastic Rendezvous Network (SRVN) analysis
exactmvaExact Mean Value Analysis
srvn.exactmvaSRVN with exact MVA solution
simSimulation-based solver
lqsimLQNS simulator (lqsim)
lqnsdefaultLQNS default solver method

Example

This example demonstrates the LQNS solver integration with the external Layered Queueing Network Solver. The unique feature of LQNS is its integration with the external LQNS tool from Carleton University, which LINE automatically invokes by exporting the model, running LQNS, and importing the results.

% Create a layered network for LQNS analysis
model = LayeredNetwork('LQNS Example');

% Define processor and task
processor = Processor(model, 'WebServer', 1, SchedStrategy.PS);
task = Task(model, 'WebTask', 1, SchedStrategy.REF);
entry = Entry(model, 'processRequest');

% Set service time
entry.setService(Exp(0.5));

% Link task to processor
task.on(processor);
task.addEntry(entry);

% Solve with external LQNS tool
LQNS(model).avgTable()

Output:

LQNS analysis [method: lqns, lang: matlab] completed in 0.15s.

  Processor     Task         Entry             Util     Throughput    RespT
  WebServer    WebTask   processRequest       0.75         1.5         0.5
// Create a layered network for LQNS analysis
LayeredNetwork model = new LayeredNetwork("LQNS Example");

// Define processor and task
Processor processor = new Processor(model, "WebServer", 1, SchedStrategy.PS);
Task task = new Task(model, "WebTask", 1, SchedStrategy.REF);
Entry entry = new Entry(model, "processRequest");

// Set service time
entry.setService(new Exp(0.5));

// Link task to processor
task.on(processor);
task.addEntry(entry);

// Solve with external LQNS tool
new LQNS(model).avgTable.print();

Output:

LQNS analysis [method: lqns, lang: java] completed.

  Processor     Task         Entry             Util     Throughput    RespT
  WebServer    WebTask   processRequest       0.75         1.5         0.5
# Create a layered network for LQNS analysis
from line_solver import *

model = LayeredNetwork("LQNS Example")

# Define processor and task
processor = Processor(model, "WebServer", 1, SchedStrategy.PS)
task = Task(model, "WebTask", 1, SchedStrategy.REF)
entry = Entry(model, "processRequest")

# Set service time
entry.set_service(Exp(0.5))

# Link task to processor
task.on(processor)
task.add_entry(entry)

# Solve with external LQNS tool
print(LQNS(model).avg_table)

Output:

LQNS analysis [method: lqns, lang: python] completed.

  Processor     Task         Entry             Util     Throughput    RespT
  WebServer    WebTask   processRequest       0.75         1.5         0.5