Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/19/12 13:17:29 (12 years ago)
Author:
ascheibe
Message:

#1722 fixed more licensing information and source formatting

Location:
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/AlbaMoveEvaluator.cs

    r4752 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using HeuristicLab.Problems.VehicleRouting.Encodings.General;
     22using HeuristicLab.Common;
    2723using HeuristicLab.Core;
    2824using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    29 using HeuristicLab.Common;
     25using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    3026
    3127namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    3228  [Item("AlbaMoveEvaluator", "Evaluates an Alba VRP move.")]
    3329  [StorableClass]
    34   public abstract class AlbaMoveEvaluator: VRPMoveEvaluator, IAlbaOperator {
    35        [StorableConstructor]
     30  public abstract class AlbaMoveEvaluator : VRPMoveEvaluator, IAlbaOperator {
     31    [StorableConstructor]
    3632    protected AlbaMoveEvaluator(bool deserializing) : base(deserializing) { }
    3733
    38        public AlbaMoveEvaluator()
     34    public AlbaMoveEvaluator()
    3935      : base() {
    4036    }
    4137
    42        protected AlbaMoveEvaluator(AlbaMoveEvaluator original, Cloner cloner)
    43          : base(original, cloner) {
    44        }
     38    protected AlbaMoveEvaluator(AlbaMoveEvaluator original, Cloner cloner)
     39      : base(original, cloner) {
     40    }
    4541  }
    4642}
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/AlbaMoveGenerator.cs

    r4752 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using HeuristicLab.Problems.VehicleRouting.Encodings.General;
     22using HeuristicLab.Common;
    2723using HeuristicLab.Core;
    2824using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2926using HeuristicLab.Problems.VehicleRouting.Interfaces;
    30 using HeuristicLab.Common;
    3127
    3228namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    3329  [Item("AlbaMoveGenerator", "Generates Alba VRP moves.")]
    3430  [StorableClass]
    35   public abstract class AlbaMoveGenerator : VRPMoveGenerator, IAlbaOperator {   
     31  public abstract class AlbaMoveGenerator : VRPMoveGenerator, IAlbaOperator {
    3632    [StorableConstructor]
    3733    protected AlbaMoveGenerator(bool deserializing) : base(deserializing) { }
     
    5046        VRPToursParameter.ActualValue = AlbaEncoding.ConvertFrom(solution, ProblemInstance);
    5147      }
    52      
     48
    5349      return base.Apply();
    5450    }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/AlbaMoveMaker.cs

    r4752 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using HeuristicLab.Problems.VehicleRouting.Encodings.General;
     22using HeuristicLab.Common;
    2723using HeuristicLab.Core;
    2824using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    29 using HeuristicLab.Problems.VehicleRouting.Interfaces;
    30 using HeuristicLab.Common;
     25using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    3126
    3227namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    3328  [Item("AlbaMoveMaker", "Makes an Alba VRP move.")]
    3429  [StorableClass]
    35   public abstract class AlbaMoveMaker : VRPMoveMaker, IAlbaOperator {   
     30  public abstract class AlbaMoveMaker : VRPMoveMaker, IAlbaOperator {
    3631    [StorableConstructor]
    3732    protected AlbaMoveMaker(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaExhaustiveIntraRouteInversionMoveGenerator.cs

    r4752 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System;
     22using System.Collections.Generic;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Optimization;
    2526using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    27 using HeuristicLab.Parameters;
    28 using System.Collections.Generic;
    2927using HeuristicLab.Problems.VehicleRouting.Interfaces;
    30 using HeuristicLab.Common;
    3128
    3229namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5451      int currentTourStart = 0;
    5552      int currentTourEnd = 0;
    56       while(currentTourEnd != individual.Length) {
     53      while (currentTourEnd != individual.Length) {
    5754        currentTourEnd = currentTourStart;
    58         while (individual[currentTourEnd] < problemInstance.Cities.Value && 
     55        while (individual[currentTourEnd] < problemInstance.Cities.Value &&
    5956          currentTourEnd < individual.Length) {
    6057          currentTourEnd++;
     
    6360        int tourLength = currentTourEnd - currentTourStart;
    6461        if (tourLength >= 4) {
    65           for (int i = 0; i <= tourLength - 4; i++ ) {
     62          for (int i = 0; i <= tourLength - 4; i++) {
    6663            for (int j = i + 2; j <= tourLength - 2; j++) {
    6764              AlbaIntraRouteInversionMove move = new AlbaIntraRouteInversionMove(
    68                 currentTourStart + i, 
    69                 currentTourStart + j, 
     65                currentTourStart + i,
     66                currentTourStart + j,
    7067                individual);
    7168
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionEvaluator.cs

    r4752 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
    2424using HeuristicLab.Parameters;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    27 using HeuristicLab.Data;
    28 using HeuristicLab.Common;
    2927
    3028namespace HeuristicLab.Problems.VehicleRouting {
     
    4543    public AlbaIntraRouteInversionMoveEvaluator()
    4644      : base() {
    47         Parameters.Add(new LookupParameter<AlbaIntraRouteInversionMove>("AlbaIntraRouteInversionMove", "The move to evaluate."));
     45      Parameters.Add(new LookupParameter<AlbaIntraRouteInversionMove>("AlbaIntraRouteInversionMove", "The move to evaluate."));
    4846    }
    4947
     
    6159
    6260      UpdateEvaluation(newSolution);
    63     } 
     61    }
    6462  }
    6563}
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMove.cs

    r6772 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
     24using HeuristicLab.Encodings.PermutationEncoding;
     25using HeuristicLab.Optimization;
    2326using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    24 using HeuristicLab.Encodings.PermutationEncoding;
    25 using HeuristicLab.Common;
    2627using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    27 using HeuristicLab.Data;
    2828using HeuristicLab.Problems.VehicleRouting.Interfaces;
    29 using HeuristicLab.Optimization;
    3029
    3130namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5251    public AlbaIntraRouteInversionMove(int index1, int index2, AlbaEncoding permutation)
    5352      : base(index1, index2, null) {
    54         this.Permutation = permutation.Clone() as AlbaEncoding;
    55      }
     53      this.Permutation = permutation.Clone() as AlbaEncoding;
     54    }
    5655
    5756    public override IDeepCloneable Clone(Cloner cloner) {
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveGenerator.cs

    r4752 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System;
     22using HeuristicLab.Common;
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Optimization;
     25using HeuristicLab.Parameters;
    2526using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    27 using HeuristicLab.Parameters;
    28 using System.Collections.Generic;
    2927using HeuristicLab.Problems.VehicleRouting.Interfaces;
    30 using HeuristicLab.Common;
    3128
    3229namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5148    public AlbaIntraRouteInversionMoveGenerator()
    5249      : base() {
    53         Parameters.Add(new LookupParameter<AlbaIntraRouteInversionMove>("AlbaIntraRouteInversionMove", "The moves that should be generated in subscopes."));
    54         Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
     50      Parameters.Add(new LookupParameter<AlbaIntraRouteInversionMove>("AlbaIntraRouteInversionMove", "The moves that should be generated in subscopes."));
     51      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
    5552    }
    5653
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveMaker.cs

    r7906 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    23 using HeuristicLab.Data;
    24 using HeuristicLab.Operators;
    2524using HeuristicLab.Optimization;
    2625using HeuristicLab.Parameters;
    2726using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using HeuristicLab.Common;
    2927
    3028namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionMutliMoveGenerator.cs

    r5867 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System;
     22using HeuristicLab.Common;
    2323using HeuristicLab.Core;
     24using HeuristicLab.Data;
    2425using HeuristicLab.Optimization;
     26using HeuristicLab.Parameters;
    2527using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    27 using HeuristicLab.Parameters;
    28 using System.Collections.Generic;
    29 using HeuristicLab.Data;
     28using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    3029using HeuristicLab.Problems.VehicleRouting.Interfaces;
    31 using HeuristicLab.Common;
    32 using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    3330
    3431namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    4441      get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; }
    4542    }
    46    
     43
    4744    [StorableConstructor]
    4845    private AlbaStochasticIntraRouteInversionMultiMoveGenerator(bool deserializing) : base(deserializing) { }
     
    5047    public AlbaStochasticIntraRouteInversionMultiMoveGenerator()
    5148      : base() {
    52         Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
    53         Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
     49      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     50      Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
    5451    }
    5552
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionSingleMoveGenerator.cs

    r5867 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System;
     22using System.Collections.Generic;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Optimization;
     26using HeuristicLab.Parameters;
    2527using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    27 using HeuristicLab.Parameters;
    28 using System.Collections.Generic;
    29 using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    3028using HeuristicLab.Problems.VehicleRouting.Interfaces;
    31 using HeuristicLab.Common;
    3229
    3330namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    4340
    4441    #endregion
    45    
     42
    4643    public ILookupParameter<IRandom> RandomParameter {
    4744      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    4845    }
    49    
     46
    5047    [StorableConstructor]
    5148    private AlbaStochasticIntraRouteInversionSingleMoveGenerator(bool deserializing) : base(deserializing) { }
     
    5350    public AlbaStochasticIntraRouteInversionSingleMoveGenerator()
    5451      : base() {
    55         Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     52      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
    5653    }
    5754
     
    103100
    104101      AlbaIntraRouteInversionMove move = Apply(individual, problemInstance.Cities.Value, RandomParameter.ActualValue);
    105       if(move != null)
     102      if (move != null)
    106103        moves.Add(move);
    107104
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/IAlbaIntraRouteInversionMoveOperator.cs

    r4370 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
    24 using HeuristicLab.Optimization;
    2523using HeuristicLab.Problems.VehicleRouting.Interfaces;
    2624
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaExhaustiveLambdaInterchangeMoveGenerator.cs

    r4752 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using System;
     23using System.Collections.Generic;
     24using HeuristicLab.Common;
    2325using HeuristicLab.Core;
    2426using HeuristicLab.Optimization;
    2527using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    27 using HeuristicLab.Parameters;
    28 using System.Collections.Generic;
    2928using HeuristicLab.Problems.VehicleRouting.Interfaces;
    30 using HeuristicLab.Common;
    3129
    3230namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    6159          for (int length1 = 0; length1 <= Math.Min(lambda, tour1.Stops.Count); length1++) {
    6260            for (int length2 = 0; length2 <= Math.Min(lambda, tour2.Stops.Count); length2++) {
    63               if(length1 != 0 || length2 != 0) {
     61              if (length1 != 0 || length2 != 0) {
    6462                for (int index1 = 0; index1 < tour1.Stops.Count - length1 + 1; index1++) {
    6563                  for (int index2 = 0; index2 < tour2.Stops.Count - length2 + 1; index2++) {
    66                     moves.Add(new AlbaLambdaInterchangeMove(tour1Index, index1, length1, 
     64                    moves.Add(new AlbaLambdaInterchangeMove(tour1Index, index1, length1,
    6765                      tour2Index, index2, length2, individual));
    6866                  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMove.cs

    r7906 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
     24using HeuristicLab.Optimization;
    2325using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    24 using HeuristicLab.Encodings.PermutationEncoding;
    25 using HeuristicLab.Common;
    26 using System.Collections.Generic;
    2726using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    28 using HeuristicLab.Data;
    2927using HeuristicLab.Problems.VehicleRouting.Interfaces;
    30 using HeuristicLab.Optimization;
    3128
    3229namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    3330  [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.")]
    3431  [StorableClass]
    35   public class AlbaLambdaInterchangeMove: Item, IVRPMove {
     32  public class AlbaLambdaInterchangeMove : Item, IVRPMove {
    3633    [Storable]
    3734    public IVRPEncoding Individual { get; protected set; }
    38    
     35
    3936    [Storable]
    4037    public int Tour1 { get; protected set; }
     
    5451    [Storable]
    5552    public int Length2 { get; protected set; }
    56    
    57     public AlbaLambdaInterchangeMove(): base() {
     53
     54    public AlbaLambdaInterchangeMove()
     55      : base() {
    5856      Tour1 = -1;
    5957      Position1 = -1;
     
    6765    }
    6866
    69     public AlbaLambdaInterchangeMove(int tour1, int position1, int length1, 
     67    public AlbaLambdaInterchangeMove(int tour1, int position1, int length1,
    7068      int tour2, int position2, int length2, AlbaEncoding permutation) {
    71         Tour1 = tour1;
    72         Position1 = position1;
    73         Length1 = length1;
     69      Tour1 = tour1;
     70      Position1 = position1;
     71      Length1 = length1;
    7472
    75         Tour2 = tour2;
    76         Position2 = position2;
    77         Length2 = length2;
     73      Tour2 = tour2;
     74      Position2 = position2;
     75      Length2 = length2;
    7876
    79         this.Individual = permutation.Clone() as AlbaEncoding;
     77      this.Individual = permutation.Clone() as AlbaEncoding;
    8078    }
    8179
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveEvaluator.cs

    r4752 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
    2424using HeuristicLab.Parameters;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    27 using HeuristicLab.Data;
    28 using HeuristicLab.Common;
    2927
    3028namespace HeuristicLab.Problems.VehicleRouting {
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveGenerator.cs

    r4752 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System;
     22using HeuristicLab.Common;
    2323using HeuristicLab.Core;
     24using HeuristicLab.Data;
    2425using HeuristicLab.Optimization;
     26using HeuristicLab.Parameters;
    2527using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    27 using HeuristicLab.Parameters;
    28 using System.Collections.Generic;
    29 using HeuristicLab.Data;
    3028using HeuristicLab.Problems.VehicleRouting.Interfaces;
    31 using HeuristicLab.Common;
    3229
    3330namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    6057    public AlbaLambdaInterchangeMoveGenerator()
    6158      : base() {
    62         Parameters.Add(new LookupParameter<AlbaLambdaInterchangeMove>("AlbaLambdaInterchangeMove", "The moves that should be generated in subscopes."));
    63         Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
    64         Parameters.Add(new ValueParameter<IntValue>("Lambda", "The lambda value.", new IntValue(1)));
     59      Parameters.Add(new LookupParameter<AlbaLambdaInterchangeMove>("AlbaLambdaInterchangeMove", "The moves that should be generated in subscopes."));
     60      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
     61      Parameters.Add(new ValueParameter<IntValue>("Lambda", "The lambda value.", new IntValue(1)));
    6562    }
    6663
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveMaker.cs

    r7906 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    23 using HeuristicLab.Data;
    24 using HeuristicLab.Operators;
    2524using HeuristicLab.Optimization;
    2625using HeuristicLab.Parameters;
    2726using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using System.Collections.Generic;
    29 using HeuristicLab.Common;
    3027
    3128namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeMutliMoveGenerator.cs

    r6751 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System;
     22using HeuristicLab.Common;
    2323using HeuristicLab.Core;
     24using HeuristicLab.Data;
    2425using HeuristicLab.Optimization;
     26using HeuristicLab.Parameters;
    2527using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    27 using HeuristicLab.Parameters;
    28 using System.Collections.Generic;
    29 using HeuristicLab.Data;
     28using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    3029using HeuristicLab.Problems.VehicleRouting.Interfaces;
    31 using HeuristicLab.Common;
    32 using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    3330
    3431namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    4441      get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; }
    4542    }
    46    
     43
    4744    [StorableConstructor]
    4845    private AlbaStochasticLambdaInterchangeMultiMoveGenerator(bool deserializing) : base(deserializing) { }
     
    5047    public AlbaStochasticLambdaInterchangeMultiMoveGenerator()
    5148      : base() {
    52         Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
    53         Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
     49      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     50      Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
    5451    }
    5552
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeSingleMoveGenerator.cs

    r5867 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using System;
     23using System.Collections.Generic;
     24using HeuristicLab.Common;
    2325using HeuristicLab.Core;
    2426using HeuristicLab.Optimization;
     27using HeuristicLab.Parameters;
    2528using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    27 using HeuristicLab.Parameters;
    28 using System.Collections.Generic;
    29 using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    3029using HeuristicLab.Problems.VehicleRouting.Interfaces;
    31 using HeuristicLab.Common;
    3230
    3331namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    4341
    4442    #endregion
    45    
     43
    4644    public ILookupParameter<IRandom> RandomParameter {
    4745      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    4846    }
    49    
     47
    5048    [StorableConstructor]
    5149    private AlbaStochasticLambdaInterchangeSingleMoveGenerator(bool deserializing) : base(deserializing) { }
     
    5351    public AlbaStochasticLambdaInterchangeSingleMoveGenerator()
    5452      : base() {
    55         Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     53      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
    5654    }
    5755
     
    9694
    9795      AlbaLambdaInterchangeMove move = Apply(individual, problemInstance.Cities.Value, lambda, RandomParameter.ActualValue);
    98       if(move != null)
     96      if (move != null)
    9997        moves.Add(move);
    10098
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/IAlbaLambdaInterchangeMoveOperator.cs

    r4370 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
    24 using HeuristicLab.Optimization;
    2523using HeuristicLab.Problems.VehicleRouting.Interfaces;
    2624
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaStochasticTranslocationSingleMoveGenerator.cs

    r5867 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System.Collections.Generic;
     22using HeuristicLab.Common;
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Data;
    2525using HeuristicLab.Encodings.PermutationEncoding;
    26 using HeuristicLab.Optimization;
    27 using HeuristicLab.Parameters;
    2826using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2927using HeuristicLab.Problems.VehicleRouting.Interfaces;
    30 using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    31 using HeuristicLab.Common;
    3228
    3329namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    3733    [Storable]
    3834    private TranslocationMoveGenerator generator = new StochasticTranslocationSingleMoveGenerator();
    39    
     35
    4036    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
    4137      get {
    42          return generator.TranslocationMoveParameter;
     38        return generator.TranslocationMoveParameter;
    4339      }
    4440    }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMove.cs

    r6772 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
     24using HeuristicLab.Encodings.PermutationEncoding;
     25using HeuristicLab.Optimization;
    2326using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    24 using HeuristicLab.Encodings.PermutationEncoding;
    25 using HeuristicLab.Common;
    26 using System.Collections.Generic;
    2727using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    28 using HeuristicLab.Data;
    2928using HeuristicLab.Problems.VehicleRouting.Interfaces;
    30 using HeuristicLab.Optimization;
    3129
    3230namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    3331  [Item("AlbaTranslocationMove", "Item that describes a translocation 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.")]
    3432  [StorableClass]
    35   public class AlbaTranslocationMove: TranslocationMove, IVRPMove {
     33  public class AlbaTranslocationMove : TranslocationMove, IVRPMove {
    3634    public IVRPEncoding Individual { get { return Permutation as AlbaEncoding; } }
    3735
    38     public AlbaTranslocationMove(int index1, int index2, int index3):
     36    public AlbaTranslocationMove(int index1, int index2, int index3) :
    3937      base(index1, index2, index3) {
    4038    }
    4139
    42     public AlbaTranslocationMove(int index1, int index2, int index3, AlbaEncoding individual):
    43       base(index1, index2, index3, individual.Clone() as AlbaEncoding){
     40    public AlbaTranslocationMove(int index1, int index2, int index3, AlbaEncoding individual) :
     41      base(index1, index2, index3, individual.Clone() as AlbaEncoding) {
    4442    }
    4543
     
    5351    protected AlbaTranslocationMove(AlbaTranslocationMove original, Cloner cloner)
    5452      : base(original, cloner) {
    55         this.Index1 = original.Index1;
    56         this.Index2 = original.Index2;
    57         this.Index3 = original.Index3;
     53      this.Index1 = original.Index1;
     54      this.Index2 = original.Index2;
     55      this.Index3 = original.Index3;
    5856
    59         this.Permutation = cloner.Clone(Permutation) as AlbaEncoding;
     57      this.Permutation = cloner.Clone(Permutation) as AlbaEncoding;
    6058    }
    6159
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveEvaluator.cs

    r4752 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.PermutationEncoding;
     
    2526using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2627using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    27 using HeuristicLab.Common;
    2828
    2929namespace HeuristicLab.Problems.VehicleRouting {
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs

    r5867 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System.Collections.Generic;
     22using HeuristicLab.Common;
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Data;
     
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929using HeuristicLab.Problems.VehicleRouting.Interfaces;
    30 using HeuristicLab.Common;
    3130
    3231namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveHardTabuCriterion.cs

    r5867 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Data;
     
    2728using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2829using HeuristicLab.Problems.VehicleRouting.Interfaces;
    29 using HeuristicLab.Common;
    3030
    3131namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs

    r5867 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    23 using HeuristicLab.Data;
    2424using HeuristicLab.Encodings.PermutationEncoding;
    25 using HeuristicLab.Optimization;
    2625using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using HeuristicLab.Problems.VehicleRouting.Interfaces;
    28 using HeuristicLab.Common;
    2926
    3027namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    6158    private AlbaTranslocationMoveMaker(AlbaTranslocationMoveMaker original, Cloner cloner)
    6259      : base(original, cloner) {
    63         moveMaker = cloner.Clone(original.moveMaker);
     60      moveMaker = cloner.Clone(original.moveMaker);
    6461    }
    6562
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveSoftTabuCriterion.cs

    r5867 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Data;
     
    2728using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2829using HeuristicLab.Problems.VehicleRouting.Interfaces;
    29 using HeuristicLab.Common;
    3030
    3131namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    7878    private AlbaTranslocationMoveSoftTabuCriterion(AlbaTranslocationMoveSoftTabuCriterion original, Cloner cloner)
    7979      : base(original, cloner) {
    80         tabuChecker = cloner.Clone(original.tabuChecker);
     80      tabuChecker = cloner.Clone(original.tabuChecker);
    8181    }
    8282
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveTabuMaker.cs

    r5867 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Data;
     
    2728using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2829using HeuristicLab.Problems.VehicleRouting.Interfaces;
    29 using HeuristicLab.Common;
    3030
    3131namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    7878    private AlbaTranslocationMoveTabuMaker(AlbaTranslocationMoveTabuMaker original, Cloner cloner)
    7979      : base(original, cloner) {
    80         moveTabuMaker = cloner.Clone(original.moveTabuMaker);
     80      moveTabuMaker = cloner.Clone(original.moveTabuMaker);
    8181    }
    8282
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/IAlbaTranslocationMoveOperator.cs

    r4369 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2222using HeuristicLab.Core;
    2323using HeuristicLab.Encodings.PermutationEncoding;
    24 using HeuristicLab.Optimization;
    2524using HeuristicLab.Problems.VehicleRouting.Interfaces;
    2625
Note: See TracChangeset for help on using the changeset viewer.