Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMove.cs

Last change on this file was 17180, checked in by swagner, 5 years ago

#2875: Removed years in copyrights

File size: 3.7 KB
RevLine 
[4370]1#region License Information
2/* HeuristicLab
[17180]3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
[4370]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
[8053]22using HeuristicLab.Common;
[4370]23using HeuristicLab.Core;
[8053]24using HeuristicLab.Optimization;
[16565]25using HEAL.Attic;
[4370]26using HeuristicLab.Problems.VehicleRouting.Encodings.General;
27using HeuristicLab.Problems.VehicleRouting.Interfaces;
28
29namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
[4383]30  [Item("AlbaLambdaInterchangeMove", "Item that describes a lambda move on a VRP representation.  It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")]
[16565]31  [StorableType("81F387D5-917B-45FB-842A-2DD305B8E313")]
[8053]32  public class AlbaLambdaInterchangeMove : Item, IVRPMove {
[4370]33    [Storable]
34    public IVRPEncoding Individual { get; protected set; }
[8053]35
[4370]36    [Storable]
37    public int Tour1 { get; protected set; }
38
39    [Storable]
40    public int Position1 { get; protected set; }
41
42    [Storable]
43    public int Length1 { get; protected set; }
44
45    [Storable]
46    public int Tour2 { get; protected set; }
47
48    [Storable]
49    public int Position2 { get; protected set; }
50
51    [Storable]
52    public int Length2 { get; protected set; }
[8053]53
54    public AlbaLambdaInterchangeMove()
55      : base() {
[4370]56      Tour1 = -1;
57      Position1 = -1;
58      Length1 = -1;
59
60      Tour2 = -1;
61      Position2 = -1;
62      Length2 = -1;
63
64      Individual = null;
65    }
66
[8053]67    public AlbaLambdaInterchangeMove(int tour1, int position1, int length1,
[4370]68      int tour2, int position2, int length2, AlbaEncoding permutation) {
[8053]69      Tour1 = tour1;
70      Position1 = position1;
71      Length1 = length1;
[4370]72
[8053]73      Tour2 = tour2;
74      Position2 = position2;
75      Length2 = length2;
[4370]76
[8053]77      this.Individual = permutation.Clone() as AlbaEncoding;
[4370]78    }
79
[7906]80    [StorableConstructor]
[16565]81    protected AlbaLambdaInterchangeMove(StorableConstructorFlag _) : base(_) { }
[7906]82
[4752]83    public override IDeepCloneable Clone(Cloner cloner) {
84      return new AlbaLambdaInterchangeMove(this, cloner);
85    }
[4370]86
[4752]87    protected AlbaLambdaInterchangeMove(AlbaLambdaInterchangeMove original, Cloner cloner)
88      : base(original, cloner) {
89      this.Tour1 = original.Tour1;
90      this.Position1 = original.Position1;
91      this.Length1 = original.Length1;
[4370]92
[4752]93      this.Tour2 = original.Tour2;
94      this.Position2 = original.Position2;
95      this.Length2 = original.Length2;
[4370]96
[4752]97      this.Individual = cloner.Clone(Individual) as AlbaEncoding;
[4370]98    }
99
100    #region IVRPMove Members
101
102    public VRPMoveEvaluator GetMoveEvaluator() {
103      return new AlbaLambdaInterchangeMoveEvaluator();
104    }
105
106    public VRPMoveMaker GetMoveMaker() {
107      return new AlbaLambdaInterchangeMoveMaker();
108    }
109
[6772]110    public ITabuMaker GetTabuMaker() {
111      return null;
112    }
113
114    public ITabuChecker GetTabuChecker() {
115      return null;
116    }
117
118    public ITabuChecker GetSoftTabuChecker() {
119      return null;
120    }
121
[4370]122    #endregion
123  }
124}
Note: See TracBrowser for help on using the repository browser.