Expand description
A documented subset of QNAP2 for queueing network simulation.
Parse and run a model with an explicit random seed:
let source = r#"
/DECLARE/
QUEUE INPUT, DESK;
/STATION/
NAME=INPUT;
TYPE=SOURCE;
SERVICE=EXP(2);
TRANSIT=DESK;
/STATION/
NAME=DESK;
TYPE=SERVER,SINGLE;
SERVICE=EXP(1);
TRANSIT=OUT;
/CONTROL/
TMAX=10000;
/EXEC/
BEGIN
SIMUL;
END;
/END/
"#;
let report = qrunap2::run(source, 42)?;
assert_eq!(report.seed, 42);
assert_eq!(report.stations.len(), 2);This crate implements a limited language subset, not full QNAP2 compatibility. See the compatibility guide for supported constructs and limitations.
Structs§
- Model
- A validated network description and finite simulation horizon.
- Report
- Simulation totals, per-station statistics and sampled population trace.
- Station
- A source or service station and its routing destination.
- Station
Report - Statistics for a source or service station over the simulation horizon.
- Trace
- A sample of the network population at a simulation time.
Enums§
- Distribution
- A constant duration or an exponential duration parameterized by its mean.