{"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-04-20T17:08:28","modified_gmt":"2026-04-20T17:08:28","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=\"#descricao\" data-type=\"internal\" data-id=\"#descricao\">Descripci\u00f3n del problema<\/a><\/li>\n\n\n\n<li><a href=\"#requisicao\" data-type=\"internal\" data-id=\"#requisicao\">Solicitud completa<\/a><\/li>\n\n\n\n<li><a href=\"#solucao\" data-type=\"internal\" data-id=\"#solucao\">Soluci\u00f3n al problema log\u00edstico<\/a><\/li>\n\n\n\n<li><a href=\"#resposta\" data-type=\"internal\" data-id=\"#resposta\">Respuesta completa<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"descricao\">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<p class=\"has-text-align-center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/5uooMHRJeaGLLCR5m9ChVzZzljxCQeKzZWNZpBTyKePBux54Yge1NZYQVsGJ25_gxdLnwWElUuyfLiOM31c1aY-_mRWlvTxHhokobhdOIf9HdOQLhwQ_QovRT9F3BYjD8NTZxMjqkfCV_4PTPsiRtmk\" width=\"703\" height=\"319\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"requisicao\">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=\"solucao\">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<p class=\"has-text-align-center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/3lZ9byKkcpx8KWMFfCu2g69lP_vFM4kRrPHh43ks7NRmA-WybXul9s4e5zuMXLoij8nd466ShgAfSHp_DbtnoLZQIcj2ELb6PL-Y0Zn_R0TtYax5lhcS5IF_byY_cVL8xON9qGfLb-5NCNmfcx04mgM\" width=\"703\" height=\"320\"><\/p>\n\n\n\n<p>Se devuelven los siguientes indicadores globales, as\u00ed como la secuencia temporal de las actividades realizadas por el veh\u00edculo:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Indicador<\/strong><\/td><td><strong>Resultados<\/strong><\/td><\/tr><tr><td><strong>Duraci\u00f3n total del servicio:<\/strong><\/td><td>00:35:00<\/td><\/tr><tr><td><strong>Tiempo total de entrega:<\/strong><\/td><td>00:20:00<\/td><\/tr><tr><td><strong>Tiempo total de trabajo diurno:<\/strong><\/td><td>02:25:13<\/td><\/tr><tr><td><strong>Tiempo total trabajado por la noche:<\/strong><\/td><td>00:00:00<\/td><\/tr><tr><td><strong>Tiempo total de descarga:<\/strong><\/td><td>00:00:00<\/td><\/tr><tr><td><strong>Tiempo total de trabajo:<\/strong><\/td><td>02:25:13<\/td><\/tr><tr><td><strong>Tiempo total de recogida:<\/strong><\/td><td>00:00:00<\/td><\/tr><tr><td><strong>N\u00famero de ventanas temporales:<\/strong><\/td><td>1<\/td><\/tr><tr><td><strong>Tiempo total de conducci\u00f3n:<\/strong><\/td><td>01:50:13<\/td><\/tr><tr><td><strong>Tiempo total de carga:<\/strong><\/td><td>00:15:00<\/td><\/tr><tr><td><strong>Tiempo total:<\/strong><\/td><td>02:25:13<\/td><\/tr><tr><td><strong>Distancia total:<\/strong><\/td><td>74,21 km<\/td><\/tr><tr><td><strong>\u00cdndice medio de ocupaci\u00f3n en Volumen:<\/strong><\/td><td>35<\/td><\/tr><tr><td><strong>Tasa de ocupaci\u00f3n media en pesos:<\/strong><\/td><td>29.17<\/td><\/tr><tr><td><strong>N\u00famero de rechazos:<\/strong><\/td><td>0<\/td><\/tr><tr><td><strong>Tiempo total de espera:<\/strong><\/td><td>00:00:00<\/td><\/tr><tr><td><strong>Tiempo total de descanso:<\/strong><\/td><td>00:00:00<\/td><\/tr><tr><td><strong>N\u00famero de rutas:<\/strong><\/td><td>1<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Indicadores de rutas globales<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"resposta\">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":3,"href":"https:\/\/developers.maplink.global\/es\/wp-json\/wp\/v2\/posts\/1884\/revisions"}],"predecessor-version":[{"id":3762,"href":"https:\/\/developers.maplink.global\/es\/wp-json\/wp\/v2\/posts\/1884\/revisions\/3762"}],"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}]}}