Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/22/12 11:11:38 (12 years ago)
Author:
jkarder
Message:

#1331:

  • synced branch with trunk
  • added custom interface (ISimilarityBasedOperator) to mark operators that conduct similarity calculation
  • similarity calculators are now parameterized by the algorithm
  • deleted SolutionPool2TierUpdateMethod
  • deleted KnapsackMultipleGuidesPathRelinker
  • moved IImprovementOperator, IPathRelinker and ISimilarityCalculator to HeuristicLab.Optimization
  • added parameter descriptions
  • fixed plugin references
  • fixed count of EvaluatedSolutions
  • fixed check for duplicate solutions
  • minor code improvements
Location:
branches/ScatterSearch (trunk integration)
Files:
2 edited
35 copied

Legend:

Unmodified
Added
Removed
  • branches/ScatterSearch (trunk integration)

  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting

  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Creators/MultiVRPSolutionCreator.cs

    r8052 r8086  
    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;
    2324using System.Linq;
    2425using HeuristicLab.Collections;
     26using HeuristicLab.Common;
    2527using HeuristicLab.Core;
    2628using HeuristicLab.Operators;
     
    2830using HeuristicLab.Parameters;
    2931using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    30 using HeuristicLab.PluginInfrastructure;
    31 using HeuristicLab.Data;
    3232using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3333using HeuristicLab.Problems.VehicleRouting.Variants;
    34 using System.Collections.Generic;
    35 using HeuristicLab.Common;
    3634
    3735namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Creators/VRPCreator.cs

    r8052 r8086  
    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;
     22using HeuristicLab.Common;
     23using HeuristicLab.Core;
     24using HeuristicLab.Parameters;
    2625using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using HeuristicLab.Core;
    28 using HeuristicLab.Optimization;
    29 using HeuristicLab.Data;
    30 using HeuristicLab.Parameters;
    3126using HeuristicLab.Problems.VehicleRouting.Interfaces;
    32 using HeuristicLab.Common;
    3327
    3428namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
     
    4539    public VRPCreator()
    4640      : base() {
    47         Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours to be created."));
     41      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours to be created."));
    4842    }
    4943
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Crossovers/MultiVRPSolutionCrossover.cs

    r8052 r8086  
    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;
    2324using System.Linq;
    2425using HeuristicLab.Collections;
     26using HeuristicLab.Common;
    2527using HeuristicLab.Core;
    2628using HeuristicLab.Operators;
     
    2830using HeuristicLab.Parameters;
    2931using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    30 using HeuristicLab.PluginInfrastructure;
    31 using HeuristicLab.Data;
    3232using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3333using HeuristicLab.Problems.VehicleRouting.Variants;
    34 using System.Collections.Generic;
    35 using HeuristicLab.Common;
    3634
    3735namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
     
    9088
    9189    public void SetOperators(IEnumerable<IOperator> operators) {
    92       foreach(IOperator op in operators) {
     90      foreach (IOperator op in operators) {
    9391        if (op is IVRPCrossover && !(op is MultiVRPSolutionCrossover)) {
    9492          Operators.Add(op.Clone() as IVRPCrossover, true);
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Crossovers/RandomParentCloneCrossover.cs

    r8052 r8086  
    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;
     22using HeuristicLab.Common;
    2623using HeuristicLab.Core;
    2724using HeuristicLab.Optimization;
     
    3027using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3128using HeuristicLab.Problems.VehicleRouting.Variants;
    32 using HeuristicLab.Common;
    3329
    3430namespace HeuristicLab.Problems.VehicleRouting.Encodings.General.Crossovers {
     
    6864      : base(original, cloner) {
    6965    }
    70    
     66
    7167    public override IOperation Apply() {
    7268      if (RandomParameter.ActualValue.Next() < 0.5)
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Crossovers/VRPCrossover.cs

    r8052 r8086  
    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;
     22using HeuristicLab.Common;
     23using HeuristicLab.Core;
     24using HeuristicLab.Parameters;
    2625using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using HeuristicLab.Core;
    28 using HeuristicLab.Optimization;
    29 using HeuristicLab.Data;
    30 using HeuristicLab.Parameters;
    3126using HeuristicLab.Problems.VehicleRouting.Interfaces;
    32 using HeuristicLab.Common;
    3327
    3428namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Manipulators/MultiVRPSolutionManipulator.cs

    r8052 r8086  
    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;
    2324using System.Linq;
    2425using HeuristicLab.Collections;
     26using HeuristicLab.Common;
    2527using HeuristicLab.Core;
    2628using HeuristicLab.Operators;
     
    2830using HeuristicLab.Parameters;
    2931using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    30 using HeuristicLab.PluginInfrastructure;
    31 using HeuristicLab.Data;
    3232using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3333using HeuristicLab.Problems.VehicleRouting.Variants;
    34 using System.Collections.Generic;
    35 using HeuristicLab.Common;
    3634
    3735namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Manipulators/VRPManipulator.cs

    r8052 r8086  
    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;
     22using HeuristicLab.Common;
     23using HeuristicLab.Core;
     24using HeuristicLab.Parameters;
    2625using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using HeuristicLab.Core;
    28 using HeuristicLab.Optimization;
    29 using HeuristicLab.Data;
    30 using HeuristicLab.Parameters;
    3126using HeuristicLab.Problems.VehicleRouting.Interfaces;
    32 using HeuristicLab.Common;
    3327
    3428namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
     
    4539    public VRPManipulator()
    4640      : base() {
    47         Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours to be manipulated."));
     41      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours to be manipulated."));
    4842    }
    4943
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/Interfaces/IMultiVRPMoveGenerator.cs

    r8052 r8086  
    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 HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
    2422using HeuristicLab.Optimization;
    2523
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/Interfaces/IMultiVRPMoveOperator.cs

    r8052 r8086  
    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 HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
    24 using HeuristicLab.Optimization;
    2522using HeuristicLab.Problems.VehicleRouting.Interfaces;
    26 using HeuristicLab.Problems.VehicleRouting.Variants;
    2723
    2824namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/Interfaces/IVRPMove.cs

    r8052 r8086  
    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;
    2423using HeuristicLab.Optimization;
    25 using HeuristicLab.Data;
    26 using HeuristicLab.Problems.VehicleRouting.Interfaces;
    2724
    2825namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveEvaluator.cs

    r8052 r8086  
    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.General;
    2727using HeuristicLab.Problems.VehicleRouting.Variants;
    28 using HeuristicLab.Common;
    2928
    3029namespace HeuristicLab.Problems.VehicleRouting {
     
    4140    public MultiVRPMoveEvaluator()
    4241      : base() {
    43         Parameters.Add(new LookupParameter<IVRPMove>("VRPMove", "The generated moves."));
     42      Parameters.Add(new LookupParameter<IVRPMove>("VRPMove", "The generated moves."));
    4443    }
    4544
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs

    r8052 r8086  
    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;
    2324using System.Linq;
    2425using HeuristicLab.Collections;
     26using HeuristicLab.Common;
    2527using HeuristicLab.Core;
     28using HeuristicLab.Data;
    2629using HeuristicLab.Operators;
    2730using HeuristicLab.Optimization;
    2831using HeuristicLab.Parameters;
    2932using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    30 using HeuristicLab.PluginInfrastructure;
    31 using HeuristicLab.Data;
    32 using System.Collections.Generic;
    3333using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3434using HeuristicLab.Problems.VehicleRouting.Variants;
    35 using HeuristicLab.Common;
    3635
    3736namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveMaker.cs

    r8052 r8086  
    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;
    25 using HeuristicLab.Optimization;
    2624using HeuristicLab.Parameters;
    2725using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using System.Collections.Generic;
    2926using HeuristicLab.Problems.VehicleRouting.Variants;
    30 using HeuristicLab.Common;
    3127
    32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General{
     28namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
    3329  [Item("MultiVRPMoveMaker", "Peforms a lambda interchange moves on a given VRP encoding and updates the quality.")]
    3430  [StorableClass]
     
    3733      get { return (ILookupParameter)Parameters["VRPMove"]; }
    3834    }
    39    
     35
    4036    [StorableConstructor]
    4137    protected MultiVRPMoveMaker(bool deserializing) : base(deserializing) { }
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveTabuChecker.cs

    r8052 r8086  
    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;
     
    2627using HeuristicLab.Parameters;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using System.Collections.Generic;
     29using HeuristicLab.Problems.VehicleRouting.Interfaces;
    2930using HeuristicLab.Problems.VehicleRouting.Variants;
    30 using HeuristicLab.Common;
    31 using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3231
    33 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General{
     32namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
    3433  [Item("MultiVRPMoveTabuChecker", "Checks if a VRP move is tabu.")]
    3534  [StorableClass]
     
    6665      set { UseAspirationCriterionParameter.Value = value; }
    6766    }
    68    
     67
    6968    [StorableConstructor]
    7069    protected MultiVRPMoveTabuChecker(bool deserializing) : base(deserializing) { }
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveTabuMaker.cs

    r8052 r8086  
    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;
     
    2627using HeuristicLab.Parameters;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using System.Collections.Generic;
     29using HeuristicLab.Problems.VehicleRouting.Interfaces;
    2930using HeuristicLab.Problems.VehicleRouting.Variants;
    30 using HeuristicLab.Common;
    31 using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3231
    33 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General{
     32namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
    3433  [Item("MultiVRPMoveTabuMaker", "A multi VRP move tabu maker.")]
    3534  [StorableClass]
     
    5958      get { return (LookupParameter<IVRPProblemInstance>)Parameters["ProblemInstance"]; }
    6059    }
    61    
     60
    6261    [StorableConstructor]
    6362    protected MultiVRPMoveTabuMaker(bool deserializing) : base(deserializing) { }
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveAttribute.cs

    r8052 r8086  
    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.
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveEvaluator.cs

    r8052 r8086  
    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;
     22using HeuristicLab.Common;
     23using HeuristicLab.Core;
     24using HeuristicLab.Data;
     25using HeuristicLab.Optimization;
     26using HeuristicLab.Parameters;
    2627using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using HeuristicLab.Core;
    28 using HeuristicLab.Optimization;
    29 using HeuristicLab.Data;
    30 using HeuristicLab.Parameters;
    3128using HeuristicLab.Problems.VehicleRouting.Interfaces;
    32 using HeuristicLab.Common;
    3329
    3430namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
     
    3733  public abstract class VRPMoveEvaluator : VRPMoveOperator, ISingleObjectiveMoveEvaluator {
    3834    public const string MovePrefix = "Move";
    39    
     35
    4036    public ILookupParameter<DoubleValue> QualityParameter {
    4137      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
     
    8278    public override IOperation Apply() {
    8379      EvaluateMove();
    84      
     80
    8581      return base.Apply();
    8682    }
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveGenerator.cs

    r8052 r8086  
    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.Persistence.Default.CompositeSerializers.Storable;
     22using HeuristicLab.Common;
    2723using HeuristicLab.Core;
    2824using HeuristicLab.Optimization;
    29 using HeuristicLab.Data;
    30 using HeuristicLab.Parameters;
    31 using HeuristicLab.Problems.VehicleRouting.Interfaces;
    32 using HeuristicLab.Common;
     25using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3326
    3427namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
    3528  [Item("VRPMoveGenerator", "Generates moves for a VRP solution.")]
    3629  [StorableClass]
    37   public abstract class 
     30  public abstract class
    3831    VRPMoveGenerator : VRPMoveOperator, IMoveGenerator {
    3932    [StorableConstructor]
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveMaker.cs

    r8052 r8086  
    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;
    2322using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
     23using HeuristicLab.Common;
     24using HeuristicLab.Core;
     25using HeuristicLab.Data;
     26using HeuristicLab.Optimization;
     27using HeuristicLab.Parameters;
    2628using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using HeuristicLab.Core;
    28 using HeuristicLab.Optimization;
    29 using HeuristicLab.Data;
    30 using HeuristicLab.Parameters;
    3129using HeuristicLab.Problems.VehicleRouting.Interfaces;
    32 using HeuristicLab.Common;
    3330
    3431namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
     
    6562      IVRPEvaluator evaluator = ProblemInstance.SolutionEvaluator;
    6663      ICollection<IParameter> addedParameters = new List<IParameter>();
    67      
     64
    6865      try {
    6966        foreach (IParameter parameter in evaluator.Parameters) {
    70           if (parameter is ILookupParameter 
    71             && parameter != evaluator.VRPToursParameter 
     67          if (parameter is ILookupParameter
     68            && parameter != evaluator.VRPToursParameter
    7269            && parameter != evaluator.ProblemInstanceParameter) {
    7370            ILookupParameter evaluatorParameter = parameter as ILookupParameter;
    74          
     71
    7572            string resultName = evaluatorParameter.ActualName;
    7673            if (!this.Parameters.ContainsKey(resultName)) {
     
    8481            if (!this.Parameters.ContainsKey(moveResultName)) {
    8582              ILookupParameter moveResultParameter = new LookupParameter<IItem>(moveResultName);
    86               moveResultParameter.ExecutionContext = ExecutionContext; 
     83              moveResultParameter.ExecutionContext = ExecutionContext;
    8784              this.Parameters.Add(moveResultParameter);
    8885              addedParameters.Add(moveResultParameter);
     
    9693      }
    9794      finally {
    98         foreach(IParameter parameter in addedParameters) {
     95        foreach (IParameter parameter in addedParameters) {
    9996          this.Parameters.Remove(parameter);
    10097        }
     
    105102      PerformMove();
    106103      UpdateMoveEvaluation();
    107      
     104
    108105      return base.Apply();
    109106    }
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveOperator.cs

    r8052 r8086  
    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;
     22using HeuristicLab.Common;
     23using HeuristicLab.Core;
     24using HeuristicLab.Parameters;
    2625using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using HeuristicLab.Core;
    2826using HeuristicLab.Problems.VehicleRouting.Interfaces;
    29 using HeuristicLab.Parameters;
    30 using HeuristicLab.Common;
    3127
    3228namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/PermutationEncoding.cs

    r8052 r8086  
    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 System;
     23using System.Collections.Generic;
    2224using HeuristicLab.Common;
    2325using HeuristicLab.Core;
    24 using HeuristicLab.Data;
    2526using HeuristicLab.Encodings.PermutationEncoding;
    2627using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using System.Collections.Generic;
    28 using System;
    2928using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3029
     
    6059    protected PermutationEncoding(PermutationEncoding original, Cloner cloner)
    6160      : base(original, cloner) {
    62         this.readOnly = original.readOnly;
     61      this.readOnly = original.readOnly;
    6362
    64         if (original.ProblemInstance != null && cloner.ClonedObjectRegistered(original.ProblemInstance))
    65           this.ProblemInstance = (IVRPProblemInstance)cloner.Clone(original.ProblemInstance);
    66         else
    67           this.ProblemInstance = original.ProblemInstance;
     63      if (original.ProblemInstance != null && cloner.ClonedObjectRegistered(original.ProblemInstance))
     64        this.ProblemInstance = (IVRPProblemInstance)cloner.Clone(original.ProblemInstance);
     65      else
     66        this.ProblemInstance = original.ProblemInstance;
    6867    }
    6968
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/TourEncoding.cs

    r8052 r8086  
    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 System.Collections.Generic;
     23using System.Drawing;
    2224using HeuristicLab.Common;
    2325using HeuristicLab.Core;
    24 using HeuristicLab.Data;
    25 using HeuristicLab.Encodings.PermutationEncoding;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using System.Drawing;
    28 using System.Collections.Generic;
    2927using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3028
     
    3634      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
    3735    }
    38    
     36
    3937    #region IVRPEncoding Members
    4038    public virtual void Repair() {
     
    5351
    5452        Tours.Remove(tour);
    55       } 
     53      }
    5654    }
    5755
    58     public virtual List<Tour> GetTours() {     
    59      List<Tour> result = new List<Tour>();
    60      foreach (Tour tour in Tours)
    61        result.Add(tour.Clone() as Tour);
     56    public virtual List<Tour> GetTours() {
     57      List<Tour> result = new List<Tour>();
     58      foreach (Tour tour in Tours)
     59        result.Add(tour.Clone() as Tour);
    6260
    63      return result;
     61      return result;
    6462    }
    6563
     
    8280
    8381    public int Cities {
    84       get
    85       {
     82      get {
    8683        int cities = 0;
    8784
     
    114111    protected TourEncoding(TourEncoding original, Cloner cloner)
    115112      : base(original, cloner) {
    116        this.Tours = (ItemList<Tour>)cloner.Clone(original.Tours);
    117        if (original.ProblemInstance != null && cloner.ClonedObjectRegistered(original.ProblemInstance))
    118          this.ProblemInstance = (IVRPProblemInstance)cloner.Clone(original.ProblemInstance);
    119        else
    120          this.ProblemInstance = original.ProblemInstance;
     113      this.Tours = (ItemList<Tour>)cloner.Clone(original.Tours);
     114      if (original.ProblemInstance != null && cloner.ClonedObjectRegistered(original.ProblemInstance))
     115        this.ProblemInstance = (IVRPProblemInstance)cloner.Clone(original.ProblemInstance);
     116      else
     117        this.ProblemInstance = original.ProblemInstance;
    121118    }
    122119
Note: See TracChangeset for help on using the changeset viewer.