Giter VIP home page Giter VIP logo

findfastdeliveryway's Introduction

FindFastDeliveryWay

Run http post service

python -m flask run use postman or curl to test service.

Ex request:

curl --location --request POST 'http://127.0.0.1:5000/create-routes-service'
--header 'Content-Type: application/json'
--data-raw '{ "vehicles": [ { "id": 1, "start_index": 0, "capacity": [ 4 ] }, { "id": 2, "start_index": 1, "capacity": [ 6 ] }, { "id": 3, "start_index": 2, "capacity": [ 6 ] } ], "jobs": [ { "id": 1, "location_index": 3, "delivery": [ 2 ], "service": 327 }, { "id": 2, "location_index": 4, "delivery": [ 1 ], "service": 391 }, { "id": 3, "location_index": 5, "delivery": [ 1 ], "service": 297 }, { "id": 4, "location_index": 6, "delivery": [ 2 ], "service": 234 }, { "id": 5, "location_index": 7, "delivery": [ 1 ], "service": 357 }, { "id": 6, "location_index": 8, "delivery": [ 1 ], "service": 407 }, { "id": 7, "location_index": 9, "delivery": [ 1 ], "service": 382 } ], "matrix": [ [ 0, 516, 226, 853, 1008, 1729, 346, 1353, 1554, 827 ], [ 548, 0, 474, 1292, 1442, 2170, 373, 1801, 1989, 1068 ], [ 428, 466, 0, 1103, 1175, 1998, 226, 1561, 1715, 947 ], [ 663, 1119, 753, 0, 350, 1063, 901, 681, 814, 1111 ], [ 906, 1395, 1003, 292, 0, 822, 1058, 479, 600, 1518 ], [ 1488, 1994, 1591, 905, 776, 0, 1746, 603, 405, 1676 ], [ 521, 357, 226, 1095, 1167, 1987, 0, 1552, 1705, 1051 ], [ 1092, 1590, 1191, 609, 485, 627, 1353, 0, 422, 1583 ], [ 1334, 1843, 1436, 734, 609, 396, 1562, 421, 0, 1745 ], [ 858, 1186, 864, 1042, 1229, 1879, 984, 1525, 1759, 0 ] ] }'

Ex response:

{"total_delivery_duration": 4815, "routes": {"1": {"jobs": [9, 3, 4], "delivery_duration": 2219}, "2": {"jobs": [], "delivery_duration": 0}, "3": {"jobs": [6, 7, 8, 5], "delivery_duration": 2596}}}

Run script

python create_routes.py

findfastdeliveryway's People

Contributors

tolgabuyuktanir avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.