{"id":1884,"date":"2023-12-12T20:17:25","date_gmt":"2023-12-12T20:17:25","guid":{"rendered":"https:\/\/developers.maplink.global\/ejemplo-1-operaciones-con-un-solo-vehiculo\/"},"modified":"2026-05-12T17:55:26","modified_gmt":"2026-05-12T17:55:26","slug":"ejemplo-1-operaciones-con-un-solo-vehiculo","status":"publish","type":"post","link":"https:\/\/developers.maplink.global\/es\/ejemplo-1-operaciones-con-un-solo-vehiculo\/","title":{"rendered":"Ejemplo 1 &#8211; Operaciones con un solo veh\u00edculo"},"content":{"rendered":"\n<ul class=\"wp-block-list\">\n<li><a href=\"#descripcion\" data-type=\"internal\" data-id=\"#descricao\">Descripci\u00f3n del problema<\/a><\/li>\n\n\n\n<li><a href=\"#solicitud\" data-type=\"internal\" data-id=\"#requisicao\">Solicitud completa<\/a><\/li>\n\n\n\n<li><a href=\"#solucion\" data-type=\"internal\" data-id=\"#solucao\">Soluci\u00f3n al problema log\u00edstico<\/a><\/li>\n\n\n\n<li><a href=\"#respuesta\" data-type=\"internal\" data-id=\"#resposta\">Respuesta completa<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"descripcion\">Descripci\u00f3n del problema<\/h3>\n\n\n\n<p>En este ejemplo, tenemos una solicitud para que la Planning API resuelva un <strong>problema log\u00edstico que implica 1 veh\u00edculo y 2 operaciones, partiendo del centro de distribuci\u00f3n<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"341\" src=\"https:\/\/developers.maplink.global\/wp-content\/uploads\/2023\/12\/image-16.png\" alt=\"\" class=\"wp-image-3786\" srcset=\"https:\/\/developers.maplink.global\/wp-content\/uploads\/2023\/12\/image-16.png 752w, https:\/\/developers.maplink.global\/wp-content\/uploads\/2023\/12\/image-16-300x136.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><figcaption class=\"wp-element-caption\">Descripci\u00f3n del problema<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"solicitud\">Solicitud completa<\/h3>\n\n\n\n<p>La solicitud completa puede verse a continuaci\u00f3n:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"optimizationProfile\": \"BRAZIL46\",\n    \"tripsProfile\": \"MAPLINKBR\",\n    \"startDate\": 1513750219000,\n    \"legislationProfiles\": [\n        {\n            \"name\": \"DEFAULT\"\n        }\n    ],\n    \"logisticConstraints\": [\n        {\n            \"name\": \"DEFAULT\",\n            \"siteLoadingFixedTime\": 900,\n            \"siteUnloadingFixedTime\": 600\n        }\n    ],\n    \"products\": [\n        {\n            \"name\": \"DEFAULT\"\n        }\n    ],\n    \"sites\": [\n        {\n            \"name\": \"Cliente1\",\n            \"coordinates\": {\n                \"latitude\": -23.507608,\n                \"longitude\": -46.587145\n            },\n            \"logisticConstraints\": \"DEFAULT\"\n        },\n        {\n            \"name\": \"Cliente2\",\n            \"coordinates\": {\n                \"latitude\": -23.621059,\n                \"longitude\": -46.756193\n            },\n            \"logisticConstraints\": \"DEFAULT\"\n        }\n    ],\n    \"depots\": [\n        {\n            \"name\": \"CD\",\n            \"coordinates\": {\n                \"latitude\": -23.503939,\n                \"longitude\": -46.498419\n            },\n            \"logisticConstraints\": \"DEFAULT\"\n        }\n    ],\n    \"vehicleTypes\": [\n        {\n            \"name\": \"VUC\",\n            \"maxVolume\": 20,\n            \"maxWeight\": 1200,\n            \"size\": 1\n        }\n    ],\n    \"vehicles\": [\n        {\n            \"name\": \"VUC_1\",\n            \"vehicleType\": \"VUC\",\n            \"legislationProfile\": \"DEFAULT\",\n            \"availablePeriods\": [\n                {\n                    \"departureSite\": \"CD\",\n                    \"arrivalSite\": \"CD\",\n                    \"timeWindow\": {\n                        \"start\": 1513753200000,\n                        \"end\": 1513796400000\n                    }\n                }\n            ]\n        }\n    ],\n    \"operations\": [\n        {\n            \"id\": \"P1\",\n            \"weight\": 100,\n            \"volume\": 2,\n            \"product\": \"DEFAULT\",\n            \"type\": \"DELIVERY\",\n            \"depotSite\": \"CD\",\n            \"customerSite\": \"Cliente1\",\n            \"customerTimeWindows\": [\n                {\n                    \"start\": 1513756800000,\n                    \"end\": 1513771200000\n                }\n            ]\n        },\n        {\n            \"id\": \"P2\",\n            \"weight\": 250,\n            \"volume\": 5,\n            \"product\": \"DEFAULT\",\n            \"type\": \"DELIVERY\",\n            \"depotSite\": \"CD\",\n            \"customerSite\": \"Cliente2\",\n            \"customerTimeWindows\": [\n                {\n                    \"start\": 1513756800000,\n                    \"end\": 1513771200000\n                }\n            ]\n        }\n    ]\n}<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"solucion\">S<strong>oluci\u00f3n al problema log\u00edstico<\/strong><\/h3>\n\n\n\n<p>La respuesta de la API se devolver\u00e1 en formato <em>json<\/em> con la mejor secuencia de operaciones de entrega para cada veh\u00edculo.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"373\" src=\"https:\/\/developers.maplink.global\/wp-content\/uploads\/2023\/12\/image-17.png\" alt=\"\" class=\"wp-image-3789\" srcset=\"https:\/\/developers.maplink.global\/wp-content\/uploads\/2023\/12\/image-17.png 640w, https:\/\/developers.maplink.global\/wp-content\/uploads\/2023\/12\/image-17-300x175.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption class=\"wp-element-caption\">Soluci\u00f3n al problema log\u00edstico<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"respuesta\">Respuesta completa<\/h3>\n\n\n\n<p>A continuaci\u00f3n encontrar\u00e1 la respuesta completa:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"id\": \"69e65d09afbd64087ee1e08f\",\n    \"clientId\": \"maplink\",\n    \"vehicleRoutes\": [\n        {\n            \"routes\": [\n                {\n                    \"id\": \"NewRoute_1_1\",\n                    \"activities\": [\n                        {\n                            \"activity\": \"ROUTE_START\",\n                            \"timeWindow\": {\n                                \"start\": 1513754569000,\n                                \"end\": 1513754569000\n                            },\n                            \"type\": \"SITE\",\n                            \"site\": \"CD\",\n                            \"operations\": []\n                        },\n                        {\n                            \"activity\": \"LOADING\",\n                            \"timeWindow\": {\n                                \"start\": 1513754569000,\n                                \"end\": 1513755469000\n                            },\n                            \"type\": \"SITE\",\n                            \"site\": \"CD\",\n                            \"fixedTimeSite\": 900,\n                            \"volume\": 7.0,\n                            \"weight\": 350.0,\n                            \"operations\": [\n                                \"P2\",\n                                \"P1\"\n                            ]\n                        },\n                        {\n                            \"activity\": \"DRIVING\",\n                            \"timeWindow\": {\n                                \"start\": 1513755469000,\n                                \"end\": 1513756800000\n                            },\n                            \"type\": \"DRIVING\",\n                            \"operations\": [],\n                            \"arrivalSite\": \"Cliente1\",\n                            \"departureSite\": \"CD\",\n                            \"distance\": 13410,\n                            \"nominalDuration\": 1331\n                        },\n                        {\n                            \"activity\": \"DELIVERY\",\n                            \"timeWindow\": {\n                                \"start\": 1513756800000,\n                                \"end\": 1513757400000\n                            },\n                            \"type\": \"SITE\",\n                            \"site\": \"Cliente1\",\n                            \"fixedTimeSite\": 600,\n                            \"volume\": 2.0,\n                            \"weight\": 100.0,\n                            \"operations\": [\n                                \"P1\"\n                            ]\n                        },\n                        {\n                            \"activity\": \"DRIVING\",\n                            \"timeWindow\": {\n                                \"start\": 1513757400000,\n                                \"end\": 1513759737000\n                            },\n                            \"type\": \"DRIVING\",\n                            \"operations\": [],\n                            \"arrivalSite\": \"Cliente2\",\n                            \"departureSite\": \"Cliente1\",\n                            \"distance\": 26603,\n                            \"nominalDuration\": 2337\n                        },\n                        {\n                            \"activity\": \"DELIVERY\",\n                            \"timeWindow\": {\n                                \"start\": 1513759737000,\n                                \"end\": 1513760337000\n                            },\n                            \"type\": \"SITE\",\n                            \"site\": \"Cliente2\",\n                            \"fixedTimeSite\": 600,\n                            \"volume\": 5.0,\n                            \"weight\": 250.0,\n                            \"operations\": [\n                                \"P2\"\n                            ]\n                        },\n                        {\n                            \"activity\": \"DRIVING\",\n                            \"timeWindow\": {\n                                \"start\": 1513760337000,\n                                \"end\": 1513763220000\n                            },\n                            \"type\": \"DRIVING\",\n                            \"operations\": [],\n                            \"arrivalSite\": \"CD\",\n                            \"departureSite\": \"Cliente2\",\n                            \"distance\": 34654,\n                            \"nominalDuration\": 2883\n                        },\n                        {\n                            \"activity\": \"ROUTE_END\",\n                            \"timeWindow\": {\n                                \"start\": 1513763220000,\n                                \"end\": 1513763220000\n                            },\n                            \"type\": \"SITE\",\n                            \"site\": \"CD\",\n                            \"operations\": []\n                        }\n                    ]\n                }\n            ],\n            \"vehicle\": \"VUC_1\",\n            \"period\": {\n                \"timeWindow\": {\n                    \"start\": 1513753200000,\n                    \"end\": 1513796400000\n                },\n                \"departureSite\": \"CD\",\n                \"arrivalSite\": \"CD\"\n            }\n        }\n    ],\n    \"indicators\": {\n        \"totalServiceTime\": 2100,\n        \"totalDeliveringTime\": 1200,\n        \"dayWorkingTotalTime\": 8651,\n        \"nightWorkingTotalTime\": 0,\n        \"totalUnloadingTime\": 0,\n        \"totalWorkingTime\": 8651,\n        \"totalCollectingTime\": 0,\n        \"timeWindowNumber\": 1,\n        \"totalDrivingTime\": 6551,\n        \"totalLoadingTime\": 900,\n        \"totalTime\": 8651,\n        \"totalDistance\": 74667,\n        \"averageOccupancyRateVolume\": 35.0,\n        \"averageOccupancyRateWeight\": 29.17,\n        \"rejectOperationsNumber\": 0,\n        \"totalWaitingTime\": 0,\n        \"totalRestTime\": 0,\n        \"routesNumber\": 1\n    }\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Descripci\u00f3n del problema En este ejemplo, tenemos una solicitud para que la Planning API resuelva un problema log\u00edstico que implica 1 veh\u00edculo y 2 operaciones, partiendo del centro de distribuci\u00f3n. Solicitud completa La solicitud completa puede verse a continuaci\u00f3n: Soluci\u00f3n al problema log\u00edstico La respuesta de la API se devolver\u00e1 en formato json con la [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[147],"tags":[],"class_list":["post-1884","post","type-post","status-publish","format-standard","hentry","category-planning-es"],"acf":[],"_links":{"self":[{"href":"https:\/\/developers.maplink.global\/es\/wp-json\/wp\/v2\/posts\/1884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.maplink.global\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developers.maplink.global\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/es\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/es\/wp-json\/wp\/v2\/comments?post=1884"}],"version-history":[{"count":5,"href":"https:\/\/developers.maplink.global\/es\/wp-json\/wp\/v2\/posts\/1884\/revisions"}],"predecessor-version":[{"id":3861,"href":"https:\/\/developers.maplink.global\/es\/wp-json\/wp\/v2\/posts\/1884\/revisions\/3861"}],"wp:attachment":[{"href":"https:\/\/developers.maplink.global\/es\/wp-json\/wp\/v2\/media?parent=1884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developers.maplink.global\/es\/wp-json\/wp\/v2\/categories?post=1884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.maplink.global\/es\/wp-json\/wp\/v2\/tags?post=1884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}