{"__v":4,"_id":"56512c6f0d8a490d00295b67","api":{"auth":"required","params":[],"results":{"codes":[]},"settings":"","url":""},"body":"The main objective of this web page is to learn how to use SimpliRoute API. \n\nBecause our wide experience in route optimization, we warranty this is the best way to create your company's delivery routes. We believe that everyday problems deserve simple solutions so that is why you now have available the API of our algorithm. Solve in the quickest and easiest possible way your logistics delivery problems.  \n\nSimpliRoute gets this restrictions in consideration:\n- Capacities of your vehicles.\n- Different start and end points for your vehicles. \n- Drivers' shifts. \n- Time windows of your clients.\n\nLet's see an explanation: \n[block:embed]\n{\n  \"html\": \"<iframe class=\\\"embedly-embed\\\" src=\\\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fp_gV16FRhOw%3Ffeature%3Doembed&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dp_gV16FRhOw&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fp_gV16FRhOw%2Fhqdefault.jpg&key=02466f963b9b4bb8845a05b53d3235d7&type=text%2Fhtml&schema=youtube\\\" width=\\\"854\\\" height=\\\"480\\\" scrolling=\\\"no\\\" frameborder=\\\"0\\\" allowfullscreen></iframe>\",\n  \"url\": \"https://www.youtube.com/watch?v=p_gV16FRhOw\",\n  \"title\": \"SimpliRoute Smart Logistics (English)\",\n  \"favicon\": \"https://s.ytimg.com/yts/img/favicon-vflz7uhzw.ico\",\n  \"image\": \"https://i.ytimg.com/vi/p_gV16FRhOw/hqdefault.jpg\"\n}\n[/block]\nMake those hours of route planning be something of your past and get into the future with SimpliRoute. Focus on the important: make your customers happy.","category":"56512c6e0d8a490d00295b65","createdAt":"2015-11-22T02:46:07.443Z","excerpt":"This page will help you get started with SimpliRoute API. You'll be up and running in a jiffy!","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":999,"project":"56512c6d0d8a490d00295b61","slug":"getting-started","sync_unique":"","title":"Using SimpliRoute API","type":"basic","updates":[],"user":"55af82f9aa902f1700300d9c","version":"56512c6e0d8a490d00295b64","childrenPages":[]}

Using SimpliRoute API

This page will help you get started with SimpliRoute API. You'll be up and running in a jiffy!

The main objective of this web page is to learn how to use SimpliRoute API. Because our wide experience in route optimization, we warranty this is the best way to create your company's delivery routes. We believe that everyday problems deserve simple solutions so that is why you now have available the API of our algorithm. Solve in the quickest and easiest possible way your logistics delivery problems. SimpliRoute gets this restrictions in consideration: - Capacities of your vehicles. - Different start and end points for your vehicles. - Drivers' shifts. - Time windows of your clients. Let's see an explanation: [block:embed] { "html": "<iframe class=\"embedly-embed\" src=\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fp_gV16FRhOw%3Ffeature%3Doembed&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dp_gV16FRhOw&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fp_gV16FRhOw%2Fhqdefault.jpg&key=02466f963b9b4bb8845a05b53d3235d7&type=text%2Fhtml&schema=youtube\" width=\"854\" height=\"480\" scrolling=\"no\" frameborder=\"0\" allowfullscreen></iframe>", "url": "https://www.youtube.com/watch?v=p_gV16FRhOw", "title": "SimpliRoute Smart Logistics (English)", "favicon": "https://s.ytimg.com/yts/img/favicon-vflz7uhzw.ico", "image": "https://i.ytimg.com/vi/p_gV16FRhOw/hqdefault.jpg" } [/block] Make those hours of route planning be something of your past and get into the future with SimpliRoute. Focus on the important: make your customers happy.
The main objective of this web page is to learn how to use SimpliRoute API. Because our wide experience in route optimization, we warranty this is the best way to create your company's delivery routes. We believe that everyday problems deserve simple solutions so that is why you now have available the API of our algorithm. Solve in the quickest and easiest possible way your logistics delivery problems. SimpliRoute gets this restrictions in consideration: - Capacities of your vehicles. - Different start and end points for your vehicles. - Drivers' shifts. - Time windows of your clients. Let's see an explanation: [block:embed] { "html": "<iframe class=\"embedly-embed\" src=\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fp_gV16FRhOw%3Ffeature%3Doembed&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dp_gV16FRhOw&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fp_gV16FRhOw%2Fhqdefault.jpg&key=02466f963b9b4bb8845a05b53d3235d7&type=text%2Fhtml&schema=youtube\" width=\"854\" height=\"480\" scrolling=\"no\" frameborder=\"0\" allowfullscreen></iframe>", "url": "https://www.youtube.com/watch?v=p_gV16FRhOw", "title": "SimpliRoute Smart Logistics (English)", "favicon": "https://s.ytimg.com/yts/img/favicon-vflz7uhzw.ico", "image": "https://i.ytimg.com/vi/p_gV16FRhOw/hqdefault.jpg" } [/block] Make those hours of route planning be something of your past and get into the future with SimpliRoute. Focus on the important: make your customers happy.
{"__v":8,"_id":"566ee0f0c1b00f1900ffd399","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"Authentication methodology that allows calls to the algorithm is through the header \"Authorization\" with the Token given by SimpliRoute. If you don't have one, you can easily get one signing up for a new 7 days trial in our website. The direct url to do it is: https://app.simpliroute.com/#/signup \n\nThe API token is in your account section. The url is: https://app.simpliroute.com/#/configs/account\n\nSimpliRoute API has only one Endpoint that can be accessed through:\n\n[block:embed]\n{\n  \"html\": false,\n  \"url\": \"https://api.simpliroute.com/optimize/\",\n  \"title\": null,\n  \"favicon\": null\n}\n[/block]\nLet's see a call example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$http({\\nmethod: 'POST',\\nurl: 'https://api.simpliroute.com/optimize/',\\nheaders: {\\n'Content-Type': 'application/json',\\n'Authorization': 'Token casdasd623hjasdhjkas9uj2lnasd815'\\n},\\ndata: json_data\\n}).success(function(data, status) {\\n//Put your code here\\n}).error(function(data, status) {\\n//Put your code here\\n});\",\n      \"language\": \"javascript\"\n    },\n    {\n      \"code\": \"<?php\\n  $crl = curl_init();\\n  $headr = array();\\n  $URL = 'http://api.simpliroute.com/optimize/'\\n  $headr[] = 'Content-type: application/json';\\n  $headr[] = 'Token casdasd623hjasdhjkas9uj2lnasd815';\\n  curl_setopt($crl, CURLOPT_URL,$URL);\\n  curl_setopt($crl, CURLOPT_HTTPHEADER,$headr);\\n  curl_setopt($crl, CURLOPT_POST,TRUE);\\n  $rest = curl_exec($crl);\\n  curl_close($crl);\\n?>\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"curl http://api.simpliroute.com/optimize/ \\\\\\n      -X POST \\\\\\n      -H \\\"Content-Type: application/json\\\" \\\\\\n      -H \\\"Authorization: Token casdasd623hjasdhjkas9uj2lnasd815\\\" \\\\\\n      -d @-\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\nA JSON example that is received and given by the algorithm can be appreciated on the right. Every entity defined in the object JSON are explained in the following section.    \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"vehicles\\\": [\\n        {\\n            \\\"ident\\\": \\\"Vehicle 1\\\",\\n            \\\"location_start\\\": {\\n                \\\"ident\\\": \\\"warehouse A\\\",\\n                \\\"lat\\\": -33.4233926,\\n                \\\"lon\\\": -70.6104996\\n            }\\n        },\\n        {\\n            \\\"ident\\\": \\\"Vehicle 2\\\",\\n            \\\"location_start\\\": {\\n                \\\"ident\\\": \\\"warehouse B\\\",\\n                \\\"lat\\\": -33.4233926,\\n                \\\"lon\\\": -70.6104996\\n            },\\n            \\\"location_end\\\": {\\n                \\\"ident\\\": \\\"warehouse C\\\",\\n                \\\"lat\\\": -33.4233926,\\n                \\\"lon\\\": -70.6104996\\n            },\\n            \\\"capacity\\\": 3500,\\n            \\\"shift_start\\\": \\\"9:00\\\",\\n            \\\"shift_end\\\": \\\"18:00\\\"\\n        }\\n    ],\\n    \\\"nodes\\\": [\\n        {\\n            \\\"ident\\\": \\\"El Salto 4875\\\",\\n            \\\"lat\\\": -33.3887,\\n            \\\"lon\\\": -70.62304\\n        },\\n        {\\n            \\\"ident\\\": \\\"Avenida Del Valle 7\\\",\\n            \\\"lat\\\": -33.39124,\\n            \\\"lon\\\": -70.61387,\\n            \\\"load\\\": 2530,\\n            \\\"window_start\\\": \\\"9:00\\\",\\n            \\\"window_end\\\": \\\"11:00\\\",\\n            \\\"duration\\\": 15\\n        },\\n        {\\n            \\\"ident\\\": \\\"Larrain 5862\\\",\\n            \\\"lat\\\": -33.45066,\\n            \\\"lon\\\": -70.54915,\\n            \\\"load\\\": 77,\\n            \\\"window_start\\\": \\\"15:00\\\",\\n            \\\"window_end\\\": \\\"17:00\\\",\\n            \\\"duration\\\": 10\\n        }\\n    ],\\n    \\\"balance\\\": false,\\n    \\\"all_vehicles\\\": true,\\n    \\\"cluster\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"JSON Input\"\n    },\n    {\n      \"code\": \"{\\n  \\\"num_vehicles_used\\\": 1,\\n  \\\"vehicles\\\": [\\n    {\\n      \\\"ident\\\": \\\"Vehicle 1\\\",\\n      \\\"tours\\\": [\\n        {\\n          \\\"nodes\\\": [\\n            {\\n              \\\"ident\\\": \\\"warehouse A\\\",\\n              \\\"lat\\\": -33.4233926,\\n              \\\"lon\\\": -70.6104996,\\n              \\\"order\\\": 0,\\n              \\\"arrival\\\": \\\"00:00\\\",\\n              \\\"departure\\\": \\\"00:00\\\"\\n            },\\n            {\\n              \\\"ident\\\": \\\"AvenidaDelValle765\\\",\\n              \\\"lat\\\": -33.39124,\\n              \\\"lon\\\": -70.61387,\\n              \\\"load\\\": 2530,\\n              \\\"order\\\": 1,\\n              \\\"arrival\\\": \\\"09: 00\\\",\\n              \\\"departure\\\": \\\"09: 15\\\"\\n            },\\n            {\\n              \\\"ident\\\": \\\"ElSalto4875\\\",\\n              \\\"lat\\\": -33.3887,\\n              \\\"lon\\\": -70.62304,\\n              \\\"load\\\": 0,\\n              \\\"order\\\": 2,\\n              \\\"arrival\\\": \\\"09: 17\\\",\\n              \\\"departure\\\": \\\"09: 17\\\"\\n            },\\n            {\\n              \\\"ident\\\": \\\"Larrain5862\\\",\\n              \\\"lat\\\": -33.45066,\\n              \\\"lon\\\": -70.54915,\\n              \\\"load\\\": 77,\\n              \\\"order\\\": 3,\\n              \\\"arrival\\\": \\\"15:00\\\",\\n              \\\"departure\\\": \\\"15:10\\\"\\n            },\\n            {\\n              \\\"ident\\\": \\\"warehouseA\\\",\\n              \\\"lat\\\": -33.4233926,\\n              \\\"lon\\\": -70.6104996,\\n              \\\"order\\\": 4,\\n              \\\"arrival\\\": \\\"15:20\\\",\\n              \\\"departure\\\": \\\"15:20\\\"\\n            }\\n          ]\\n        }\\n      ]\\n    }\\n  ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"JSON Output\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"56512c6e0d8a490d00295b65","createdAt":"2015-12-14T15:32:00.853Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":999,"project":"56512c6d0d8a490d00295b61","slug":"authentication-and-api-endpoint","sync_unique":"","title":"Authentication and API Endpoint","type":"basic","updates":[],"user":"55af82f9aa902f1700300d9c","version":"56512c6e0d8a490d00295b64","childrenPages":[]}

Authentication and API Endpoint


Authentication methodology that allows calls to the algorithm is through the header "Authorization" with the Token given by SimpliRoute. If you don't have one, you can easily get one signing up for a new 7 days trial in our website. The direct url to do it is: https://app.simpliroute.com/#/signup The API token is in your account section. The url is: https://app.simpliroute.com/#/configs/account SimpliRoute API has only one Endpoint that can be accessed through: [block:embed] { "html": false, "url": "https://api.simpliroute.com/optimize/", "title": null, "favicon": null } [/block] Let's see a call example: [block:code] { "codes": [ { "code": "$http({\nmethod: 'POST',\nurl: 'https://api.simpliroute.com/optimize/',\nheaders: {\n'Content-Type': 'application/json',\n'Authorization': 'Token casdasd623hjasdhjkas9uj2lnasd815'\n},\ndata: json_data\n}).success(function(data, status) {\n//Put your code here\n}).error(function(data, status) {\n//Put your code here\n});", "language": "javascript" }, { "code": "<?php\n $crl = curl_init();\n $headr = array();\n $URL = 'http://api.simpliroute.com/optimize/'\n $headr[] = 'Content-type: application/json';\n $headr[] = 'Token casdasd623hjasdhjkas9uj2lnasd815';\n curl_setopt($crl, CURLOPT_URL,$URL);\n curl_setopt($crl, CURLOPT_HTTPHEADER,$headr);\n curl_setopt($crl, CURLOPT_POST,TRUE);\n $rest = curl_exec($crl);\n curl_close($crl);\n?>", "language": "php" }, { "code": "curl http://api.simpliroute.com/optimize/ \\\n -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Token casdasd623hjasdhjkas9uj2lnasd815\" \\\n -d @-", "language": "curl" } ] } [/block] A JSON example that is received and given by the algorithm can be appreciated on the right. Every entity defined in the object JSON are explained in the following section. [block:code] { "codes": [ { "code": "{\n \"vehicles\": [\n {\n \"ident\": \"Vehicle 1\",\n \"location_start\": {\n \"ident\": \"warehouse A\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n }\n },\n {\n \"ident\": \"Vehicle 2\",\n \"location_start\": {\n \"ident\": \"warehouse B\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n },\n \"location_end\": {\n \"ident\": \"warehouse C\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n },\n \"capacity\": 3500,\n \"shift_start\": \"9:00\",\n \"shift_end\": \"18:00\"\n }\n ],\n \"nodes\": [\n {\n \"ident\": \"El Salto 4875\",\n \"lat\": -33.3887,\n \"lon\": -70.62304\n },\n {\n \"ident\": \"Avenida Del Valle 7\",\n \"lat\": -33.39124,\n \"lon\": -70.61387,\n \"load\": 2530,\n \"window_start\": \"9:00\",\n \"window_end\": \"11:00\",\n \"duration\": 15\n },\n {\n \"ident\": \"Larrain 5862\",\n \"lat\": -33.45066,\n \"lon\": -70.54915,\n \"load\": 77,\n \"window_start\": \"15:00\",\n \"window_end\": \"17:00\",\n \"duration\": 10\n }\n ],\n \"balance\": false,\n \"all_vehicles\": true,\n \"cluster\": true\n}", "language": "json", "name": "JSON Input" }, { "code": "{\n \"num_vehicles_used\": 1,\n \"vehicles\": [\n {\n \"ident\": \"Vehicle 1\",\n \"tours\": [\n {\n \"nodes\": [\n {\n \"ident\": \"warehouse A\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996,\n \"order\": 0,\n \"arrival\": \"00:00\",\n \"departure\": \"00:00\"\n },\n {\n \"ident\": \"AvenidaDelValle765\",\n \"lat\": -33.39124,\n \"lon\": -70.61387,\n \"load\": 2530,\n \"order\": 1,\n \"arrival\": \"09: 00\",\n \"departure\": \"09: 15\"\n },\n {\n \"ident\": \"ElSalto4875\",\n \"lat\": -33.3887,\n \"lon\": -70.62304,\n \"load\": 0,\n \"order\": 2,\n \"arrival\": \"09: 17\",\n \"departure\": \"09: 17\"\n },\n {\n \"ident\": \"Larrain5862\",\n \"lat\": -33.45066,\n \"lon\": -70.54915,\n \"load\": 77,\n \"order\": 3,\n \"arrival\": \"15:00\",\n \"departure\": \"15:10\"\n },\n {\n \"ident\": \"warehouseA\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996,\n \"order\": 4,\n \"arrival\": \"15:20\",\n \"departure\": \"15:20\"\n }\n ]\n }\n ]\n }\n ]\n}", "language": "json", "name": "JSON Output" } ], "sidebar": true } [/block]
Authentication methodology that allows calls to the algorithm is through the header "Authorization" with the Token given by SimpliRoute. If you don't have one, you can easily get one signing up for a new 7 days trial in our website. The direct url to do it is: https://app.simpliroute.com/#/signup The API token is in your account section. The url is: https://app.simpliroute.com/#/configs/account SimpliRoute API has only one Endpoint that can be accessed through: [block:embed] { "html": false, "url": "https://api.simpliroute.com/optimize/", "title": null, "favicon": null } [/block] Let's see a call example: [block:code] { "codes": [ { "code": "$http({\nmethod: 'POST',\nurl: 'https://api.simpliroute.com/optimize/',\nheaders: {\n'Content-Type': 'application/json',\n'Authorization': 'Token casdasd623hjasdhjkas9uj2lnasd815'\n},\ndata: json_data\n}).success(function(data, status) {\n//Put your code here\n}).error(function(data, status) {\n//Put your code here\n});", "language": "javascript" }, { "code": "<?php\n $crl = curl_init();\n $headr = array();\n $URL = 'http://api.simpliroute.com/optimize/'\n $headr[] = 'Content-type: application/json';\n $headr[] = 'Token casdasd623hjasdhjkas9uj2lnasd815';\n curl_setopt($crl, CURLOPT_URL,$URL);\n curl_setopt($crl, CURLOPT_HTTPHEADER,$headr);\n curl_setopt($crl, CURLOPT_POST,TRUE);\n $rest = curl_exec($crl);\n curl_close($crl);\n?>", "language": "php" }, { "code": "curl http://api.simpliroute.com/optimize/ \\\n -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Token casdasd623hjasdhjkas9uj2lnasd815\" \\\n -d @-", "language": "curl" } ] } [/block] A JSON example that is received and given by the algorithm can be appreciated on the right. Every entity defined in the object JSON are explained in the following section. [block:code] { "codes": [ { "code": "{\n \"vehicles\": [\n {\n \"ident\": \"Vehicle 1\",\n \"location_start\": {\n \"ident\": \"warehouse A\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n }\n },\n {\n \"ident\": \"Vehicle 2\",\n \"location_start\": {\n \"ident\": \"warehouse B\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n },\n \"location_end\": {\n \"ident\": \"warehouse C\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n },\n \"capacity\": 3500,\n \"shift_start\": \"9:00\",\n \"shift_end\": \"18:00\"\n }\n ],\n \"nodes\": [\n {\n \"ident\": \"El Salto 4875\",\n \"lat\": -33.3887,\n \"lon\": -70.62304\n },\n {\n \"ident\": \"Avenida Del Valle 7\",\n \"lat\": -33.39124,\n \"lon\": -70.61387,\n \"load\": 2530,\n \"window_start\": \"9:00\",\n \"window_end\": \"11:00\",\n \"duration\": 15\n },\n {\n \"ident\": \"Larrain 5862\",\n \"lat\": -33.45066,\n \"lon\": -70.54915,\n \"load\": 77,\n \"window_start\": \"15:00\",\n \"window_end\": \"17:00\",\n \"duration\": 10\n }\n ],\n \"balance\": false,\n \"all_vehicles\": true,\n \"cluster\": true\n}", "language": "json", "name": "JSON Input" }, { "code": "{\n \"num_vehicles_used\": 1,\n \"vehicles\": [\n {\n \"ident\": \"Vehicle 1\",\n \"tours\": [\n {\n \"nodes\": [\n {\n \"ident\": \"warehouse A\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996,\n \"order\": 0,\n \"arrival\": \"00:00\",\n \"departure\": \"00:00\"\n },\n {\n \"ident\": \"AvenidaDelValle765\",\n \"lat\": -33.39124,\n \"lon\": -70.61387,\n \"load\": 2530,\n \"order\": 1,\n \"arrival\": \"09: 00\",\n \"departure\": \"09: 15\"\n },\n {\n \"ident\": \"ElSalto4875\",\n \"lat\": -33.3887,\n \"lon\": -70.62304,\n \"load\": 0,\n \"order\": 2,\n \"arrival\": \"09: 17\",\n \"departure\": \"09: 17\"\n },\n {\n \"ident\": \"Larrain5862\",\n \"lat\": -33.45066,\n \"lon\": -70.54915,\n \"load\": 77,\n \"order\": 3,\n \"arrival\": \"15:00\",\n \"departure\": \"15:10\"\n },\n {\n \"ident\": \"warehouseA\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996,\n \"order\": 4,\n \"arrival\": \"15:20\",\n \"departure\": \"15:20\"\n }\n ]\n }\n ]\n }\n ]\n}", "language": "json", "name": "JSON Output" } ], "sidebar": true } [/block]
{"__v":2,"_id":"566f0993fc3abb0d0020fc28","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"One of the basic units of the API it is the vehicles. It can be defined like the following example: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"ident\\\": \\\"Vehicle 1\\\",\\n    \\\"location_start\\\": {\\n        \\\"ident\\\": \\\"warehouse B\\\",\\n        \\\"lat\\\": -33.4233926,\\n        \\\"lon\\\": -70.6104996\\n    },\\n    \\\"location_end\\\": {\\n        \\\"ident\\\": \\\"warehouse C\\\",\\n        \\\"lat\\\": -33.345523,\\n        \\\"lon\\\": -70.456992\\n    },\\n    \\\"capacity\\\": 3500,\\n    \\\"shift_start\\\": \\\"9:00\\\",\\n    \\\"shift_end\\\": \\\"18:00\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Vehicles - JSON\"\n    }\n  ]\n}\n[/block]\nThis following parameters might have to be defined. Some of them are optional, but the two first are mandatory.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Kind\",\n    \"h-2\": \"Definition\",\n    \"0-0\": \"Ident\",\n    \"0-1\": \"Obligatory\",\n    \"0-2\": \"String\",\n    \"1-0\": \"location_start\",\n    \"1-1\": \"Obligatory\",\n    \"1-2\": \"ID, latitude and length from where the route starts for this vehicle.\",\n    \"2-0\": \"location_end\",\n    \"3-0\": \"capacity\",\n    \"4-0\": \"shift_start\",\n    \"4-1\": \"Optional\",\n    \"5-0\": \"shift_end\",\n    \"2-1\": \"Optional\",\n    \"3-1\": \"Optional\",\n    \"5-1\": \"Optional\",\n    \"2-2\": \"ID, latitude and length from where the route ends for this vehicle.\",\n    \"3-2\": \"Vehicle capacity (Float).\",\n    \"4-2\": \"String \\\"HH:mm\\\". When the shift starts.\",\n    \"5-2\": \"String \\\"HH:mm\\\". When the shift ends.\"\n  },\n  \"cols\": 3,\n  \"rows\": 6\n}\n[/block]","category":"566ed63fe61c1917005aa1dc","createdAt":"2015-12-14T18:25:23.104Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":999,"project":"56512c6d0d8a490d00295b61","slug":"vehicles","sync_unique":"","title":"Vehicles","type":"basic","updates":[],"user":"55af82f9aa902f1700300d9c","version":"56512c6e0d8a490d00295b64","childrenPages":[]}

Vehicles


One of the basic units of the API it is the vehicles. It can be defined like the following example: [block:code] { "codes": [ { "code": "{\n \"ident\": \"Vehicle 1\",\n \"location_start\": {\n \"ident\": \"warehouse B\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n },\n \"location_end\": {\n \"ident\": \"warehouse C\",\n \"lat\": -33.345523,\n \"lon\": -70.456992\n },\n \"capacity\": 3500,\n \"shift_start\": \"9:00\",\n \"shift_end\": \"18:00\"\n}", "language": "json", "name": "Vehicles - JSON" } ] } [/block] This following parameters might have to be defined. Some of them are optional, but the two first are mandatory. [block:parameters] { "data": { "h-0": "Name", "h-1": "Kind", "h-2": "Definition", "0-0": "Ident", "0-1": "Obligatory", "0-2": "String", "1-0": "location_start", "1-1": "Obligatory", "1-2": "ID, latitude and length from where the route starts for this vehicle.", "2-0": "location_end", "3-0": "capacity", "4-0": "shift_start", "4-1": "Optional", "5-0": "shift_end", "2-1": "Optional", "3-1": "Optional", "5-1": "Optional", "2-2": "ID, latitude and length from where the route ends for this vehicle.", "3-2": "Vehicle capacity (Float).", "4-2": "String \"HH:mm\". When the shift starts.", "5-2": "String \"HH:mm\". When the shift ends." }, "cols": 3, "rows": 6 } [/block]
One of the basic units of the API it is the vehicles. It can be defined like the following example: [block:code] { "codes": [ { "code": "{\n \"ident\": \"Vehicle 1\",\n \"location_start\": {\n \"ident\": \"warehouse B\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n },\n \"location_end\": {\n \"ident\": \"warehouse C\",\n \"lat\": -33.345523,\n \"lon\": -70.456992\n },\n \"capacity\": 3500,\n \"shift_start\": \"9:00\",\n \"shift_end\": \"18:00\"\n}", "language": "json", "name": "Vehicles - JSON" } ] } [/block] This following parameters might have to be defined. Some of them are optional, but the two first are mandatory. [block:parameters] { "data": { "h-0": "Name", "h-1": "Kind", "h-2": "Definition", "0-0": "Ident", "0-1": "Obligatory", "0-2": "String", "1-0": "location_start", "1-1": "Obligatory", "1-2": "ID, latitude and length from where the route starts for this vehicle.", "2-0": "location_end", "3-0": "capacity", "4-0": "shift_start", "4-1": "Optional", "5-0": "shift_end", "2-1": "Optional", "3-1": "Optional", "5-1": "Optional", "2-2": "ID, latitude and length from where the route ends for this vehicle.", "3-2": "Vehicle capacity (Float).", "4-2": "String \"HH:mm\". When the shift starts.", "5-2": "String \"HH:mm\". When the shift ends." }, "cols": 3, "rows": 6 } [/block]
{"__v":5,"_id":"566f0a21c1b00f1900ffd3fa","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"For a vehicle to make deals, you must define a set of deliveries to be made. These have to have the following structure:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"nodes\\\": [\\n        {\\n            \\\"ident\\\": \\\"ElSalto4875\\\",\\n            \\\"lat\\\": -33.3887,\\n            \\\"lon\\\": -70.62304\\n        },\\n        {\\n            \\\"ident\\\": \\\"AvenidaDelValle765\\\",\\n            \\\"lat\\\": -33.39124,\\n            \\\"lon\\\": -70.61387,\\n            \\\"load\\\": 2530,\\n            \\\"window_start\\\": \\\"9: 00\\\",\\n            \\\"window_end\\\": \\\"11: 00\\\",\\n            \\\"duration\\\": 15\\n        }\\n    ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Nodes - JSON\"\n    }\n  ]\n}\n[/block]\nAs for the vehicles, some of the parameters are optional or obligatory. In the following table we can see the fields for each parameters.  \n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"ident\",\n    \"1-0\": \"lat\",\n    \"2-0\": \"lon\",\n    \"3-0\": \"load\",\n    \"4-0\": \"window_start\",\n    \"5-0\": \"window_end\",\n    \"6-0\": \"duration\",\n    \"h-0\": \"Name\",\n    \"h-1\": \"Kind\",\n    \"0-1\": \"Obligatory\",\n    \"1-1\": \"Obligatory\",\n    \"2-1\": \"Obligatory\",\n    \"3-1\": \"Opcional\",\n    \"4-1\": \"Opcional\",\n    \"5-1\": \"Opcional\",\n    \"6-1\": \"Opcional\",\n    \"0-2\": \"String identifier for the direction.\",\n    \"1-2\": \"Float with the latitude of the direction.\",\n    \"2-2\": \"Float with the length of the direction.\",\n    \"3-2\": \"Float with the load to be delivered in the direction.\",\n    \"4-2\": \"String \\\"HH:mm\\\" with the starting time in which the customer can get the product.\",\n    \"5-2\": \"String \\\"HH:mm\\\" with the ending time of the customer's availability.\",\n    \"6-2\": \"Total time gap value, in minutes, of the delivery process for this direction.\",\n    \"h-2\": \"Definition\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]","category":"566ed63fe61c1917005aa1dc","createdAt":"2015-12-14T18:27:45.324Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":999,"project":"56512c6d0d8a490d00295b61","slug":"delivery","sync_unique":"","title":"Deliveries","type":"basic","updates":[],"user":"55af82f9aa902f1700300d9c","version":"56512c6e0d8a490d00295b64","childrenPages":[]}

Deliveries


For a vehicle to make deals, you must define a set of deliveries to be made. These have to have the following structure: [block:code] { "codes": [ { "code": "{\n \"nodes\": [\n {\n \"ident\": \"ElSalto4875\",\n \"lat\": -33.3887,\n \"lon\": -70.62304\n },\n {\n \"ident\": \"AvenidaDelValle765\",\n \"lat\": -33.39124,\n \"lon\": -70.61387,\n \"load\": 2530,\n \"window_start\": \"9: 00\",\n \"window_end\": \"11: 00\",\n \"duration\": 15\n }\n ]\n}", "language": "json", "name": "Nodes - JSON" } ] } [/block] As for the vehicles, some of the parameters are optional or obligatory. In the following table we can see the fields for each parameters. [block:parameters] { "data": { "0-0": "ident", "1-0": "lat", "2-0": "lon", "3-0": "load", "4-0": "window_start", "5-0": "window_end", "6-0": "duration", "h-0": "Name", "h-1": "Kind", "0-1": "Obligatory", "1-1": "Obligatory", "2-1": "Obligatory", "3-1": "Opcional", "4-1": "Opcional", "5-1": "Opcional", "6-1": "Opcional", "0-2": "String identifier for the direction.", "1-2": "Float with the latitude of the direction.", "2-2": "Float with the length of the direction.", "3-2": "Float with the load to be delivered in the direction.", "4-2": "String \"HH:mm\" with the starting time in which the customer can get the product.", "5-2": "String \"HH:mm\" with the ending time of the customer's availability.", "6-2": "Total time gap value, in minutes, of the delivery process for this direction.", "h-2": "Definition" }, "cols": 3, "rows": 7 } [/block]
For a vehicle to make deals, you must define a set of deliveries to be made. These have to have the following structure: [block:code] { "codes": [ { "code": "{\n \"nodes\": [\n {\n \"ident\": \"ElSalto4875\",\n \"lat\": -33.3887,\n \"lon\": -70.62304\n },\n {\n \"ident\": \"AvenidaDelValle765\",\n \"lat\": -33.39124,\n \"lon\": -70.61387,\n \"load\": 2530,\n \"window_start\": \"9: 00\",\n \"window_end\": \"11: 00\",\n \"duration\": 15\n }\n ]\n}", "language": "json", "name": "Nodes - JSON" } ] } [/block] As for the vehicles, some of the parameters are optional or obligatory. In the following table we can see the fields for each parameters. [block:parameters] { "data": { "0-0": "ident", "1-0": "lat", "2-0": "lon", "3-0": "load", "4-0": "window_start", "5-0": "window_end", "6-0": "duration", "h-0": "Name", "h-1": "Kind", "0-1": "Obligatory", "1-1": "Obligatory", "2-1": "Obligatory", "3-1": "Opcional", "4-1": "Opcional", "5-1": "Opcional", "6-1": "Opcional", "0-2": "String identifier for the direction.", "1-2": "Float with the latitude of the direction.", "2-2": "Float with the length of the direction.", "3-2": "Float with the load to be delivered in the direction.", "4-2": "String \"HH:mm\" with the starting time in which the customer can get the product.", "5-2": "String \"HH:mm\" with the ending time of the customer's availability.", "6-2": "Total time gap value, in minutes, of the delivery process for this direction.", "h-2": "Definition" }, "cols": 3, "rows": 7 } [/block]
{"__v":3,"_id":"566f189bc1b00f1900ffd415","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"SimpliRoute has some additional features allowing you to configure the optimization in the best possible way that fits your companie.  \n\nAt the next table we describe each field.\n[block:parameters]\n{\n  \"data\": {\n    \"0-1\": \"Optional\",\n    \"1-1\": \"Optional\",\n    \"2-1\": \"Optional\",\n    \"0-0\": \"balance\",\n    \"1-0\": \"all_vehicles\",\n    \"2-0\": \"cluster\",\n    \"0-2\": \"(True, False.) If true, there will be an enforced balance between all the vehicles, in time and number of direction for the algorithm procedure.\",\n    \"1-2\": \"(True, false.) If true, the algorithm will use all the selected vehicles. In the other way, it will use only the needed ones.\",\n    \"2-2\": \"(True, False.) If true, the algorithm will not allow crossings between routes.\",\n    \"h-0\": \"Name\",\n    \"h-1\": \"Kind\",\n    \"h-2\": \"Definition\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]","category":"566ed63fe61c1917005aa1dc","createdAt":"2015-12-14T19:29:31.021Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":999,"project":"56512c6d0d8a490d00295b61","slug":"additional-options","sync_unique":"","title":"Additional Options","type":"basic","updates":[],"user":"55af82f9aa902f1700300d9c","version":"56512c6e0d8a490d00295b64","childrenPages":[]}

Additional Options


SimpliRoute has some additional features allowing you to configure the optimization in the best possible way that fits your companie. At the next table we describe each field. [block:parameters] { "data": { "0-1": "Optional", "1-1": "Optional", "2-1": "Optional", "0-0": "balance", "1-0": "all_vehicles", "2-0": "cluster", "0-2": "(True, False.) If true, there will be an enforced balance between all the vehicles, in time and number of direction for the algorithm procedure.", "1-2": "(True, false.) If true, the algorithm will use all the selected vehicles. In the other way, it will use only the needed ones.", "2-2": "(True, False.) If true, the algorithm will not allow crossings between routes.", "h-0": "Name", "h-1": "Kind", "h-2": "Definition" }, "cols": 3, "rows": 3 } [/block]
SimpliRoute has some additional features allowing you to configure the optimization in the best possible way that fits your companie. At the next table we describe each field. [block:parameters] { "data": { "0-1": "Optional", "1-1": "Optional", "2-1": "Optional", "0-0": "balance", "1-0": "all_vehicles", "2-0": "cluster", "0-2": "(True, False.) If true, there will be an enforced balance between all the vehicles, in time and number of direction for the algorithm procedure.", "1-2": "(True, false.) If true, the algorithm will use all the selected vehicles. In the other way, it will use only the needed ones.", "2-2": "(True, False.) If true, the algorithm will not allow crossings between routes.", "h-0": "Name", "h-1": "Kind", "h-2": "Definition" }, "cols": 3, "rows": 3 } [/block]
{"__v":7,"_id":"566f1ffce144ab0d00e9727e","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"One warehouse, no capacities nor time windows.\"\n}\n[/block]\nThe simplest example for the API use has by parameters one unic warehouse, without capacities per vehicle neither time windows. Thus, every vehicles start and finish their shifts at the same starting point. \n\nUsually this example can be seen in:\n- Mailing delivery.\n- Food delivery with big vehicles. \n\nFor this case see the JSON Input example on the right.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"vehicles\\\": [\\n        {\\n            \\\"ident\\\": \\\"Vehiculo 1\\\",\\n            \\\"location_start\\\": {\\n                \\\"ident\\\": \\\"depot_1_ini\\\",\\n                \\\"lat\\\": -33.4233926,\\n                \\\"lon\\\": -70.6104996\\n            }\\n        }\\n    ],\\n    \\\"nodes\\\": [\\n        {\\n            \\\"ident\\\": \\\"0\\\",\\n            \\\"lat\\\": -33.436135,\\n            \\\"lon\\\": -70.6509688\\n        },\\n        {\\n            \\\"ident\\\": \\\"1\\\",\\n            \\\"lat\\\": -33.4334123,\\n            \\\"lon\\\": -70.653234\\n        },\\n        {\\n            \\\"ident\\\": \\\"2\\\",\\n            \\\"lat\\\": -33.333413,\\n            \\\"lon\\\": -70.5534688\\n        },\\n        {\\n            \\\"ident\\\": \\\"3\\\",\\n            \\\"lat\\\": -33.4817996,\\n            \\\"lon\\\": -70.7447458\\n        },\\n        {\\n            \\\"ident\\\": \\\"4\\\",\\n            \\\"lat\\\": -33.5902026,\\n            \\\"lon\\\": -70.700119\\n        },\\n        {\\n            \\\"ident\\\": \\\"5\\\",\\n            \\\"lat\\\": -33.4210116,\\n            \\\"lon\\\": -70.65298589\\n        },\\n        {\\n            \\\"ident\\\": \\\"6\\\",\\n            \\\"lat\\\": -33.4428032,\\n            \\\"lon\\\": -70.6371272\\n        },\\n        {\\n            \\\"ident\\\": \\\"7\\\",\\n            \\\"lat\\\": -33.441032,\\n            \\\"lon\\\": -70.6535276\\n        },\\n        {\\n            \\\"ident\\\": \\\"8\\\",\\n            \\\"lat\\\": -33.438943,\\n            \\\"lon\\\": -70.655193\\n        },\\n        {\\n            \\\"ident\\\": \\\"9\\\",\\n            \\\"lat\\\": -33.443035,\\n            \\\"lon\\\": -70.646122\\n        }\\n    ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Input - JSON\"\n    },\n    {\n      \"code\": \"{\\n    \\\"vehicles\\\": [{\\n        \\\"ident\\\": \\\"Vehiculo 1\\\",\\n        \\\"tours\\\": [{\\n            \\\"nodes\\\": [{\\n                \\\"arrival\\\": \\\"00:00\\\",\\n                \\\"ident\\\": \\\"depot_1_ini\\\",\\n                \\\"lon\\\": -70.6104996,\\n                \\\"departure\\\": \\\"00:00\\\",\\n                \\\"lat\\\": -33.4233926,\\n                \\\"order\\\": 0\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"00:17\\\",\\n                \\\"ident\\\": \\\"2\\\",\\n                \\\"lon\\\": -70.5534688,\\n                \\\"departure\\\": \\\"00:17\\\",\\n                \\\"lat\\\": -33.333413,\\n                \\\"order\\\": 1\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"00:39\\\",\\n                \\\"ident\\\": \\\"0\\\",\\n                \\\"lon\\\": -70.6509688,\\n                \\\"departure\\\": \\\"00:39\\\",\\n                \\\"lat\\\": -33.436135,\\n                \\\"order\\\": 2\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"00:40\\\",\\n                \\\"ident\\\": \\\"8\\\",\\n                \\\"lon\\\": -70.655193,\\n                \\\"departure\\\": \\\"00:40\\\",\\n                \\\"lat\\\": -33.438943,\\n                \\\"order\\\": 3\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"00:41\\\",\\n                \\\"ident\\\": \\\"1\\\",\\n                \\\"lon\\\": -70.653234,\\n                \\\"departure\\\": \\\"00:41\\\",\\n                \\\"lat\\\": -33.4334123,\\n                \\\"order\\\": 4\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"00:43\\\",\\n                \\\"ident\\\": \\\"5\\\",\\n                \\\"lon\\\": -70.65298589,\\n                \\\"departure\\\": \\\"00:43\\\",\\n                \\\"lat\\\": -33.4210116,\\n                \\\"order\\\": 5\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"01:07\\\",\\n                \\\"ident\\\": \\\"4\\\",\\n                \\\"lon\\\": -70.700119,\\n                \\\"departure\\\": \\\"01:07\\\",\\n                \\\"lat\\\": -33.5902026,\\n                \\\"order\\\": 6\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"01:22\\\",\\n                \\\"ident\\\": \\\"3\\\",\\n                \\\"lon\\\": -70.7447458,\\n                \\\"departure\\\": \\\"01:22\\\",\\n                \\\"lat\\\": -33.4817996,\\n                \\\"order\\\": 7\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"01:34\\\",\\n                \\\"ident\\\": \\\"7\\\",\\n                \\\"lon\\\": -70.6535276,\\n                \\\"departure\\\": \\\"01:34\\\",\\n                \\\"lat\\\": -33.441032,\\n                \\\"order\\\": 8\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"01:36\\\",\\n                \\\"ident\\\": \\\"9\\\",\\n                \\\"lon\\\": -70.646122,\\n                \\\"departure\\\": \\\"01:36\\\",\\n                \\\"lat\\\": -33.443035,\\n                \\\"order\\\": 9\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"01:38\\\",\\n                \\\"ident\\\": \\\"6\\\",\\n                \\\"lon\\\": -70.6371272,\\n                \\\"departure\\\": \\\"01:38\\\",\\n                \\\"lat\\\": -33.4428032,\\n                \\\"order\\\": 10\\n            }, {\\n                \\\"arrival\\\": \\\"01:42\\\",\\n                \\\"ident\\\": \\\"depot_1_ini\\\",\\n                \\\"lon\\\": -70.6104996,\\n                \\\"departure\\\": \\\"01:42\\\",\\n                \\\"lat\\\": -33.4233926,\\n                \\\"order\\\": 11\\n            }]\\n        }]\\n    }],\\n    \\\"num_vehicles_used\\\": 1\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Output - JSON\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\nHere, there are 2 entities to take in consideration: Vehicles and Nodes. The first one:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"vehicles\\\": [\\n        {\\n            \\\"ident\\\": \\\"Vehiculo 1\\\",\\n            \\\"location_start\\\": {\\n                \\\"ident\\\": \\\"depot_1_ini\\\",\\n                \\\"lat\\\": -33.4233926,\\n                \\\"lon\\\": -70.6104996\\n            }\\n        }\\n    ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Vehicle - JSON\"\n    }\n  ]\n}\n[/block]\n\"Ident\" is required as the identifier of the vehicle. The object \"location_start\" is the starting point from where the operation begins. As we did not define the \"location_end\" object because there is only one warehouse, the algorithm consider the \"location_start\" as the \"location_end\". So, the vehicle comes back to the same place from where it begined. \n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"If vehicle work schedule is not defined, the algorithm will assume a shift from \\\"00:00\\\" to \\\"23:59\\\".  To change this default configuration, the entities \\\"shift_start\\\" and \\\"shift_end\\\" have to be defined. As example:\\n        {\\n            \\\"ident\\\": \\\"Vehiculo 1\\\",\\n            \\\"shift_start\\\": \\\"9:00\\\",\\n            \\\"shift_end\\\": \\\"18:00\\\",\\n            \\\"location_start\\\": {\\n                \\\"ident\\\": \\\"depot_1_ini\\\",\\n                \\\"lat\\\": -33.4233926,\\n                \\\"lon\\\": -70.6104996\\n            }\\n So, now, the vehicle will start its shift at 9:00 and finish at 18:00.\",\n  \"title\": \"Horario de Operación Vehículo\"\n}\n[/block]\nNow, for \"Nodes\", the following form has to be defined: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"ident\\\": \\\"8\\\",\\n  \\\"lat\\\": -33.438943,\\n  \\\"lon\\\": -70.655193\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Nodes - JSON\"\n    }\n  ]\n}\n[/block]\nAgain, \"ident\" as an identifier for the delivery point as well as a \"lat\" and a \"lon\" for the spacial coordinates so it can be georeferenced. How, for this example, we did not define any other variables, like capacities or time windows, the algorithm does not need anything else. \n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Time service is the amount of time that takes to deliver in the given direction. If it is not specified, the algorithm will assume that the given point takes 0 minutes to be delivered when the vehicle it is already there. In other words, it means that the deal is instantly made by the employee and the customer.To change this value, in the object \\\"node\\\", you have to write the following lines:\\n                   {\\n                       \\\"ident\\\": \\\"8\\\",\\n                       \\\"lat\\\": -33.438943,\\n                       \\\"lon\\\": -70.655193,\\n                       \\\"duration\\\": 5\\n                  }\\nWhere \\\"duration\\\" it is the number of minutes that wanted to be change. Representing the delay that will make the service time at that given direction.\",\n  \"title\": \"Time Service\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Multiple warehouse, no capacities nor time windows.\"\n}\n[/block]\nAs the case before, here we do not have to define capacities neither for the vehicles nor the directions as well as time windows. For the multiple warehouse case, you can simulate operations where vehicles can start at one point and end in others. For each vehicles that can be defined independently making the operation as complex as you want.\n\nFor example: \n- Picking and then delivering from one place to another multiple times in one day.    \n\nLet's see an example for this case:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"vehicles\\\": [{\\n        \\\"ident\\\": \\\"Vehiculo 1 diferente inicio y fin\\\",\\n        \\\"shift_start\\\": \\\"09:00\\\",\\n        \\\"shift_end\\\": \\\"19:00\\\",\\n        \\\"location_start\\\": {\\n            \\\"ident\\\": \\\"depot_1_ini\\\",\\n            \\\"lat\\\": -33.4233926,\\n            \\\"lon\\\": -70.6104996\\n        },\\n        \\\"location_end\\\": {\\n            \\\"ident\\\": \\\"depot_2_end\\\",\\n            \\\"lat\\\": -33.436662,\\n            \\\"lon\\\": -70.577584\\n        }\\n    }],\\n    \\\"nodes\\\": [{\\n        \\\"ident\\\": \\\"0\\\",\\n        \\\"lat\\\": -33.436135,\\n        \\\"lon\\\": -70.6509688\\n    }, {\\n        \\\"ident\\\": \\\"1\\\",\\n        \\\"lat\\\": -33.4334135,\\n        \\\"lon\\\": -70.6534688,\\n        \\\"duration\\\": 5\\n    }, {\\n        \\\"ident\\\": \\\"2\\\",\\n        \\\"lat\\\": -33.333413,\\n        \\\"lon\\\": -70.5534688,\\n        \\\"duration\\\": 5\\n    }, {\\n        \\\"ident\\\": \\\"3\\\",\\n        \\\"lat\\\": -33.4817996,\\n        \\\"lon\\\": -70.7447458,\\n        \\\"duration\\\": 30\\n    }, {\\n        \\\"ident\\\": \\\"4\\\",\\n        \\\"lat\\\": -33.5902026,\\n        \\\"lon\\\": -70.700119,\\n        \\\"duration\\\": 30\\n    }, {\\n        \\\"ident\\\": \\\"5\\\",\\n        \\\"lat\\\": -33.4210116,\\n        \\\"lon\\\": -70.65298589999,\\n        \\\"duration\\\": 30\\n    }, {\\n        \\\"ident\\\": \\\"6\\\",\\n        \\\"lat\\\": -33.4428032,\\n        \\\"lon\\\": -70.6371272,\\n        \\\"duration\\\": 30\\n    }, {\\n        \\\"ident\\\": \\\"7\\\",\\n        \\\"lat\\\": -33.441032,\\n        \\\"lon\\\": -70.6535276,\\n        \\\"duration\\\": 30\\n    }, {\\n        \\\"ident\\\": \\\"8\\\",\\n        \\\"lat\\\": -33.438943,\\n        \\\"lon\\\": -70.655193,\\n        \\\"duration\\\": 30\\n    }, {\\n        \\\"ident\\\": \\\"9\\\",\\n        \\\"lat\\\": -33.443035,\\n        \\\"lon\\\": -70.646122,\\n        \\\"duration\\\": 30\\n    }]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Input - JSON\"\n    },\n    {\n      \"code\": \"{\\n    \\\"vehicles\\\": [{\\n        \\\"ident\\\": \\\"Vehiculo 1 diferente inicio y fin\\\",\\n        \\\"tours\\\": [{\\n            \\\"nodes\\\": [{\\n                \\\"arrival\\\": \\\"09:00\\\",\\n                \\\"ident\\\": \\\"depot_1_ini\\\",\\n                \\\"lon\\\": -70.6104996,\\n                \\\"departure\\\": \\\"09:00\\\",\\n                \\\"lat\\\": -33.4233926,\\n                \\\"order\\\": 0\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"09:17\\\",\\n                \\\"ident\\\": \\\"2\\\",\\n                \\\"lon\\\": -70.5534688,\\n                \\\"departure\\\": \\\"09:22\\\",\\n                \\\"lat\\\": -33.333413,\\n                \\\"order\\\": 1\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"10:05\\\",\\n                \\\"ident\\\": \\\"4\\\",\\n                \\\"lon\\\": -70.700119,\\n                \\\"departure\\\": \\\"10:35\\\",\\n                \\\"lat\\\": -33.5902026,\\n                \\\"order\\\": 2\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"10:49\\\",\\n                \\\"ident\\\": \\\"3\\\",\\n                \\\"lon\\\": -70.7447458,\\n                \\\"departure\\\": \\\"11:19\\\",\\n                \\\"lat\\\": -33.4817996,\\n                \\\"order\\\": 3\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"11:32\\\",\\n                \\\"ident\\\": \\\"8\\\",\\n                \\\"lon\\\": -70.655193,\\n                \\\"departure\\\": \\\"12:02\\\",\\n                \\\"lat\\\": -33.438943,\\n                \\\"order\\\": 4\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"12:03\\\",\\n                \\\"ident\\\": \\\"1\\\",\\n                \\\"lon\\\": -70.6534688,\\n                \\\"departure\\\": \\\"12:08\\\",\\n                \\\"lat\\\": -33.4334135,\\n                \\\"order\\\": 5\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"12:10\\\",\\n                \\\"ident\\\": \\\"5\\\",\\n                \\\"lon\\\": -70.65298589999,\\n                \\\"departure\\\": \\\"12:40\\\",\\n                \\\"lat\\\": -33.4210116,\\n                \\\"order\\\": 6\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"12:44\\\",\\n                \\\"ident\\\": \\\"0\\\",\\n                \\\"lon\\\": -70.6509688,\\n                \\\"departure\\\": \\\"12:44\\\",\\n                \\\"lat\\\": -33.436135,\\n                \\\"order\\\": 7\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"12:45\\\",\\n                \\\"ident\\\": \\\"7\\\",\\n                \\\"lon\\\": -70.6535276,\\n                \\\"departure\\\": \\\"13:15\\\",\\n                \\\"lat\\\": -33.441032,\\n                \\\"order\\\": 8\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"13:17\\\",\\n                \\\"ident\\\": \\\"9\\\",\\n                \\\"lon\\\": -70.646122,\\n                \\\"departure\\\": \\\"13:47\\\",\\n                \\\"lat\\\": -33.443035,\\n                \\\"order\\\": 9\\n            }, {\\n                \\\"load\\\": 0,\\n                \\\"arrival\\\": \\\"13:49\\\",\\n                \\\"ident\\\": \\\"6\\\",\\n                \\\"lon\\\": -70.6371272,\\n                \\\"departure\\\": \\\"14:19\\\",\\n                \\\"lat\\\": -33.4428032,\\n                \\\"order\\\": 10\\n            }, {\\n                \\\"arrival\\\": \\\"14:23\\\",\\n                \\\"ident\\\": \\\"depot_2_end\\\",\\n                \\\"lon\\\": -70.577584,\\n                \\\"departure\\\": \\\"14:23\\\",\\n                \\\"lat\\\": -33.436662,\\n                \\\"order\\\": 11\\n            }]\\n        }]\\n    }],\\n    \\\"num_vehicles_used\\\": 1\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Output - JSON\"\n    }\n  ]\n}\n[/block]","category":"566f1fedc1b00f1900ffd422","createdAt":"2015-12-14T20:01:00.250Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":999,"project":"56512c6d0d8a490d00295b61","slug":"example","sync_unique":"","title":"Example","type":"basic","updates":[],"user":"55af82f9aa902f1700300d9c","version":"56512c6e0d8a490d00295b64","childrenPages":[]}

Example


[block:api-header] { "type": "basic", "title": "One warehouse, no capacities nor time windows." } [/block] The simplest example for the API use has by parameters one unic warehouse, without capacities per vehicle neither time windows. Thus, every vehicles start and finish their shifts at the same starting point. Usually this example can be seen in: - Mailing delivery. - Food delivery with big vehicles. For this case see the JSON Input example on the right. [block:code] { "codes": [ { "code": "{\n \"vehicles\": [\n {\n \"ident\": \"Vehiculo 1\",\n \"location_start\": {\n \"ident\": \"depot_1_ini\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n }\n }\n ],\n \"nodes\": [\n {\n \"ident\": \"0\",\n \"lat\": -33.436135,\n \"lon\": -70.6509688\n },\n {\n \"ident\": \"1\",\n \"lat\": -33.4334123,\n \"lon\": -70.653234\n },\n {\n \"ident\": \"2\",\n \"lat\": -33.333413,\n \"lon\": -70.5534688\n },\n {\n \"ident\": \"3\",\n \"lat\": -33.4817996,\n \"lon\": -70.7447458\n },\n {\n \"ident\": \"4\",\n \"lat\": -33.5902026,\n \"lon\": -70.700119\n },\n {\n \"ident\": \"5\",\n \"lat\": -33.4210116,\n \"lon\": -70.65298589\n },\n {\n \"ident\": \"6\",\n \"lat\": -33.4428032,\n \"lon\": -70.6371272\n },\n {\n \"ident\": \"7\",\n \"lat\": -33.441032,\n \"lon\": -70.6535276\n },\n {\n \"ident\": \"8\",\n \"lat\": -33.438943,\n \"lon\": -70.655193\n },\n {\n \"ident\": \"9\",\n \"lat\": -33.443035,\n \"lon\": -70.646122\n }\n ]\n}", "language": "json", "name": "Input - JSON" }, { "code": "{\n \"vehicles\": [{\n \"ident\": \"Vehiculo 1\",\n \"tours\": [{\n \"nodes\": [{\n \"arrival\": \"00:00\",\n \"ident\": \"depot_1_ini\",\n \"lon\": -70.6104996,\n \"departure\": \"00:00\",\n \"lat\": -33.4233926,\n \"order\": 0\n }, {\n \"load\": 0,\n \"arrival\": \"00:17\",\n \"ident\": \"2\",\n \"lon\": -70.5534688,\n \"departure\": \"00:17\",\n \"lat\": -33.333413,\n \"order\": 1\n }, {\n \"load\": 0,\n \"arrival\": \"00:39\",\n \"ident\": \"0\",\n \"lon\": -70.6509688,\n \"departure\": \"00:39\",\n \"lat\": -33.436135,\n \"order\": 2\n }, {\n \"load\": 0,\n \"arrival\": \"00:40\",\n \"ident\": \"8\",\n \"lon\": -70.655193,\n \"departure\": \"00:40\",\n \"lat\": -33.438943,\n \"order\": 3\n }, {\n \"load\": 0,\n \"arrival\": \"00:41\",\n \"ident\": \"1\",\n \"lon\": -70.653234,\n \"departure\": \"00:41\",\n \"lat\": -33.4334123,\n \"order\": 4\n }, {\n \"load\": 0,\n \"arrival\": \"00:43\",\n \"ident\": \"5\",\n \"lon\": -70.65298589,\n \"departure\": \"00:43\",\n \"lat\": -33.4210116,\n \"order\": 5\n }, {\n \"load\": 0,\n \"arrival\": \"01:07\",\n \"ident\": \"4\",\n \"lon\": -70.700119,\n \"departure\": \"01:07\",\n \"lat\": -33.5902026,\n \"order\": 6\n }, {\n \"load\": 0,\n \"arrival\": \"01:22\",\n \"ident\": \"3\",\n \"lon\": -70.7447458,\n \"departure\": \"01:22\",\n \"lat\": -33.4817996,\n \"order\": 7\n }, {\n \"load\": 0,\n \"arrival\": \"01:34\",\n \"ident\": \"7\",\n \"lon\": -70.6535276,\n \"departure\": \"01:34\",\n \"lat\": -33.441032,\n \"order\": 8\n }, {\n \"load\": 0,\n \"arrival\": \"01:36\",\n \"ident\": \"9\",\n \"lon\": -70.646122,\n \"departure\": \"01:36\",\n \"lat\": -33.443035,\n \"order\": 9\n }, {\n \"load\": 0,\n \"arrival\": \"01:38\",\n \"ident\": \"6\",\n \"lon\": -70.6371272,\n \"departure\": \"01:38\",\n \"lat\": -33.4428032,\n \"order\": 10\n }, {\n \"arrival\": \"01:42\",\n \"ident\": \"depot_1_ini\",\n \"lon\": -70.6104996,\n \"departure\": \"01:42\",\n \"lat\": -33.4233926,\n \"order\": 11\n }]\n }]\n }],\n \"num_vehicles_used\": 1\n}", "language": "json", "name": "Output - JSON" } ], "sidebar": true } [/block] Here, there are 2 entities to take in consideration: Vehicles and Nodes. The first one: [block:code] { "codes": [ { "code": "{\n \"vehicles\": [\n {\n \"ident\": \"Vehiculo 1\",\n \"location_start\": {\n \"ident\": \"depot_1_ini\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n }\n }\n ]\n}", "language": "json", "name": "Vehicle - JSON" } ] } [/block] "Ident" is required as the identifier of the vehicle. The object "location_start" is the starting point from where the operation begins. As we did not define the "location_end" object because there is only one warehouse, the algorithm consider the "location_start" as the "location_end". So, the vehicle comes back to the same place from where it begined. [block:callout] { "type": "info", "body": "If vehicle work schedule is not defined, the algorithm will assume a shift from \"00:00\" to \"23:59\". To change this default configuration, the entities \"shift_start\" and \"shift_end\" have to be defined. As example:\n {\n \"ident\": \"Vehiculo 1\",\n \"shift_start\": \"9:00\",\n \"shift_end\": \"18:00\",\n \"location_start\": {\n \"ident\": \"depot_1_ini\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n }\n So, now, the vehicle will start its shift at 9:00 and finish at 18:00.", "title": "Horario de Operación Vehículo" } [/block] Now, for "Nodes", the following form has to be defined: [block:code] { "codes": [ { "code": "{\n \"ident\": \"8\",\n \"lat\": -33.438943,\n \"lon\": -70.655193\n}", "language": "json", "name": "Nodes - JSON" } ] } [/block] Again, "ident" as an identifier for the delivery point as well as a "lat" and a "lon" for the spacial coordinates so it can be georeferenced. How, for this example, we did not define any other variables, like capacities or time windows, the algorithm does not need anything else. [block:callout] { "type": "info", "body": "Time service is the amount of time that takes to deliver in the given direction. If it is not specified, the algorithm will assume that the given point takes 0 minutes to be delivered when the vehicle it is already there. In other words, it means that the deal is instantly made by the employee and the customer.To change this value, in the object \"node\", you have to write the following lines:\n {\n \"ident\": \"8\",\n \"lat\": -33.438943,\n \"lon\": -70.655193,\n \"duration\": 5\n }\nWhere \"duration\" it is the number of minutes that wanted to be change. Representing the delay that will make the service time at that given direction.", "title": "Time Service" } [/block] [block:api-header] { "type": "basic", "title": "Multiple warehouse, no capacities nor time windows." } [/block] As the case before, here we do not have to define capacities neither for the vehicles nor the directions as well as time windows. For the multiple warehouse case, you can simulate operations where vehicles can start at one point and end in others. For each vehicles that can be defined independently making the operation as complex as you want. For example: - Picking and then delivering from one place to another multiple times in one day. Let's see an example for this case: [block:code] { "codes": [ { "code": "{\n \"vehicles\": [{\n \"ident\": \"Vehiculo 1 diferente inicio y fin\",\n \"shift_start\": \"09:00\",\n \"shift_end\": \"19:00\",\n \"location_start\": {\n \"ident\": \"depot_1_ini\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n },\n \"location_end\": {\n \"ident\": \"depot_2_end\",\n \"lat\": -33.436662,\n \"lon\": -70.577584\n }\n }],\n \"nodes\": [{\n \"ident\": \"0\",\n \"lat\": -33.436135,\n \"lon\": -70.6509688\n }, {\n \"ident\": \"1\",\n \"lat\": -33.4334135,\n \"lon\": -70.6534688,\n \"duration\": 5\n }, {\n \"ident\": \"2\",\n \"lat\": -33.333413,\n \"lon\": -70.5534688,\n \"duration\": 5\n }, {\n \"ident\": \"3\",\n \"lat\": -33.4817996,\n \"lon\": -70.7447458,\n \"duration\": 30\n }, {\n \"ident\": \"4\",\n \"lat\": -33.5902026,\n \"lon\": -70.700119,\n \"duration\": 30\n }, {\n \"ident\": \"5\",\n \"lat\": -33.4210116,\n \"lon\": -70.65298589999,\n \"duration\": 30\n }, {\n \"ident\": \"6\",\n \"lat\": -33.4428032,\n \"lon\": -70.6371272,\n \"duration\": 30\n }, {\n \"ident\": \"7\",\n \"lat\": -33.441032,\n \"lon\": -70.6535276,\n \"duration\": 30\n }, {\n \"ident\": \"8\",\n \"lat\": -33.438943,\n \"lon\": -70.655193,\n \"duration\": 30\n }, {\n \"ident\": \"9\",\n \"lat\": -33.443035,\n \"lon\": -70.646122,\n \"duration\": 30\n }]\n}", "language": "json", "name": "Input - JSON" }, { "code": "{\n \"vehicles\": [{\n \"ident\": \"Vehiculo 1 diferente inicio y fin\",\n \"tours\": [{\n \"nodes\": [{\n \"arrival\": \"09:00\",\n \"ident\": \"depot_1_ini\",\n \"lon\": -70.6104996,\n \"departure\": \"09:00\",\n \"lat\": -33.4233926,\n \"order\": 0\n }, {\n \"load\": 0,\n \"arrival\": \"09:17\",\n \"ident\": \"2\",\n \"lon\": -70.5534688,\n \"departure\": \"09:22\",\n \"lat\": -33.333413,\n \"order\": 1\n }, {\n \"load\": 0,\n \"arrival\": \"10:05\",\n \"ident\": \"4\",\n \"lon\": -70.700119,\n \"departure\": \"10:35\",\n \"lat\": -33.5902026,\n \"order\": 2\n }, {\n \"load\": 0,\n \"arrival\": \"10:49\",\n \"ident\": \"3\",\n \"lon\": -70.7447458,\n \"departure\": \"11:19\",\n \"lat\": -33.4817996,\n \"order\": 3\n }, {\n \"load\": 0,\n \"arrival\": \"11:32\",\n \"ident\": \"8\",\n \"lon\": -70.655193,\n \"departure\": \"12:02\",\n \"lat\": -33.438943,\n \"order\": 4\n }, {\n \"load\": 0,\n \"arrival\": \"12:03\",\n \"ident\": \"1\",\n \"lon\": -70.6534688,\n \"departure\": \"12:08\",\n \"lat\": -33.4334135,\n \"order\": 5\n }, {\n \"load\": 0,\n \"arrival\": \"12:10\",\n \"ident\": \"5\",\n \"lon\": -70.65298589999,\n \"departure\": \"12:40\",\n \"lat\": -33.4210116,\n \"order\": 6\n }, {\n \"load\": 0,\n \"arrival\": \"12:44\",\n \"ident\": \"0\",\n \"lon\": -70.6509688,\n \"departure\": \"12:44\",\n \"lat\": -33.436135,\n \"order\": 7\n }, {\n \"load\": 0,\n \"arrival\": \"12:45\",\n \"ident\": \"7\",\n \"lon\": -70.6535276,\n \"departure\": \"13:15\",\n \"lat\": -33.441032,\n \"order\": 8\n }, {\n \"load\": 0,\n \"arrival\": \"13:17\",\n \"ident\": \"9\",\n \"lon\": -70.646122,\n \"departure\": \"13:47\",\n \"lat\": -33.443035,\n \"order\": 9\n }, {\n \"load\": 0,\n \"arrival\": \"13:49\",\n \"ident\": \"6\",\n \"lon\": -70.6371272,\n \"departure\": \"14:19\",\n \"lat\": -33.4428032,\n \"order\": 10\n }, {\n \"arrival\": \"14:23\",\n \"ident\": \"depot_2_end\",\n \"lon\": -70.577584,\n \"departure\": \"14:23\",\n \"lat\": -33.436662,\n \"order\": 11\n }]\n }]\n }],\n \"num_vehicles_used\": 1\n}", "language": "json", "name": "Output - JSON" } ] } [/block]
[block:api-header] { "type": "basic", "title": "One warehouse, no capacities nor time windows." } [/block] The simplest example for the API use has by parameters one unic warehouse, without capacities per vehicle neither time windows. Thus, every vehicles start and finish their shifts at the same starting point. Usually this example can be seen in: - Mailing delivery. - Food delivery with big vehicles. For this case see the JSON Input example on the right. [block:code] { "codes": [ { "code": "{\n \"vehicles\": [\n {\n \"ident\": \"Vehiculo 1\",\n \"location_start\": {\n \"ident\": \"depot_1_ini\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n }\n }\n ],\n \"nodes\": [\n {\n \"ident\": \"0\",\n \"lat\": -33.436135,\n \"lon\": -70.6509688\n },\n {\n \"ident\": \"1\",\n \"lat\": -33.4334123,\n \"lon\": -70.653234\n },\n {\n \"ident\": \"2\",\n \"lat\": -33.333413,\n \"lon\": -70.5534688\n },\n {\n \"ident\": \"3\",\n \"lat\": -33.4817996,\n \"lon\": -70.7447458\n },\n {\n \"ident\": \"4\",\n \"lat\": -33.5902026,\n \"lon\": -70.700119\n },\n {\n \"ident\": \"5\",\n \"lat\": -33.4210116,\n \"lon\": -70.65298589\n },\n {\n \"ident\": \"6\",\n \"lat\": -33.4428032,\n \"lon\": -70.6371272\n },\n {\n \"ident\": \"7\",\n \"lat\": -33.441032,\n \"lon\": -70.6535276\n },\n {\n \"ident\": \"8\",\n \"lat\": -33.438943,\n \"lon\": -70.655193\n },\n {\n \"ident\": \"9\",\n \"lat\": -33.443035,\n \"lon\": -70.646122\n }\n ]\n}", "language": "json", "name": "Input - JSON" }, { "code": "{\n \"vehicles\": [{\n \"ident\": \"Vehiculo 1\",\n \"tours\": [{\n \"nodes\": [{\n \"arrival\": \"00:00\",\n \"ident\": \"depot_1_ini\",\n \"lon\": -70.6104996,\n \"departure\": \"00:00\",\n \"lat\": -33.4233926,\n \"order\": 0\n }, {\n \"load\": 0,\n \"arrival\": \"00:17\",\n \"ident\": \"2\",\n \"lon\": -70.5534688,\n \"departure\": \"00:17\",\n \"lat\": -33.333413,\n \"order\": 1\n }, {\n \"load\": 0,\n \"arrival\": \"00:39\",\n \"ident\": \"0\",\n \"lon\": -70.6509688,\n \"departure\": \"00:39\",\n \"lat\": -33.436135,\n \"order\": 2\n }, {\n \"load\": 0,\n \"arrival\": \"00:40\",\n \"ident\": \"8\",\n \"lon\": -70.655193,\n \"departure\": \"00:40\",\n \"lat\": -33.438943,\n \"order\": 3\n }, {\n \"load\": 0,\n \"arrival\": \"00:41\",\n \"ident\": \"1\",\n \"lon\": -70.653234,\n \"departure\": \"00:41\",\n \"lat\": -33.4334123,\n \"order\": 4\n }, {\n \"load\": 0,\n \"arrival\": \"00:43\",\n \"ident\": \"5\",\n \"lon\": -70.65298589,\n \"departure\": \"00:43\",\n \"lat\": -33.4210116,\n \"order\": 5\n }, {\n \"load\": 0,\n \"arrival\": \"01:07\",\n \"ident\": \"4\",\n \"lon\": -70.700119,\n \"departure\": \"01:07\",\n \"lat\": -33.5902026,\n \"order\": 6\n }, {\n \"load\": 0,\n \"arrival\": \"01:22\",\n \"ident\": \"3\",\n \"lon\": -70.7447458,\n \"departure\": \"01:22\",\n \"lat\": -33.4817996,\n \"order\": 7\n }, {\n \"load\": 0,\n \"arrival\": \"01:34\",\n \"ident\": \"7\",\n \"lon\": -70.6535276,\n \"departure\": \"01:34\",\n \"lat\": -33.441032,\n \"order\": 8\n }, {\n \"load\": 0,\n \"arrival\": \"01:36\",\n \"ident\": \"9\",\n \"lon\": -70.646122,\n \"departure\": \"01:36\",\n \"lat\": -33.443035,\n \"order\": 9\n }, {\n \"load\": 0,\n \"arrival\": \"01:38\",\n \"ident\": \"6\",\n \"lon\": -70.6371272,\n \"departure\": \"01:38\",\n \"lat\": -33.4428032,\n \"order\": 10\n }, {\n \"arrival\": \"01:42\",\n \"ident\": \"depot_1_ini\",\n \"lon\": -70.6104996,\n \"departure\": \"01:42\",\n \"lat\": -33.4233926,\n \"order\": 11\n }]\n }]\n }],\n \"num_vehicles_used\": 1\n}", "language": "json", "name": "Output - JSON" } ], "sidebar": true } [/block] Here, there are 2 entities to take in consideration: Vehicles and Nodes. The first one: [block:code] { "codes": [ { "code": "{\n \"vehicles\": [\n {\n \"ident\": \"Vehiculo 1\",\n \"location_start\": {\n \"ident\": \"depot_1_ini\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n }\n }\n ]\n}", "language": "json", "name": "Vehicle - JSON" } ] } [/block] "Ident" is required as the identifier of the vehicle. The object "location_start" is the starting point from where the operation begins. As we did not define the "location_end" object because there is only one warehouse, the algorithm consider the "location_start" as the "location_end". So, the vehicle comes back to the same place from where it begined. [block:callout] { "type": "info", "body": "If vehicle work schedule is not defined, the algorithm will assume a shift from \"00:00\" to \"23:59\". To change this default configuration, the entities \"shift_start\" and \"shift_end\" have to be defined. As example:\n {\n \"ident\": \"Vehiculo 1\",\n \"shift_start\": \"9:00\",\n \"shift_end\": \"18:00\",\n \"location_start\": {\n \"ident\": \"depot_1_ini\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n }\n So, now, the vehicle will start its shift at 9:00 and finish at 18:00.", "title": "Horario de Operación Vehículo" } [/block] Now, for "Nodes", the following form has to be defined: [block:code] { "codes": [ { "code": "{\n \"ident\": \"8\",\n \"lat\": -33.438943,\n \"lon\": -70.655193\n}", "language": "json", "name": "Nodes - JSON" } ] } [/block] Again, "ident" as an identifier for the delivery point as well as a "lat" and a "lon" for the spacial coordinates so it can be georeferenced. How, for this example, we did not define any other variables, like capacities or time windows, the algorithm does not need anything else. [block:callout] { "type": "info", "body": "Time service is the amount of time that takes to deliver in the given direction. If it is not specified, the algorithm will assume that the given point takes 0 minutes to be delivered when the vehicle it is already there. In other words, it means that the deal is instantly made by the employee and the customer.To change this value, in the object \"node\", you have to write the following lines:\n {\n \"ident\": \"8\",\n \"lat\": -33.438943,\n \"lon\": -70.655193,\n \"duration\": 5\n }\nWhere \"duration\" it is the number of minutes that wanted to be change. Representing the delay that will make the service time at that given direction.", "title": "Time Service" } [/block] [block:api-header] { "type": "basic", "title": "Multiple warehouse, no capacities nor time windows." } [/block] As the case before, here we do not have to define capacities neither for the vehicles nor the directions as well as time windows. For the multiple warehouse case, you can simulate operations where vehicles can start at one point and end in others. For each vehicles that can be defined independently making the operation as complex as you want. For example: - Picking and then delivering from one place to another multiple times in one day. Let's see an example for this case: [block:code] { "codes": [ { "code": "{\n \"vehicles\": [{\n \"ident\": \"Vehiculo 1 diferente inicio y fin\",\n \"shift_start\": \"09:00\",\n \"shift_end\": \"19:00\",\n \"location_start\": {\n \"ident\": \"depot_1_ini\",\n \"lat\": -33.4233926,\n \"lon\": -70.6104996\n },\n \"location_end\": {\n \"ident\": \"depot_2_end\",\n \"lat\": -33.436662,\n \"lon\": -70.577584\n }\n }],\n \"nodes\": [{\n \"ident\": \"0\",\n \"lat\": -33.436135,\n \"lon\": -70.6509688\n }, {\n \"ident\": \"1\",\n \"lat\": -33.4334135,\n \"lon\": -70.6534688,\n \"duration\": 5\n }, {\n \"ident\": \"2\",\n \"lat\": -33.333413,\n \"lon\": -70.5534688,\n \"duration\": 5\n }, {\n \"ident\": \"3\",\n \"lat\": -33.4817996,\n \"lon\": -70.7447458,\n \"duration\": 30\n }, {\n \"ident\": \"4\",\n \"lat\": -33.5902026,\n \"lon\": -70.700119,\n \"duration\": 30\n }, {\n \"ident\": \"5\",\n \"lat\": -33.4210116,\n \"lon\": -70.65298589999,\n \"duration\": 30\n }, {\n \"ident\": \"6\",\n \"lat\": -33.4428032,\n \"lon\": -70.6371272,\n \"duration\": 30\n }, {\n \"ident\": \"7\",\n \"lat\": -33.441032,\n \"lon\": -70.6535276,\n \"duration\": 30\n }, {\n \"ident\": \"8\",\n \"lat\": -33.438943,\n \"lon\": -70.655193,\n \"duration\": 30\n }, {\n \"ident\": \"9\",\n \"lat\": -33.443035,\n \"lon\": -70.646122,\n \"duration\": 30\n }]\n}", "language": "json", "name": "Input - JSON" }, { "code": "{\n \"vehicles\": [{\n \"ident\": \"Vehiculo 1 diferente inicio y fin\",\n \"tours\": [{\n \"nodes\": [{\n \"arrival\": \"09:00\",\n \"ident\": \"depot_1_ini\",\n \"lon\": -70.6104996,\n \"departure\": \"09:00\",\n \"lat\": -33.4233926,\n \"order\": 0\n }, {\n \"load\": 0,\n \"arrival\": \"09:17\",\n \"ident\": \"2\",\n \"lon\": -70.5534688,\n \"departure\": \"09:22\",\n \"lat\": -33.333413,\n \"order\": 1\n }, {\n \"load\": 0,\n \"arrival\": \"10:05\",\n \"ident\": \"4\",\n \"lon\": -70.700119,\n \"departure\": \"10:35\",\n \"lat\": -33.5902026,\n \"order\": 2\n }, {\n \"load\": 0,\n \"arrival\": \"10:49\",\n \"ident\": \"3\",\n \"lon\": -70.7447458,\n \"departure\": \"11:19\",\n \"lat\": -33.4817996,\n \"order\": 3\n }, {\n \"load\": 0,\n \"arrival\": \"11:32\",\n \"ident\": \"8\",\n \"lon\": -70.655193,\n \"departure\": \"12:02\",\n \"lat\": -33.438943,\n \"order\": 4\n }, {\n \"load\": 0,\n \"arrival\": \"12:03\",\n \"ident\": \"1\",\n \"lon\": -70.6534688,\n \"departure\": \"12:08\",\n \"lat\": -33.4334135,\n \"order\": 5\n }, {\n \"load\": 0,\n \"arrival\": \"12:10\",\n \"ident\": \"5\",\n \"lon\": -70.65298589999,\n \"departure\": \"12:40\",\n \"lat\": -33.4210116,\n \"order\": 6\n }, {\n \"load\": 0,\n \"arrival\": \"12:44\",\n \"ident\": \"0\",\n \"lon\": -70.6509688,\n \"departure\": \"12:44\",\n \"lat\": -33.436135,\n \"order\": 7\n }, {\n \"load\": 0,\n \"arrival\": \"12:45\",\n \"ident\": \"7\",\n \"lon\": -70.6535276,\n \"departure\": \"13:15\",\n \"lat\": -33.441032,\n \"order\": 8\n }, {\n \"load\": 0,\n \"arrival\": \"13:17\",\n \"ident\": \"9\",\n \"lon\": -70.646122,\n \"departure\": \"13:47\",\n \"lat\": -33.443035,\n \"order\": 9\n }, {\n \"load\": 0,\n \"arrival\": \"13:49\",\n \"ident\": \"6\",\n \"lon\": -70.6371272,\n \"departure\": \"14:19\",\n \"lat\": -33.4428032,\n \"order\": 10\n }, {\n \"arrival\": \"14:23\",\n \"ident\": \"depot_2_end\",\n \"lon\": -70.577584,\n \"departure\": \"14:23\",\n \"lat\": -33.436662,\n \"order\": 11\n }]\n }]\n }],\n \"num_vehicles_used\": 1\n}", "language": "json", "name": "Output - JSON" } ] } [/block]