Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/11/12 10:54:36 (12 years ago)
Author:
abeham
Message:

#1614

  • Investigation in different solution creator that result in feasible solutions even for 95% fill level instances
  • Added option for all solution creators to produce the least infeasible solution if no feasible solution could be found
  • Added maximum tries parameter to all creators
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Evaluators/GQAPEvaluator.cs

    r7419 r7593  
    132132        slack[assignment[i]] -= demands[i];
    133133      }
    134       overbookedCapacity = slack.Select((v, i) => new { V = v, Index = i }).Where(x => x.V < 0.0).Select(x => -x.V / capacities[x.Index]).Sum();
     134      overbookedCapacity = EvaluateOverbooking(slack, capacities);
     135    }
     136
     137    public static double EvaluateOverbooking(DoubleArray slack, DoubleArray capacities) {
     138      return slack.Select((v, i) => new { V = v, Index = i }).Where(x => x.V < 0.0).Select(x => -x.V / capacities[x.Index]).Sum();
    135139    }
    136140
Note: See TracChangeset for help on using the changeset viewer.