Changeset 16692 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat
- Timestamp:
- 03/18/19 17:24:30 (6 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/HombergerInstanceProvider.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonFormatInstanceProvider.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System; 23 using System. Collections.Generic;23 using System.Globalization; 24 24 using System.IO; 25 25 using System.Linq; … … 64 64 string date = ExtractValue(reader.ReadLine()); 65 65 string reference = ExtractValue(reader.ReadLine()); 66 reader.ReadLine(); // Solution 67 68 var routesQuery = 69 from line in reader.ReadAllLines() 70 where !string.IsNullOrEmpty(line) 71 let tokens = ExtractValue(line).Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) 72 let stops = tokens.Select(int.Parse).Select(s => s - 1) 73 select stops; 74 75 var routes = routesQuery.Select(s => s.ToArray()).ToArray(); 76 77 instance.BestKnownTour = routes; 66 switch (reader.ReadLine().Trim()) { // "Solution" or "Distance" 67 case "Solution": 68 var routesQuery = from line in reader.ReadAllLines() 69 where !string.IsNullOrEmpty(line) 70 let tokens = ExtractValue(line).Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) 71 let stops = tokens.Select(int.Parse).Select(s => s - 1) 72 select stops; 73 var routes = routesQuery.Select(s => s.ToArray()).ToArray(); 74 instance.BestKnownTour = routes; 75 break; 76 case "Distance": 77 double quality = double.Parse(reader.ReadLine(), CultureInfo.InvariantCulture); 78 instance.BestKnownQuality = quality; 79 break; 80 } 78 81 } 79 82 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonInstanceProvider.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonParser.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 143 143 144 144 vehicles = int.Parse(m[0].Value); 145 capacity = double.Parse(m[1].Value );145 capacity = double.Parse(m[1].Value, System.Globalization.CultureInfo.InvariantCulture); 146 146 147 147 for (int i = 0; i < 4; i++) {
Note: See TracChangeset
for help on using the changeset viewer.