Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/20/17 23:35:23 (6 years ago)
Author:
abeham
Message:

#1614: finished checking the implementation against the paper

File:
1 edited

Legend:

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

    r15504 r15555  
    6565      int counter = 0;
    6666      double minViolation = double.MaxValue;
    67       var slack = new DoubleArray(capacities.Length);
    68       var assignment = new IntegerVector(demands.Length);
     67      var slack = new double[capacities.Length];
     68      var assignment = new int[demands.Length];
    6969
    7070      while (!isFeasible) {
     
    8686        isFeasible = violation == 0;
    8787        if (isFeasible || violation < minViolation) {
    88           result = (IntegerVector)assignment.Clone();
     88          result = new IntegerVector(assignment);
    8989          minViolation = violation;
    9090        }
     
    100100    }
    101101
    102     private static IEnumerable<int> GetFreeLocations(int equipment, DoubleArray demands, DoubleArray freeCapacities) {
     102    private static IEnumerable<int> GetFreeLocations(int equipment, DoubleArray demands, double[] freeCapacities) {
    103103      var freeLocations = freeCapacities
    104104        .Select((v, idx) => new KeyValuePair<int, double>(idx, v))
Note: See TracChangeset for help on using the changeset viewer.