Metadata-Version: 2.4
Name: line-solver
Version: 3.0.7.0
Summary: Open source queueing theory solvers
License: BSD-3
License-File: AUTHORS
License-File: LICENSE
Author: Giuliano Casale
Author-email: g.casale@imperial.ac.uk
Requires-Python: >=3.11
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Provides-Extra: gpu
Provides-Extra: native
Provides-Extra: symbolic
Requires-Dist: matplotlib (>=3.10.6,<4.0.0)
Requires-Dist: mcp (>=2.0,<3.0)
Requires-Dist: networkx (>=3.6,<4.0)
Requires-Dist: numpy (>=2.3.3,<3.0.0)
Requires-Dist: pandas (>=2.3.2,<3.0.0)
Requires-Dist: scipy (>=1.16.2,<2.0.0)
Requires-Dist: sympy (>=1.10) ; extra == "symbolic"
Requires-Dist: torch (>=2.0.0) ; extra == "native" or extra == "gpu"
Requires-Dist: websockets (>=12.0,<13.0)
Project-URL: Homepage, https://line-solver.sourceforge.net
Description-Content-Type: text/markdown

# LINE Solver for Python 
This folder includes the Python version of the [LINE solver](http://line-solver.sf.net).

## Installation
Requirements: Python 3.11 or later.

Install from PyPI with:
```
pip install line-solver
```
Alternatively, install from source by running `pip install .` in this folder.

After installing, run `line-install` (or `python3 -c "import line_solver; line_solver.line_install()"`) to check optional dependencies. It warns when Java or the symbolic backend is missing without failing.

## Symbolic backend (optional)
The symbolic methods of `SolverCTMC`/`SolverFLD` use a SageMath service packaged as the Docker image [`imperialqore/line-sage-rest`](https://hub.docker.com/r/imperialqore/line-sage-rest). It is not pulled automatically on first use, so obtain it once with `docker pull imperialqore/line-sage-rest:latest`; thereafter LINE starts and stops a container on its own. Without it, symbolic analysis falls back on `sympy`.

## Documentation
The Python syntax is nearly identical to the MATLAB one, see for example the scripts in the Python `examples/gettingstarted/` folder compared to the ones in the corresponding MATLAB `examples/gettingstarted/` folder.

A Python version of the [manual](https://line-solver.sourceforge.net/doc/LINE-user-python.pdf) is also available.

## Example
Solve a simple M/M/1 model with 50% utilization running: ```python3 mm1.py```. You should then get as output the following pandas DataFrame
```
Station  JobClass     QLen     Util   RespT  ResidT    ArvR    Tput
Source   Class1          0        0       0       0       0     1.0
Queue    Class1        1.00     0.50    1.00    1.00     1.0     1.0
```
Alternatively, you can open and run mm1.ipynb in Jupyter.

## Getting Started Examples
The `examples/gettingstarted/` folder contains tutorial examples demonstrating key LINE features.

## License
This package is released as open source under the [BSD-3 license](http://opensource.org/licenses/BSD-3-Clause).

