Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- // Esta es la lista de clusters para que luego puedas deshacer
- // la agregación. Contiene una lista de clusters agregados por
- // código postal, y cada uno de ellos contiene la lista de notas
- // asignadas al código postal.
- "clusters":[
- {
- "services":[
- {
- "client_id":"000004",
- "client_name":"LAS CIES",
- "lat":40.3370553,
- "lng":-3.7500909,
- "timewindows":[
- [
- 33300,
- 36000
- ]
- ],
- "duration":243,
- "zip_code":28915,
- "zone":63
- }
- ],
- "zipcode":28915,
- "timewindows":[
- [
- 33300,
- 37800
- ]
- ],
- "name":"28915",
- "n_services":1,
- "duration":243.0,
- "location":{
- "lat":40.3370553,
- "lng":-3.7500909
- }
- },
- {
- "services":[
- {
- "client_id":"000006",
- "client_name":"CAFETERIA EL RINCON DE BLAS",
- "lat":40.477907,
- "lng":-3.670319,
- "timewindows":[
- ],
- "duration":null,
- "zip_code":28033,
- "zone":33
- }
- ],
- "zipcode":28033,
- "name":"28033",
- "n_services":1,
- "duration":300.0,
- "location":{
- "lat":40.477907,
- "lng":-3.670319
- }
- },
- {
- "services":[
- {
- "client_id":"000008",
- "client_name":"LOS GIRASOLES",
- "lat":40.428762,
- "lng":-3.677837,
- "timewindows":[
- [
- 25200,
- 26100
- ]
- ],
- "duration":110,
- "zip_code":28001,
- "zone":1
- }
- ],
- "zipcode":28001,
- "timewindows":[
- [
- 25200,
- 27900
- ]
- ],
- "name":"28001-0",
- "n_services":1,
- "duration":110.0,
- "location":{
- "lat":40.428762,
- "lng":-3.677837
- }
- },
- {
- "services":[
- {
- "client_id":"000023",
- "client_name":"CAF. CAYBU",
- "lat":40.4279001,
- "lng":-3.6884119,
- "timewindows":[
- [
- 36900,
- 39600
- ]
- ],
- "duration":345,
- "zip_code":28001,
- "zone":1
- }
- ],
- "zipcode":28001,
- "timewindows":[
- [
- 36900,
- 41400
- ]
- ],
- "name":"28001-1",
- "n_services":1,
- "duration":345.0,
- "location":{
- "lat":40.4279001,
- "lng":-3.6884119
- }
- },
- {
- "services":[
- {
- "client_id":"000018",
- "client_name":"CASA PACO",
- "lat":40.430376,
- "lng":-3.720342,
- "timewindows":[
- [
- 23400,
- 27000
- ]
- ],
- "duration":437,
- "zip_code":28008,
- "zone":8
- },
- {
- "client_id":"000020",
- "client_name":"LA CITE",
- "lat":40.432732,
- "lng":-3.733541,
- "timewindows":[
- [
- 32400,
- 42300
- ],
- [
- 45000,
- 46800
- ],
- [
- 54000,
- 54900
- ],
- [
- 59400,
- 60300
- ]
- ],
- "duration":544,
- "zip_code":28008,
- "zone":8
- }
- ],
- "zipcode":28008,
- "timewindows":[
- [
- 23400,
- 48600
- ]
- ],
- "name":"28008-0",
- "n_services":2,
- "duration":490.5,
- "location":{
- "lat":40.431554000000006,
- "lng":-3.7269415
- }
- },
- {
- "services":[
- {
- "client_id":"000019",
- "client_name":"LA CARPA",
- "lat":40.412445,
- "lng":-3.7038458,
- "timewindows":[
- [
- 32400,
- 34200
- ],
- [
- 49500,
- 55800
- ]
- ],
- "duration":185,
- "zip_code":28012,
- "zone":12
- }
- ],
- "zipcode":28012,
- "timewindows":[
- [
- 32400,
- 36000
- ]
- ],
- "name":"28012-0",
- "n_services":1,
- "duration":185.0,
- "location":{
- "lat":40.412445,
- "lng":-3.7038458
- }
- },
- {
- "services":[
- {
- "client_id":"000034",
- "client_name":"MARISQUERIA LUIS",
- "lat":40.436208,
- "lng":-3.672229,
- "timewindows":[
- [
- 52200,
- 54000
- ]
- ],
- "duration":354,
- "zip_code":28028,
- "zone":28
- }
- ],
- "zipcode":28028,
- "timewindows":[
- [
- 52200,
- 55800
- ]
- ],
- "name":"28028",
- "n_services":1,
- "duration":354.0,
- "location":{
- "lat":40.436208,
- "lng":-3.672229
- }
- },
- {
- "services":[
- {
- "client_id":"000036",
- "client_name":"TABERNA ARANZAZU",
- "lat":40.4386596,
- "lng":-3.6785672,
- "timewindows":[
- [
- 27000,
- 28800
- ],
- [
- 29700,
- 34200
- ],
- [
- 36000,
- 37800
- ],
- [
- 55800,
- 56700
- ]
- ],
- "duration":299,
- "zip_code":28002,
- "zone":2
- },
- {
- "client_id":"000071",
- "client_name":"ROSCANI",
- "lat":40.4439497,
- "lng":-3.6716896,
- "timewindows":[
- [
- 33300,
- 34200
- ],
- [
- 36000,
- 37800
- ]
- ],
- "duration":208,
- "zip_code":28002,
- "zone":2
- }
- ],
- "zipcode":28002,
- "timewindows":[
- [
- 27000,
- 39600
- ]
- ],
- "name":"28002-0",
- "n_services":2,
- "duration":253.5,
- "location":{
- "lat":40.44130465,
- "lng":-3.6751284
- }
- },
- {
- "services":[
- {
- "client_id":"000050",
- "client_name":"LA CARTA DE RAST",
- "lat":40.4363341,
- "lng":-3.620528,
- "timewindows":[
- [
- 26100,
- 27900
- ]
- ],
- "duration":382,
- "zip_code":28037,
- "zone":37
- }
- ],
- "zipcode":28037,
- "timewindows":[
- [
- 26100,
- 29700
- ]
- ],
- "name":"28037",
- "n_services":1,
- "duration":382.0,
- "location":{
- "lat":40.4363341,
- "lng":-3.620528
- }
- }
- ],
- // Esta es la lista de servicios que tienes que enviar a optimizar, ya las
- // he puesto en el formato correcto para que puedas enviarlo sin tener que
- // realizar ninguna modificación
- "clusters_as_services":[
- {
- "id":"28915",
- "location":{
- "lat":40.3370553,
- "lng":-3.7500909
- },
- "duration":243,
- "timewindows":[
- [
- 33300,
- 37800
- ]
- ]
- },
- {
- "id":"28033",
- "location":{
- "lat":40.477907,
- "lng":-3.670319
- },
- "duration":300
- },
- {
- "id":"28001-0",
- "location":{
- "lat":40.428762,
- "lng":-3.677837
- },
- "duration":110,
- "timewindows":[
- [
- 25200,
- 27900
- ]
- ]
- },
- {
- "id":"28001-1",
- "location":{
- "lat":40.4279001,
- "lng":-3.6884119
- },
- "duration":345,
- "timewindows":[
- [
- 36900,
- 41400
- ]
- ]
- },
- {
- "id":"28008-0",
- "location":{
- "lat":40.431554000000006,
- "lng":-3.7269415
- },
- "duration":490,
- "timewindows":[
- [
- 23400,
- 48600
- ]
- ]
- },
- {
- "id":"28012-0",
- "location":{
- "lat":40.412445,
- "lng":-3.7038458
- },
- "duration":185,
- "timewindows":[
- [
- 32400,
- 36000
- ]
- ]
- },
- {
- "id":"28028",
- "location":{
- "lat":40.436208,
- "lng":-3.672229
- },
- "duration":354,
- "timewindows":[
- [
- 52200,
- 55800
- ]
- ]
- },
- {
- "id":"28002-0",
- "location":{
- "lat":40.44130465,
- "lng":-3.6751284
- },
- "duration":253,
- "timewindows":[
- [
- 27000,
- 39600
- ]
- ]
- },
- {
- "id":"28037",
- "location":{
- "lat":40.4363341,
- "lng":-3.620528
- },
- "duration":382,
- "timewindows":[
- [
- 26100,
- 29700
- ]
- ]
- }
- ],
- "missing":[
- "000005",
- "000007"
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement