Changeset 9596 for branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Instances/BPPORLIBParser.cs
- Timestamp:
- 06/07/13 01:20:12 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Instances/BPPORLIBParser.cs
r9348 r9596 90 90 91 91 for (int k = 0; k < Items; k++) { 92 if (reader.EndOfStream) throw new InvalidDataException("Unexpected End of Stream .");92 if (reader.EndOfStream) throw new InvalidDataException("Unexpected End of Stream (at line " + k + ")."); 93 93 var valLine = reader.ReadLine(); 94 94 while (String.IsNullOrWhiteSpace(valLine)) valLine = reader.ReadLine(); … … 101 101 } 102 102 103 int problemClassNr = int.Parse(problemClass[0]); 104 Name = (isThreeDimensional ? "3" : "2") + "dbpp_class_0" + problemClassNr; 105 if (!isThreeDimensional) { 106 if (problemClassNr >= 1 && problemClassNr <= 5) 107 Description = "Proposed by Berkey and Wang."; 108 else if (problemClassNr >= 6 && problemClassNr <= 10) 109 Description = "Proposed by Martello and Vigo."; 103 Int32 problemClassNr = -1; 104 if (int.TryParse(problemClass[0], out problemClassNr)) { 105 Name = (isThreeDimensional ? "3" : "2") + "dbpp_class_0" + problemClassNr; 106 if (!isThreeDimensional) { 107 if (problemClassNr >= 1 && problemClassNr <= 5) 108 Description = "Proposed by Berkey and Wang."; 109 else if (problemClassNr >= 6 && problemClassNr <= 10) 110 Description = "Proposed by Martello and Vigo."; 111 } else { 112 if (problemClassNr >= 1 && problemClassNr <= 5) 113 Description = "Proposed by Martello and Vigo."; 114 else if (problemClassNr >= 6 && problemClassNr <= 9) 115 Description = "Proposed by Berkey and Wang."; 116 } 110 117 } else { 111 if (problemClassNr >= 1 && problemClassNr <= 5) 112 Description = "Proposed by Martello and Vigo."; 113 else if (problemClassNr >= 6 && problemClassNr <= 9) 114 Description = "Proposed by Berkey and Wang."; 118 Name = "Unknown"; 119 Description = "<Missing>"; 115 120 } 116 121
Note: See TracChangeset
for help on using the changeset viewer.