- Timestamp:
- 08/26/14 09:24:02 (10 years ago)
- Location:
- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.Orienteering/3.3
- Files:
-
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.Orienteering/3.3/SchildeInstanceProvider.cs
r11298 r11299 30 30 31 31 namespace HeuristicLab.Problems.Instances.Orienteering { 32 public class Schilde OPInstanceProvider : ProblemInstanceProvider<OPData> {32 public class SchildeInstanceProvider : ProblemInstanceProvider<OPData> { 33 33 public override string Name { 34 get { return "Schilde OP instances"; }34 get { return "Schilde (OP)"; } 35 35 } 36 36 public override string Description { … … 44 44 } 45 45 46 private const string FileName = "Schilde OP";46 private const string FileName = "Schilde"; 47 47 48 48 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { … … 59 59 var descriptor = (OPDataDescriptor)id; 60 60 var instanceArchiveName = GetResourceName(FileName + @"\.zip"); 61 var parser = new Schilde OPParser();61 var parser = new SchildeParser(); 62 62 using (var instancesZipFile = new ZipFile(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) { 63 63 var entry = instancesZipFile.GetEntry(descriptor.InstanceIdentifier); … … 78 78 } 79 79 public override OPData ImportData(string path) { 80 var parser = new Schilde OPParser();80 var parser = new SchildeParser(); 81 81 parser.Parse(path); 82 82 var instance = LoadInstance(parser); … … 88 88 } 89 89 90 private OPData LoadInstance(Schilde OPParser parser) {90 private OPData LoadInstance(SchildeParser parser) { 91 91 return new OPData { 92 92 Dimension = parser.Coordinates.GetLength(0), 93 93 Coordinates = parser.Coordinates, 94 94 Distances = parser.Distances, 95 DistanceMeasure = parser.Distances != null ? DistanceMeasure.Direct : DistanceMeasure.Euclidean, 95 96 MaximumDistance = parser.UpperBoundConstraint, 96 97 StartingPoint = parser.StartingPoint, -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.Orienteering/3.3/SchildeParser.cs
r11298 r11299 27 27 28 28 namespace HeuristicLab.Problems.Instances.Orienteering { 29 public class Schilde OPParser {29 public class SchildeParser { 30 30 private static readonly IFormatProvider FormatProvider = new CultureInfo("en-US"); 31 31
Note: See TracChangeset
for help on using the changeset viewer.