- Timestamp:
- 02/02/18 16:31:42 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1614_GeneralizedQAP/BenchmarkDataGenerator/Program.cs
r15578 r15713 92 92 gqapCapacities[i] = (int)Math.Round(gqapCapacities[i] / total * totalCap); 93 93 } 94 var maxCap = gqapCapacities.Max(); 94 95 // locations should be able to accomodate at least one equipment 95 96 // and one location should not be able to accomodate all equipments 96 if (gqapCapacities.All(x => x >= minDemand && x < totalDemand)) break; 97 else Console.WriteLine("{0}-{1}-{2}: Another try", qap.Name, k, fac); 97 // equipments must all fit at least into the biggest location 98 // note: this should lead to mostly feasible instances, but is not a guarantee 99 if (gqapCapacities.All(x => x >= minDemand && x < totalDemand) 100 && gqapDemands.All(x => x <= maxCap)) { 101 break; 102 } else Console.WriteLine("{0}-{1}-{2}: Another try", qap.Name, k, fac); 98 103 } 99 104 var fname = qap.Name + "-" + k + "-" + fac;
Note: See TracChangeset
for help on using the changeset viewer.