Changeset 15572 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Manipulators
- Timestamp:
- 01/03/18 00:28:51 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Manipulators/RelocateEquipmentManipluator.cs
r15564 r15572 51 51 foreach (var equipment in equipments) { 52 52 var oldLoc = assignment[equipment]; 53 var newLoc =random.Next(locations - 1); 54 if (newLoc >= oldLoc) newLoc++; // don't reassign to current loc 55 assignment[equipment] = newLoc; 53 assignment[equipment] = (oldLoc + random.Next(1, locations)) % locations; 56 54 if (random.NextDouble() < stopProb) break; 57 55 }
Note: See TracChangeset
for help on using the changeset viewer.