Changeset 8053 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Interpreters/CVRPInterpreter.cs
- Timestamp:
- 06/19/12 13:17:29 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Interpreters/CVRPInterpreter.cs
r7881 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 22 using HeuristicLab.Data; 26 23 using HeuristicLab.Problems.Instances; 27 using HeuristicLab.Problems.VehicleRouting. Interfaces;24 using HeuristicLab.Problems.VehicleRouting.Encodings.Potvin; 28 25 using HeuristicLab.Problems.VehicleRouting.ProblemInstances; 29 using HeuristicLab.Data;30 using HeuristicLab.Problems.VehicleRouting.Encodings.Potvin;31 26 32 27 namespace HeuristicLab.Problems.VehicleRouting.Interpreters { 33 public class CVRPInterpreter : IVRPDataInterpreter<CVRPData> {28 public class CVRPInterpreter : IVRPDataInterpreter<CVRPData> { 34 29 public VRPInstanceDescription Interpret(IVRPData data) { 35 30 CVRPData cvrpData = data as CVRPData; … … 40 35 41 36 CVRPProblemInstance problem = new CVRPProblemInstance(); 42 if (cvrpData.Coordinates != null)37 if (cvrpData.Coordinates != null) 43 38 problem.Coordinates = new DoubleMatrix(cvrpData.Coordinates); 44 39 if (cvrpData.MaximumVehicles != null) … … 58 53 PotvinEncoding solution = new PotvinEncoding(problem); 59 54 60 for (int i = 0; i < cvrpData.BestKnownTour.GetLength(0); i++) {55 for (int i = 0; i < cvrpData.BestKnownTour.GetLength(0); i++) { 61 56 Tour tour = new Tour(); 62 57 solution.Tours.Add(tour); … … 66 61 } 67 62 } 68 63 69 64 result.BestKnownSolution = solution; 70 65 }
Note: See TracChangeset
for help on using the changeset viewer.