Class OpenExamples
This class contains Java implementations that mirror the example notebooks found in jar/src/main/java/jline/examples/java/basic/openQN/. Each method demonstrates a specific open queueing network concept using models from the basic package.
The examples cover: - Basic open networks with multiple solver comparisons - Class switching and routing patterns - Multi-class systems with complex topologies - Trace-driven service and empirical distributions - One-line network specifications - Virtual sinks and probabilistic routing
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidMain method demonstrating all open queueing network examples.static voidTransient MAP/MAP/1 (mam_transient_mapmap1.m / .py / .cpp).static voidstatic voidA BATCH, MARKED, time-inhomogeneous MAP arrival stream (oqn_bmmapt.m / .py / .cpp).static voidThree-class open network with class switching (oqn_cs_routing.ipynb).static voidComplex multi-class open network with four queues (oqn_fourqueues.ipynb).static voidA time-inhomogeneous MAP as the SERVICE process (oqn_mapt_service.m / .py / .cpp).static voidA MARKED, time-inhomogeneous MAP arrival stream (oqn_mmapt.m / .py / .cpp).static voidoqn_nhpp()Non-homogeneous Poisson arrivals (oqn_nhpp.ipynb).static voidOne-line tandem PS network specification (oqn_oneline.ipynb).static voidOpen network with trace-driven service (oqn_trace_driven.ipynb).static voidOpen network with virtual sinks (oqn_vsinks.ipynb).
-
Constructor Details
-
OpenExamples
public OpenExamples()
-
-
Method Details
-
oqn_nhpp
Non-homogeneous Poisson arrivals (oqn_nhpp.ipynb).The golden holds the discrete-event row; the transient fluid solve beside it is what the reference prints second.
- Throws:
Exception
-
oqn_mapt_service
A time-inhomogeneous MAP as the SERVICE process (oqn_mapt_service.m / .py / .cpp).The walk is taken from the SERVICE START epoch and the modulating phase carries across successive services, so the stream is correlated as well as non-stationary. The constant-schedule pair beside it is the degeneracy: a MAP_t whose segments are identical must reproduce the ordinary MAP.
- Throws:
Exception- if the solver fails
-
oqn_mmapt
A MARKED, time-inhomogeneous MAP arrival stream (oqn_mmapt.m / .py / .cpp).Both segments carry an aggregate rate of 4, so the total arrival stream is statistically identical throughout; what changes is the SPLIT, 9:1 towards Morning by day and 1:9 towards Evening by night. The cycle average is a flat 2:2, so a run showing anything else is reading the marks from the segment in force rather than from the average, which is the whole point of the family.
- Throws:
Exception- if the solver fails
-
oqn_bmmapt
A BATCH, MARKED, time-inhomogeneous MAP arrival stream (oqn_bmmapt.m / .py / .cpp).Every segment fires epochs at rate 4, so the epoch stream is identical throughout and only the labels move: Premium arrives in PAIRS by day and singly by night, Economy the other way round. The JOB rate therefore differs from the EPOCH rate, and differs per class within a segment even though the epoch rate does not, which a model reading either label off the time-averaged matrices would miss entirely.
- Throws:
Exception- if the solver fails
-
mam_transient_mapmap1
Transient MAP/MAP/1 (mam_transient_mapmap1.m / .py / .cpp).WHICH ENGINE RUNS is not chosen here and is not chosen by the method either: SolverMAM.getTranAvg forces "ldqbd" and the transient QBD applicability test then sends a correlated MAP arrival with a correlated MAP service to the Laplace-domain transient QBD. That is the same dispatch the MATLAB and Python references take, so the four codebases run the same algorithm on the same model rather than agreeing by coincidence.
- Throws:
Exception- if the solver fails
-
oqn_basic
- Throws:
Exception
-
oqn_cs_routing
Three-class open network with class switching (oqn_cs_routing.ipynb).Demonstrates class switching behavior in open networks where jobs can transform from one class to another during processing.
Features: - Three open classes: Class A and B arrive, Class C created via switching - Class switching from A→C and B→C at ClassSwitch node - Two PS queues with different service rates per class - Multiple solver comparison (CTMC, Fluid, MVA, MAM, NC, JMT, SSA)
- Throws:
Exception- if solver fails
-
oqn_fourqueues
Complex multi-class open network with four queues (oqn_fourqueues.ipynb).Demonstrates a web service architecture with multiple storage systems and complex feedback routing patterns.
Features: - Three open classes with different arrival rates and priorities - Four queues: WebServer (FCFS), Storage1 (FCFS), Storage2 (PS), Storage3 (FCFS) - Complex feedback routing with 25% probability splits - Multiple solver comparison (CTMC, MVA, MAM, JMT) - matches MATLAB coverage
- Throws:
Exception- if solver fails
-
oqn_oneline
One-line tandem PS network specification (oqn_oneline.ipynb).Demonstrates compact network specification using matrix-based constructors for processor sharing queues with delays.
Features: - Matrix-based constructor for PS queues with delay - Lambda matrix defines arrival rates for multiple classes - D matrix defines service demands at stations - Z matrix defines service times at delay stations
- Throws:
Exception- if solver fails
-
oqn_trace_driven
Open network with trace-driven service (oqn_trace_driven.ipynb).Demonstrates empirical service time distributions driven by trace files, useful for modeling real workload patterns.
Features: - Single open class with exponential arrivals - Queue service driven by trace file (example_trace.txt) - Empirical service time distributions from real data - Simple Source → Queue → Sink topology
- Throws:
Exception- if solver fails
-
oqn_vsinks
Open network with virtual sinks (oqn_vsinks.ipynb).Demonstrates probabilistic routing to multiple exit points using virtual sinks for different departure streams.
Features: - Two open classes with different routing patterns - Class1: 60% to VSink1, 40% to VSink2 - Class2: 10% to VSink1, 90% to VSink2 - Router nodes as intermediate destinations - Multiple exit points from the network
- Throws:
Exception- if solver fails
-
main
Main method demonstrating all open queueing network examples.Executes all example methods to showcase the different open network concepts and solution approaches available in LINE.
- Parameters:
args- command line arguments (not used)- Throws:
Exception- if any example fails
-