Opened 3 years ago

Closed 3 years ago

#2182 closed defect (done)

KeyNotFoundException in PushForwardInsertionCreator

Reported by: ascheibe Owned by: abeham
Priority: high Milestone: HeuristicLab 3.3.10
Component: Problems.VehicleRouting Version: 3.3.9
Keywords: Cc:

Description

Run the enclosed HL file for reproducing the error. It seems that GetNearestDepot(..) may return -1 which is stored as a value in the depotAssignment and is not checked later on which leads to this problem.

Attachments (1)

Push Forward Error.hl (393.7 KB) - added by ascheibe 3 years ago.

Download all attachments as: .zip

Change History (8)

Changed 3 years ago by ascheibe

comment:1 Changed 3 years ago by ascheibe

  • Status changed from new to assigned

comment:2 Changed 3 years ago by pfleck

The PushForwardInsertionCreator has problems when two or more customers have the same coordinates (the distance between them would be zero).

With a zero-length distance, no costs can be calculated for the tour and no nearest depot can be found, which lead to the exception.

We could check if the distance is zero and calculate the costs differently, but I think a scenario with two customers/depots on the same coordinates is rather unusual.

comment:3 Changed 3 years ago by pfleck

r10858

  • Implemented a more stable version for calculating the polar angle between two coordinates that allows calculating the angle between two locations with the same coordinates.
  • Fixed a radiant/grad bug.

comment:4 Changed 3 years ago by pfleck

  • Status changed from assigned to accepted

comment:5 Changed 3 years ago by pfleck

  • Owner changed from pfleck to abeham
  • Status changed from accepted to reviewing

comment:6 Changed 3 years ago by abeham

  • Status changed from reviewing to readytorelease

It is to note that the change affects the reproducibility of experiments. Nevertheless, I vote against upgrading the plugin version to 3.5. After all it's a bug fix and the change should not be that grave.

comment:7 Changed 3 years ago by abeham

  • Resolution set to done
  • Status changed from readytorelease to closed

r10928: merged r10858 to stable

Note: See TracTickets for help on using tickets.