Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCreator.cs @ 4150

Last change on this file since 4150 was 4068, checked in by swagner, 14 years ago

Sorted usings and removed unused usings in entire solution (#1094)

File size: 4.1 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2010 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
22using HeuristicLab.Core;
23using HeuristicLab.Data;
24using HeuristicLab.Operators;
25using HeuristicLab.Parameters;
26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
27
28namespace HeuristicLab.Problems.VehicleRouting {
29  [StorableClass]
30  public abstract class VRPCreator : SingleSuccessorOperator, IVRPCreator {
31    public override bool CanChangeName {
32      get { return false; }
33    }
34
35    #region IVRPCreator Members
36    public IValueLookupParameter<IntValue> CitiesParameter {
37      get { return (IValueLookupParameter<IntValue>)Parameters["Cities"]; }
38    }
39    public ILookupParameter<IVRPEncoding> VRPSolutionParameter {
40      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPSolution"]; }
41    }
42    public ILookupParameter<DoubleMatrix> CoordinatesParameter {
43      get { return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
44    }
45    public ILookupParameter<DoubleMatrix> DistanceMatrixParameter {
46      get { return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
47    }
48    public ILookupParameter<BoolValue> UseDistanceMatrixParameter {
49      get { return (ILookupParameter<BoolValue>)Parameters["UseDistanceMatrix"]; }
50    }
51    public ILookupParameter<IntValue> VehiclesParameter {
52      get { return (ILookupParameter<IntValue>)Parameters["Vehicles"]; }
53    }
54    public ILookupParameter<DoubleValue> CapacityParameter {
55      get { return (ILookupParameter<DoubleValue>)Parameters["Capacity"]; }
56    }
57    public ILookupParameter<DoubleArray> DemandParameter {
58      get { return (ILookupParameter<DoubleArray>)Parameters["Demand"]; }
59    }
60    public ILookupParameter<DoubleArray> ReadyTimeParameter {
61      get { return (ILookupParameter<DoubleArray>)Parameters["ReadyTime"]; }
62    }
63    public ILookupParameter<DoubleArray> DueTimeParameter {
64      get { return (ILookupParameter<DoubleArray>)Parameters["DueTime"]; }
65    }
66    public ILookupParameter<DoubleArray> ServiceTimeParameter {
67      get { return (ILookupParameter<DoubleArray>)Parameters["ServiceTime"]; }
68    }
69
70    public VRPCreator()
71      : base() {
72      Parameters.Add(new ValueLookupParameter<IntValue>("Cities", "The city count."));
73      Parameters.Add(new LookupParameter<IntValue>("Vehicles", "The vehicles count."));
74      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The coordinates of the cities."));
75      Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
76      Parameters.Add(new LookupParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated and used for evaluation, otherwise false."));
77      Parameters.Add(new LookupParameter<DoubleValue>("Capacity", "The capacity of each vehicle."));
78      Parameters.Add(new LookupParameter<DoubleArray>("Demand", "The demand of each customer."));
79      Parameters.Add(new LookupParameter<DoubleArray>("ReadyTime", "The ready time of each customer."));
80      Parameters.Add(new LookupParameter<DoubleArray>("DueTime", "The due time of each customer."));
81      Parameters.Add(new LookupParameter<DoubleArray>("ServiceTime", "The service time of each customer."));
82
83      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPSolution", "The new VRP solution."));
84    }
85
86    #endregion
87  }
88}
Note: See TracBrowser for help on using the repository browser.