Mapotempo/optimizer-api

Strange results

Closed this issue · 1 comments

bgnq commented

Hello,

My test :
JSON

Vehicule Time :
Day 1 : 7H - 24H => 7 * 3600 : 25200
Day 2 : 24H - 48H
Day 3 : 48H - 72H
Day 4 : 72H - 96H
Day 5 : 96H - 120H
Day 6 : 120H - 139H => 139 * 3600 : 500400

 "timewindow":{  
               "start":25200,
               "end":500400
            }

Break :
Day 1 : 19H - 31H
Day 2 : 43H - 55H
Day 3 : 67H - 75H
Day 4 : 91H - 103H
Day 5 : 115H - 126H

"rests":[  
         {  
            "duration":43200,
            "id":"break-0",
            "timewindows":[  
               {  
                  "start":68400,
                  "end":68900
               }
            ]
         },
         {  
            "duration":43200,
            "id":"break-1",
            "timewindows":[  
               {  
                  "start":154800,
                  "end":155300
               }
            ]
         },
         {  
            "duration":43200,
            "id":"break-2",
            "timewindows":[  
               {  
                  "start":241200,
                  "end":241700
               }
            ]
         },
         {  
            "duration":43200,
            "id":"break-3",
            "timewindows":[  
               {  
                  "start":327600,
                  "end":328100
               }
            ]
         },
         {  
            "duration":43200,
            "id":"break-4",
            "timewindows":[  
               {  
                  "start":414000,
                  "end":414500
               }
            ]
         }
      ]

Services :
Day 1 : 9H - 17H
Day 2 : 33H - 41H
Day 3 : 57H - 65H
Day 4 : 81H - 89H
Day 5 : 105H - 113H
Day 6 : 129H - 137H

{  
            "id":"service31",
            "type":"service",
            "activity":{  
               "point_id":"point_31",
               "timewindows":[  
                  {  
                     "start":32400,
                     "end":57600
                  },
                  {  
                     "start":118800,
                     "end":147600
                  },
                  {  
                     "start":205200,
                     "end":234000
                  },
                  {  
                     "start":291600,
                     "end":320400
                  },
                  {  
                     "start":378000,
                     "end":406800
                  },
                  {  
                     "start":464400,
                     "end":493200
                  }
               ],
               "duration":3600
            }
         },

The solution is complete but very strange :

screen shot 2018-08-17 at 11 05 30
(the white point is unassign)
screen shot 2018-08-17 at 11 21 48

  • over the last two days there is no result
  • the first day start at 11H (blue road) yet there is another point beside (18, 19, 20)
  • order make service is strange

Can you help me please ?

Thank

My thought is that we have reduced too much the breaks timewindows.

From our OR-tools model, the travel duration have to be performed before the rests begins.
By adding 1 hour to each rests timewindows ends, I reduce the number of unassigned services.