Skip to content

About

Simulation and algorithms for queueing theory (Python/Java/C++/Matlab)

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

LINE Solver

Download LINE Download LINE

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. See the LINE website.

After version 2.0.39, LINE has made extensive use of AI-assistance for its development. Please refer to the AI-DISCLOSURE document for a description.

Available Versions

Version Folder Requirements Maturity Manual API Reference
MATLAB matlab/ MATLAB Stable PDF, Primer Sphinx
Java jar/ Java SE 8+ Stable PDF, Primer Javadoc
Python Native python/ Python 3.11+ Stable PDF, Primer Sphinx
C++ cpp/ C++17 compiler Stable PDF, Primer Doxygen

The jar/ folder contains the canonical Java implementation, building common/jline.jar. The JAR is callable from any JVM language and is the portable option: one self-contained file, no build step, any platform with a JVM. Native Python users should use the python/ folder.

The cpp/ folder holds the C++ port (headers in cpp/include/line/, plus the line_mp_api library that programs link for the solver facade), the line-cli binary and the native LDES simulation engine. It is the fastest implementation and ships as source; build it with cpp/make.sh -O for an optimized build.

Command-Line Interface

The line-cli.py script solves models from the command line. It wraps the Java JAR and supports multiple solvers, LINE's native JSON format, and table, JSON and CSV output. Run

python line-cli.py solve example.json --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 a WebSocket server; an HTTP REST API is available in io/rest-api/.

LINE's native model format is a JSON shared across the MATLAB, Java and Python codebases. See example.json (a queueing network) and example_lqn.json (a layered network) in the repository root. It is specified by doc/line-model.schema.json (JSON Schema) and documented in the "JSON model format" appendix of each manual. line-cli.py also accepts JMT's JSIMG and LQNS's LQNX formats.

MCP Integration (for LLM-based Analysis)

LINE ships a Model Context Protocol (MCP) server, for building and solving models from LLM clients such as Claude Code and Claude Desktop. pip install line-solver installs the server and the MCP SDK and puts a line-mcp command on your path; point your MCP client at that command. See the MCP Getting Started Guide for setup and examples.

License

LINE is released under the BSD-3 license. It also invokes and embeds third-party software; see THIRD-PARTY-NOTICES.md for attributions, per-component license terms, and which external solvers are redistributed rather than installed by the user.

Acknowledgement

LINE has been partially funded by the European Commission grants FP7-318484 (MODAClouds), H2020-644869 (DICE), H2020-825040 (RADON), the Horizon Europe grants 101299128 (EuroFMX) and 101298393 (f-inference), and by the EPSRC grant EP/M009211/1 (OptiMAM).

About

Simulation and algorithms for queueing theory (Python/Java/C++/Matlab)

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages