Metadata-Version: 2.1
Name: routy
Version: 0.1.2
Summary: Library for comparing routing models
Home-page: https://github.com/sofaki000/routy
Author: Sofia Kardami
Author-email: sofikardami2000@gmail.com
License: MIT
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown

# Routy

### Comparing routing algorithms made easy

Ever worked on your reinforcement learning routing algorithm and wondered how on earth it is performing? How do you convince someone you are actually providing a better solution than their existing heuristics?

Routy is the library to help you do exactly that.
 
 

# Usage

## Installation

Install your library.

```sh
pip install routy
```
## Examples

Import the library
```python
from routy import Comparison
```

Initialize your comparison object.
```python
comparison = Comparison()
```


- **plot_route**

After you have gotten the suggested route by your model, pass the coordinates,
the suggested route, and optionally the file name in the plot_route method. This method saves an image
at the filename.png file displaying the route your model suggested.

```python
coordinates = [(0, 0), (1, 1), (2, 2), (3, 0), (1, -1)]
route = [0, 1, 2, 3, 4]
filename = "myroute"
comparison.plot_route(coordinates, route, filename)
```

- **plot_routes**

Let's say you have more than one model and you want to compare the route each model
suggests for the same coordinates. You can do that using the 'plot_routes' function.

```python
coordinates = [(0, 0), (1, 1), (2, 2), (3, 0), (1, -1)]
route1 = [0, 1, 2, 3, 4]
route2 = [1, 2, 0, 4, 3]

# Pass multiple routes as a list
all_routes = [route1, route2]
comparison.plot_routes(coordinates, all_routes, filename)
```

## All available methods

You can find all the available methods documented [here](https://sofaki000.github.io/routy/). 
This is autogenerated documentation, so you can take its word more seriously :)


# Development

Want to create a pull request? This section is for you.


### Documentation is important

Create documentation by running this command at project folder.

```sh
pdoc --html --force . ./comparison.py 
```
 
