Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/30/11 15:40:40 (13 years ago)
Author:
abeham
Message:

#1497

  • Added problem-specific local improvement operator (best improvement local search using swap2 moves)
    • Adapted ExhaustiveSwap2MoveGenerator to yield moves
  • Added a parameter BestKnownSolutions to collect possible optimal invariants
    • Adapted BestQAPSolutionAnalyzer to collect optimal invariants
  • Added a function to the QAP Evaluator that calculates the impact of a certain allele
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/histogram/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPEvaluator.cs

    r5838 r6086  
    6969    }
    7070
     71    public static double Impact(int facility, Permutation assignment, DoubleMatrix weights, DoubleMatrix distances) {
     72      double impact = 0;
     73      for (int i = 0; i < assignment.Length; i++) {
     74        impact += weights[facility, i] * distances[assignment[facility], assignment[i]];
     75        impact += weights[i, facility] * distances[assignment[i], assignment[facility]];
     76      }
     77      return impact;
     78    }
     79
    7180    public override IOperation Apply() {
    7281      Permutation assignment = PermutationParameter.ActualValue;
Note: See TracChangeset for help on using the changeset viewer.