Free cookie consent management tool by TermsFeed Policy Generator

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

#1722 fixed more licensing information and source formatting

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

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.