LINE is an open-source software package to analyze queueing models via analytical methods or simulation. The package is developed by the QORE lab at Imperial College London and distributed under the BSD-3 license.
The package offers solution algorithms for queueing systems (e.g., M/M/1, M/M/k, M/G/1, ...), queueing networks, layered queueing networks, and queueing models in random environments. Models are solved in LINE either natively or via external solvers, such as JMT, LQNS, MAMSolver, Q-MAM, SMCSolver, and BuTools. Visit the LINE website for more information.
| Version | Folder | Requirements | Maturity | Manual | API Reference |
|---|---|---|---|---|---|
| MATLAB | matlab/ | MATLAB | Stable | PDF, Primer | Doxygen |
| Java | jar/ | Java SE 8+ | Stable | PDF, Primer | Javadoc |
| Python Native | python/ | Python 3.11+ | Stable | PDF, Primer | Sphinx |
The jar/ folder contains the canonical Java implementation, building common/jline.jar, which is callable from any JVM language. A former JPype-based Python Wrapper has been retired; native Python users should use the python/ folder, and users needing JAR-backed performance can call common/jline.jar directly. The JAR implementation offers better performance than the native Python version for large-scale and layered models.
The line-cli.py script provides a standalone command-line interface for solving queueing network models without writing code. It wraps the Java JAR and supports multiple solvers, input formats (Java Modelling Tools's JSIMG format; LQNS's LQNX format), and output formats (table, JSON, CSV). Run
python line-cli.py solve example.jsimg --solver mva
to solve a model,
python line-cli.py list solvers
to see available solvers, or
python line-cli.py info
for command line options and features. The script can also start WebSocket or REST API servers for integration with other tools.
LINE is available as a Model Context Protocol (MCP) server, enabling LLM tools such as Claude Code and Claude Desktop to build and solve queueing models through natural language. With MCP, users can analyze queues, sweep parameters, compare solvers, and visualize networks without writing any code.
Install from PyPI:
pip install line-solver
Then configure your MCP client to use line-solver as a server, see the MCP Getting Started Guide for setup instructions and usage examples.
The symbolic methods of SolverCTMC and SolverFluid (exact stationary
distributions, parametric sensitivities, fluid Jacobians) delegate to a
SageMath computer algebra system packaged as the Docker image
imperialqore/line-sage-rest.
The image is not pulled automatically on first use, so obtain it once with:
docker pull imperialqore/line-sage-rest:latest
After that, LINE starts and stops a container on its own when a symbolic method
is requested. An environment check reports whether the image is present and how
to obtain it: run lineInstall (MATLAB), line-install or
line_solver.line_install() (Python), or
java -cp jline.jar jline.cli.LineInstall (JAR). MATLAB and Python fall back on
the Symbolic Math Toolbox and sympy respectively when the backend is absent;
the JAR has no computer algebra system of its own.
LINE is released under the BSD-3 license. LINE also invokes and embeds software written by other groups; see THIRD-PARTY-NOTICES.md for the attribution, the license terms of each component, and the policy on which external solvers are redistributed as opposed to installed by the user from their upstream site.
LINE has been partially funded by the European Commission grants FP7-318484 (MODAClouds), H2020-644869 (DICE), H2020-825040 (RADON), and by the EPSRC grant EP/M009211/1 (OptiMAM).