Opened 11 years ago
Closed 11 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)
Change History (8)
Changed 11 years ago by ascheibe
comment:1 Changed 11 years ago by ascheibe
- Status changed from new to assigned
comment:2 Changed 11 years ago by pfleck
comment:3 Changed 11 years ago by pfleck
- 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 11 years ago by pfleck
- Status changed from assigned to accepted
comment:5 Changed 11 years ago by pfleck
- Owner changed from pfleck to abeham
- Status changed from accepted to reviewing
comment:6 Changed 11 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 11 years ago by abeham
- Resolution set to done
- Status changed from readytorelease to closed
Note: See
TracTickets for help on using
tickets.
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.