Changeset 7593 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Evaluators
- Timestamp:
- 03/11/12 10:54:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Evaluators/GQAPEvaluator.cs
r7419 r7593 132 132 slack[assignment[i]] -= demands[i]; 133 133 } 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(); 135 139 } 136 140
Note: See TracChangeset
for help on using the changeset viewer.