Changeset 7880 for trunk/sources/HeuristicLab.Problems.Instances
- Timestamp:
- 05/23/12 17:28:09 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.Instances/3.3
- Files:
-
- 5 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances/3.3/HeuristicLab.Problems.Instances-3.3.csproj
r7872 r7880 118 118 <Compile Include="IDataDescriptor.cs" /> 119 119 <Compile Include="Types\DistanceHelper.cs" /> 120 <Compile Include="Types\VRP\MDCVRPTWData.cs" /> 121 <Compile Include="Types\VRP\MDCVRPData.cs" /> 122 <Compile Include="Types\VRP\PDPTWData.cs" /> 123 <Compile Include="Types\VRP\CVRPTWData.cs" /> 124 <Compile Include="Types\VRP\VRPData.cs" /> 120 125 <Compile Include="Types\VRP\CVRPData.cs" /> 121 126 <Compile Include="Types\GQAPData.cs" /> -
trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/VRP/CVRPData.cs
r7872 r7880 25 25 /// Describes instances of the Capacitated Vehicle Routing Problem (CVRP). 26 26 /// </summary> 27 public class CVRPData: IVRPData { 28 /// <summary> 29 /// The name of the instance 30 /// </summary> 31 public string Name { get; set; } 32 /// <summary> 33 /// Optional! The description of the instance 34 /// </summary> 35 public string Description { get; set; } 36 37 /// <summary> 38 /// The number of customers and the depot 39 /// </summary> 40 public int Dimension { get; set; } 41 /// <summary> 42 /// The distance measure that is used to calculate the distance between 43 ///the coordinates if no <see cref="Distances"/> is given. 44 /// </summary> 45 public DistanceMeasure DistanceMeasure { get; set; } 46 /// <summary> 47 /// Optional! The maximum number of vehicles that can be used. 48 /// </summary> 49 /// <remarks> 50 /// If no number is given, but a maximum is required, it can be assumed that 51 /// the maximum number of vehicles is equal to the number of customers as 52 /// there cannot be more than one vehicle per customer. 53 /// </remarks> 54 public double? MaximumVehicles { get; set; } 27 public class CVRPData: VRPData { 55 28 /// <summary> 56 29 /// The capacity of the vehicles, which is the same for all (homogeneous fleet). 57 30 /// </summary> 58 31 public double Capacity { get; set; } 59 /// <summary>60 /// Optional! The distances are given in form of a distance matrix.61 /// </summary>62 /// <remarks>63 /// Either Distances or the <see cref="Coordinates"/> need to be specified along64 /// with a distance measure.65 /// </remarks>66 public double[,] Distances { get; set; }67 /// <summary>68 /// Optional! A a matrix of dimension [N, 2] where each row is either the customer69 /// or the depot and the columns represent x and y coordinates respectively.70 /// </summary>71 /// <remarks>72 /// Either <see cref="Distances"/> or the Coordinates need to be specified along73 /// with a distance measure.74 /// </remarks>75 public double[,] Coordinates { get; set; }76 /// <summary>77 /// The demand vector that specifies how many goods need to be delivered.78 /// The vector has to include the depot, but with a demand of 0.79 /// </summary>80 public double[] Demands { get; set; }81 82 /// <summary>83 /// Optional! The best-known solution as a list of tours in path-encoding.84 /// </summary>85 public int[][] BestKnownTour { get; set; }86 /// <summary>87 /// Optional! The quality of the best-known solution.88 /// </summary>89 public double? BestKnownQuality { get; set; }90 91 /// <summary>92 /// If only the coordinates are given, can calculate the distance matrix.93 /// </summary>94 /// <returns>A full distance matrix between all cities.</returns>95 public double[,] GetDistanceMatrix() {96 return DistanceHelper.GetDistanceMatrix(DistanceMeasure, Coordinates, Distances, Dimension);97 }98 32 } 99 33 } -
trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/VRP/IVRPData.cs
r7872 r7880 27 27 namespace HeuristicLab.Problems.Instances { 28 28 /// <summary> 29 /// Marker interface for VRP data29 /// Interface for VRP data 30 30 /// </summary> 31 31 public interface IVRPData { 32 string Name { get; set; } 33 string Description { get; set; } 34 int Dimension { get; set; } 35 double? BestKnownQuality { get; set; } 36 int[][] BestKnownTour { get; set; } 32 37 } 33 38 }
Note: See TracChangeset
for help on using the changeset viewer.