cnpryer / solverstack-route

Flask service for poc optimized vehicle routing.
MIT License
1 stars 0 forks source link
api docker flask microservice open-source optimization python routing vagrant vrp

solverstack-route

route

[Under Development] NOTE: API is not finalized and will change.

TODO: add current and future specs/features.

Service for route module.

MVP

/api/<version>/

Main Procedure

NOTE: origin initially will just be a single dictionary. Eventually lists will be accepted.

{
  "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>
}

Usage

Testing

(Optional) Using Docker container for testing

You can use a Docker container for running the tests by using the provided Dockerfile.test

TODO

Other

See cvrp-poc for demo application.

Demo Image