Changeset 7833 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/SolutionCreators/GreedyRandomizedSolutionCreator.cs
- Timestamp:
- 05/16/12 00:49:26 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/SolutionCreators/GreedyRandomizedSolutionCreator.cs
r7813 r7833 107 107 } else if (createMostFeasibleSolution) { 108 108 // complete the solution and remember the one with least violation 109 foreach (var l in L.ToArray()) { 110 CL.Add(l); 111 L.Remove(l); 112 } 109 113 while (F.Any()) { 110 114 var f = F.MaxItems(x => demands[x]).SampleRandom(random); 111 var l = L.MaxItems(x => slack[x]).SampleRandom(random);115 var l = CL.MaxItems(x => slack[x]).SampleRandom(random); 112 116 F.Remove(f); 113 117 assignment.Add(f, l);
Note: See TracChangeset
for help on using the changeset viewer.