Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/16/12 00:49:26 (12 years ago)
Author:
abeham
Message:

#1614

  • made GRASP+PR an IStorableContent
  • fixed bug in GreedyRandomizedSolutionCreator
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/SolutionCreators/GreedyRandomizedSolutionCreator.cs

    r7813 r7833  
    107107        } else if (createMostFeasibleSolution) {
    108108          // 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          }
    109113          while (F.Any()) {
    110114            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);
    112116            F.Remove(f);
    113117            assignment.Add(f, l);
Note: See TracChangeset for help on using the changeset viewer.