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/IntraRouteInversion
Files:
8 edited

Legend:

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