Free cookie consent management tool by TermsFeed Policy Generator

source: branches/GeneralizedQAP/HeuristicLab.Problems.Instances/3.3/Types/CVRPData.cs @ 7548

Last change on this file since 7548 was 7548, checked in by abeham, 12 years ago

#1614: changed according to architects review

File size: 3.6 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22
23namespace HeuristicLab.Problems.Instances {
24  public enum CVRPDistanceMeasure { Direct, Euclidean, RoundedEuclidean, UpperEuclidean, Geo, Manhattan, Maximum, Att };
25
26  /// <summary>
27  /// Describes instances of the Capacitated Vehicle Routing Problem (CVRP).
28  /// </summary>
29  public class CVRPData {
30    /// <summary>
31    /// The name of the instance
32    /// </summary>
33    public string Name { get; set; }
34    /// <summary>
35    /// Optional! The description of the instance
36    /// </summary>
37    public string Description { get; set; }
38
39    /// <summary>
40    /// The number of customers and the depot
41    /// </summary>
42    public int Dimension { get; set; }
43    /// <summary>
44    /// The distance measure that is used to calculate the distance between
45    ///the coordinates if no <see cref="Distances"/> is given.
46    /// </summary>
47    public CVRPDistanceMeasure DistanceMeasure { get; set; }
48    /// <summary>
49    /// Optional! The maximum number of vehicles that can be used.
50    /// </summary>
51    /// <remarks>
52    /// If no number is given, but a maximum is required, it can be assumed that
53    /// the maximum number of vehicles is equal to the number of customers as
54    /// there cannot be more than one vehicle per customer.
55    /// </remarks>
56    public double? MaximumVehicles { get; set; }
57    /// <summary>
58    /// The capacity of the vehicles, which is the same for all (homogeneous fleet).
59    /// </summary>
60    public double Capacity { get; set; }
61    /// <summary>
62    /// Optional! The distances are given in form of a distance matrix.
63    /// </summary>
64    /// <remarks>
65    /// Either Distances or the <see cref="Coordinates"/> need to be specified along
66    /// with a distance measure.
67    /// </remarks>
68    public double[,] Distances { get; set; }
69    /// <summary>
70    /// Optional! A a matrix of dimension [N, 2] where each row is either the customer
71    /// or the depot and the columns represent x and y coordinates respectively.
72    /// </summary>
73    /// <remarks>
74    /// Either <see cref="Distances"/> or the Coordinates need to be specified along
75    /// with a distance measure.
76    /// </remarks>
77    public double[,] Coordinates { get; set; }
78    /// <summary>
79    /// The demand vector that specifies how many goods need to be delivered.
80    /// The vector has to include the depot, but with a demand of 0.
81    /// </summary>
82    public double[] Demands { get; set; }
83
84    /// <summary>
85    /// Optional! The best-known solution as a list of tours in path-encoding.
86    /// </summary>
87    public int[][] BestKnownTour { get; set; }
88    /// <summary>
89    /// Optional! The quality of the best-known solution.
90    /// </summary>
91    public double? BestKnownQuality { get; set; }
92  }
93}
Note: See TracBrowser for help on using the repository browser.