Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/01/12 13:28:54 (12 years ago)
Author:
abeham
Message:

#1614

  • Add BestKnownSolutions parameter
  • Assignment view
    • Clicking on an equipment highlights all related equipments
    • Clicking on a location highlights other locations that contain equipment to which relations exist
    • Showing installation costs when nothing is selected
  • Analyzers were present double times
  • Fixed GRASP to check EnabledByDefault
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/GQAPSolutionArchiveAnalyzer.cs

    r7437 r7438  
    2020#endregion
    2121
     22using System.Linq;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    163164      }
    164165
    165       ItemList<GQAPSolution> front = new ItemList<GQAPSolution>(archive.Solutions);
    166       for (int i = 0; i < assignments.Length; i++) {
    167         if (overbookedCapacities[i].Value <= 0.0)
    168           front.Add(new GQAPSolution(assignments[i], qualities[i], flowDistanceQualities[i], installationQualities[i], overbookedCapacities[i]));
    169       }
    170 
    171       for (int i = 0; i < front.Count - 1; i++) {
    172         for (int j = i + 1; j < front.Count; j++) {
    173           if (front[i].FlowDistanceQuality.Value < front[j].FlowDistanceQuality.Value
    174             && front[i].InstallationQuality.Value < front[j].InstallationQuality.Value) {
    175             front.RemoveAt(j);
    176             j--;
    177           } else if (front[i].FlowDistanceQuality.Value > front[j].FlowDistanceQuality.Value
    178             && front[i].InstallationQuality.Value > front[j].InstallationQuality.Value) {
    179             front.RemoveAt(i);
    180             j = i;
    181           }
    182         }
    183       }
    184 
    185       archive.Solutions = front;
     166      var solutions = Enumerable.Range(0, assignments.Length)
     167        .Select(i => new GQAPSolution(assignments[i], qualities[i], flowDistanceQualities[i], installationQualities[i], overbookedCapacities[i]))
     168        .Concat(archive.Solutions);
     169      archive.Solutions = GQAPSolutionArchiveUpdater.GetFeasibleParetoFront(solutions);
    186170
    187171      return base.Apply();
Note: See TracChangeset for help on using the changeset viewer.