[Under Development] NOTE: API is not finalized and will change.
TODO: add current and future specs/features.
Service for route module.
/api/<version>/
NOTE: origin
initially will just be a single dictionary. Eventually lists will be accepted.
/route
POST
{
"stack_id": <int>,
"origin": {
"id": <int>,
"latitude": <float>,
"longitude": <float>
},
"demand": [
{
"id": <int>,
"latitude": <float>,
"longitude": <float>,
"quantity": <int>
}
],
"unit": <str>,
"vehicle_max_capacity_units": <int>,
// **OPTIONAL**
"vehicle_definitions": [
<int>
]
}
vehicle_max_capacity_units should be the same unit of measure as unit.
vehicle_definitions (optional) represent both the number of vehicles and their max capacities.
"vehicle_definitions": [26, 26, 26, 26]
{
"stack_id": <int>,
"origin": [{
"id": <int>,
"latitude": <float>,
"longitude": <float>
}],
"demand": [{
"id": <int>,
"latitude": <float>,
"longitude": <float>,
"quantity": <int>
}],
"routes": [{
"id": <int>,
"cluster_id": <int>,
"vehicle_id": <int>,
"stop_num": <int>
}],
"unit": <str>,
"vehicle_max_capacity_units": <int>
}
cd solverstack-route
or open a terminal in the solverstack-route directory.python -m pip install -r requirements.txt
python manage.py runserver
pytest
modulepython -m pip install -r requirements-dev.txt
python -m pytest
You can use a Docker container for running the tests by using the provided Dockerfile.test
docker build -f Dockerfile.test . -t andromia:solverstack-route-test
.docker run andromia:solverstack-route-test
dict
[key][key]... with pandas
wrappers.See cvrp-poc for demo application.