Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/28/10 01:44:33 (14 years ago)
Author:
swagner
Message:

Revoked changes of r5177 (#1333)

Location:
branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3
Files:
48 edited

Legend:

Unmodified
Added
Removed
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Analyzers/BestAverageWorstVRPToursCalculator.cs

    r5177 r5178  
    243243    }
    244244
    245     public override IOperation Apply(IExecutionContext context) {
     245    public override IOperation Apply() {
    246246      UpdateOverloads();
    247247      UpdateTardiness();
     
    250250      UpdateVehiclesUtilized();
    251251
    252       return base.Apply(context);
     252      return base.Apply();
    253253    }
    254254  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Analyzers/BestVRPSolutionAnalyzer.cs

    r5177 r5178  
    132132    }
    133133
    134     public override IOperation Apply(IExecutionContext context) {
     134    public override IOperation Apply() {
    135135      DoubleMatrix coordinates = CoordinatesParameter.ActualValue;
    136136      ItemArray<IVRPEncoding> solutions = VRPToursParameter.ActualValue;
     
    188188      }
    189189
    190       return base.Apply(context);
     190      return base.Apply();
    191191    }
    192192  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Analyzers/BestVRPToursMemorizer.cs

    r5177 r5178  
    8989    }
    9090
    91     public override IOperation Apply(IExecutionContext context) {
     91    public override IOperation Apply() {
    9292      int i = OverloadParameter.ActualValue.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
    9393      if (BestOverloadParameter.ActualValue == null)
     
    120120        BestVehiclesUtilizedParameter.ActualValue.Value = VehiclesUtilizedParameter.ActualValue[i].Value;
    121121
    122       return base.Apply(context);
     122      return base.Apply();
    123123    }
    124124  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaCrossover.cs

    r5177 r5178  
    4444    }
    4545
    46     protected abstract AlbaEncoding Crossover(IExecutionContext context, IRandom random, AlbaEncoding parent1, AlbaEncoding parent2);
     46    protected abstract AlbaEncoding Crossover(IRandom random, AlbaEncoding parent1, AlbaEncoding parent2);
    4747
    48     public override IOperation Apply(IExecutionContext context) {
     48    public override IOperation Apply() {
    4949      ItemArray<IVRPEncoding> parents = new ItemArray<IVRPEncoding>(ParentsParameter.ActualValue.Length);
    5050      for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
     
    6161
    6262      ChildParameter.ActualValue =
    63         Crossover(context, RandomParameter.ActualValue, parents[0] as AlbaEncoding, parents[1] as AlbaEncoding);
     63        Crossover(RandomParameter.ActualValue, parents[0] as AlbaEncoding, parents[1] as AlbaEncoding);
    6464
    65       return base.Apply(context);
     65      return base.Apply();
    6666    }
    6767  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaPermutationCrossover.cs

    r5177 r5178  
    4747    }
    4848
    49     protected override AlbaEncoding Crossover(IExecutionContext context, IRandom random, AlbaEncoding parent1, AlbaEncoding parent2) {
     49    protected override AlbaEncoding Crossover(IRandom random, AlbaEncoding parent1, AlbaEncoding parent2) {
    5050      //note - the inner crossover is called here and the result is converted to an alba representation
    5151      //some refactoring should be done here in the future - the crossover operation should be called directly
    5252
    5353      InnerCrossoverParameter.ActualValue.ParentsParameter.ActualName = ParentsParameter.ActualName;
    54       IAtomicOperation op = context.CreateOperation(
    55         InnerCrossoverParameter.ActualValue, context.Scope);
     54      IAtomicOperation op = this.ExecutionContext.CreateOperation(
     55        InnerCrossoverParameter.ActualValue, this.ExecutionContext.Scope);
    5656      op.Operator.Execute((IExecutionContext)op);
    5757
    5858      string childName = InnerCrossoverParameter.ActualValue.ChildParameter.ActualName;
    59       if (context.Scope.Variables.ContainsKey(childName)) {
    60         Permutation permutation = context.Scope.Variables[childName].Value as Permutation;
    61         context.Scope.Variables.Remove(childName);
     59      if (ExecutionContext.Scope.Variables.ContainsKey(childName)) {
     60        Permutation permutation = ExecutionContext.Scope.Variables[childName].Value as Permutation;
     61        ExecutionContext.Scope.Variables.Remove(childName);
    6262
    6363        return new AlbaEncoding(permutation, Cities);
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaCustomerInsertionManipulator.cs

    r5177 r5178  
    4141    }
    4242
    43     protected override void Manipulate(IExecutionContext context, IRandom random, AlbaEncoding individual) {
     43    protected override void Manipulate(IRandom random, AlbaEncoding individual) {
    4444      AlbaEncoding original = (AlbaEncoding)individual.Clone();
    4545      int cutIndex, insertIndex, number;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaCustomerInversionManipulator.cs

    r5177 r5178  
    4141      return new AlbaCustomerInversionManipulator(this, cloner);
    4242    }
    43     protected override void Manipulate(IExecutionContext context, IRandom random, AlbaEncoding individual) {
     43    protected override void Manipulate(IRandom random, AlbaEncoding individual) {
    4444      int breakPoint1, breakPoint2;
    4545
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaCustomerSwapManipulator.cs

    r5177 r5178  
    3838    }
    3939
    40     protected override void Manipulate(IExecutionContext context, IRandom random, AlbaEncoding individual) {
     40    protected override void Manipulate(IRandom random, AlbaEncoding individual) {
    4141      int index1, index2, temp;
    4242
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaIntraRouteInversionManipulator.cs

    r5177 r5178  
    5252    }
    5353
    54     protected override void Manipulate(IExecutionContext context, IRandom rand, AlbaEncoding individual) {
     54    protected override void Manipulate(IRandom rand, AlbaEncoding individual) {
    5555      int index1 = -1;
    5656      int index2 = -1;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaLambdaInterchangeManipulator.cs

    r5177 r5178  
    102102    }
    103103
    104     protected override void Manipulate(IExecutionContext context, IRandom rand, AlbaEncoding individual) {
     104    protected override void Manipulate(IRandom rand, AlbaEncoding individual) {
    105105      List<Tour> tours = individual.GetTours();
    106106      int lambda = LambdaParameter.Value.Value;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaManipulator.cs

    r5177 r5178  
    4444    }
    4545
    46     protected abstract void Manipulate(IExecutionContext context, IRandom random, AlbaEncoding individual);
     46    protected abstract void Manipulate(IRandom random, AlbaEncoding individual);
    4747
    4848    protected int FindCustomerLocation(int customer, AlbaEncoding individual) {
     
    5858    }
    5959
    60     public override IOperation Apply(IExecutionContext context) {
     60    public override IOperation Apply() {
    6161      IVRPEncoding solution = VRPToursParameter.ActualValue;
    6262      if (!(solution is AlbaEncoding)) {
     
    6464      }
    6565
    66       Manipulate(context, RandomParameter.ActualValue, VRPToursParameter.ActualValue as AlbaEncoding);
     66      Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as AlbaEncoding);
    6767
    68       return base.Apply(context);
     68      return base.Apply();
    6969    }
    7070  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaPermutationManipulator.cs

    r5177 r5178  
    4646    }
    4747
    48     protected override void Manipulate(IExecutionContext context, IRandom random, AlbaEncoding individual) {
     48    protected override void Manipulate(IRandom random, AlbaEncoding individual) {
    4949      InnerManipulatorParameter.ActualValue.PermutationParameter.ActualName = VRPToursParameter.ActualName;
    5050
    51       IAtomicOperation op = context.CreateOperation(
    52         InnerManipulatorParameter.ActualValue, context.Scope);
     51      IAtomicOperation op = this.ExecutionContext.CreateOperation(
     52        InnerManipulatorParameter.ActualValue, this.ExecutionContext.Scope);
    5353      op.Operator.Execute((IExecutionContext)op);
    5454    }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveMaker.cs

    r5177 r5178  
    8080    }
    8181
    82     public override IOperation Apply(IExecutionContext context) {
    83       IOperation successor = base.Apply(context);
     82    public override IOperation Apply() {
     83      IOperation successor = base.Apply();
    8484
    8585      VehcilesUtilizedParameter.ActualValue = MoveVehcilesUtilizedParameter.ActualValue;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveOperator.cs

    r5177 r5178  
    3636    }
    3737
    38     public override IOperation Apply(IExecutionContext context) {
     38    public override IOperation Apply() {
    3939      IVRPEncoding solution = VRPToursParameter.ActualValue;
    4040      if (!(solution is AlbaEncoding)) {
     
    4343      }
    4444
    45       return base.Apply(context);
     45      return base.Apply();
    4646    }
    4747  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaPermutationMoveOperator.cs

    r5177 r5178  
    3939    }
    4040
    41     public override IOperation Apply(IExecutionContext context) {
    42       IOperation next = base.Apply(context);
     41    public override IOperation Apply() {
     42      IOperation next = base.Apply();
    4343
    4444      IVRPEncoding solution = VRPToursParameter.ActualValue;
    4545
    4646      PermutationMoveOperatorParameter.PermutationParameter.ActualName = VRPToursParameter.ActualName;
    47       IAtomicOperation op = context.CreateChildOperation(PermutationMoveOperatorParameter);
     47      IAtomicOperation op = this.ExecutionContext.CreateChildOperation(PermutationMoveOperatorParameter);
    4848      op.Operator.Execute((IExecutionContext)op);
    4949
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveGenerator.cs

    r5177 r5178  
    4949    protected abstract AlbaIntraRouteInversionMove[] GenerateMoves(AlbaEncoding individual);
    5050
    51     public override IOperation Apply(IExecutionContext context) {
    52       IOperation next = base.Apply(context);
     51    public override IOperation Apply() {
     52      IOperation next = base.Apply();
    5353
    5454      AlbaEncoding individual = VRPToursParameter.ActualValue as AlbaEncoding;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveMaker.cs

    r5177 r5178  
    6262    }
    6363
    64     public override IOperation Apply(IExecutionContext context) {
    65       IOperation next = base.Apply(context);
     64    public override IOperation Apply() {
     65      IOperation next = base.Apply();
    6666     
    6767      AlbaIntraRouteInversionMove move = IntraRouteInversionMoveParameter.ActualValue;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveGenerator.cs

    r5177 r5178  
    6161    protected abstract AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda);
    6262
    63     public override IOperation Apply(IExecutionContext context) {
    64       IOperation next = base.Apply(context);
     63    public override IOperation Apply() {
     64      IOperation next = base.Apply();
    6565
    6666      AlbaEncoding individual = VRPToursParameter.ActualValue as AlbaEncoding;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveMaker.cs

    r5177 r5178  
    6767    }
    6868
    69     public override IOperation Apply(IExecutionContext context) {
    70       IOperation next = base.Apply(context);
     69    public override IOperation Apply() {
     70      IOperation next = base.Apply();
    7171
    7272      AlbaLambdaInterchangeMove move = LambdaInterchangeMoveParameter.ActualValue;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs

    r5177 r5178  
    8484    }
    8585
    86     public override IOperation Apply(IExecutionContext context) {
    87       IOperation successor = base.Apply(context);
     86    public override IOperation Apply() {
     87      IOperation successor = base.Apply();
    8888
    8989      Permutation permutation = VRPToursParameter.ActualValue as Permutation;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs

    r5177 r5178  
    6161      return new AlbaTranslocationMoveMaker(this, cloner);
    6262    }
    63     public override IOperation Apply(IExecutionContext context) {
    64       IOperation next = base.Apply(context);
     63    public override IOperation Apply() {
     64      IOperation next = base.Apply();
    6565
    6666      IVRPEncoding solution = VRPToursParameter.ActualValue;
    6767
    6868      moveMaker.PermutationParameter.ActualName = VRPToursParameter.ActualName;
    69       IAtomicOperation op = context.CreateChildOperation(moveMaker);
     69      IAtomicOperation op = this.ExecutionContext.CreateChildOperation(moveMaker);
    7070      op.Operator.Execute((IExecutionContext)op);
    7171
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/GVR/Crossovers/GVRCrossover.cs

    r5177 r5178  
    101101    }
    102102   
    103     public override IOperation Apply(IExecutionContext context) {
     103    public override IOperation Apply() {
    104104      ItemArray<IVRPEncoding> parents = new ItemArray<IVRPEncoding>(ParentsParameter.ActualValue.Length);
    105105      for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
     
    116116      ChildParameter.ActualValue = Crossover(RandomParameter.ActualValue, parents[0] as GVREncoding, parents[1] as GVREncoding);
    117117
    118       return base.Apply(context);
     118      return base.Apply();
    119119    }
    120120  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/GVR/Manipulators/GVRManipulator.cs

    r5177 r5178  
    5050    protected abstract void Manipulate(IRandom random, GVREncoding individual);
    5151   
    52     public override IOperation Apply(IExecutionContext context) {
     52    public override IOperation Apply() {
    5353      IVRPEncoding solution = VRPToursParameter.ActualValue;
    5454      if (!(solution is GVREncoding)) {
     
    5959      Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as GVREncoding);
    6060
    61       return base.Apply(context);
     61      return base.Apply();
    6262    }
    6363  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Creators/DefaultRepresentationCreator.cs

    r5177 r5178  
    3838    public DefaultRepresentationCreator() : base() { }
    3939
    40     public override IOperation Apply(IExecutionContext context) {
     40    public override IOperation Apply() {
    4141      //choose default encoding here
    4242      VRPToursParameter.ActualValue = PotvinEncoding.ConvertFrom(CreateSolution());
    4343
    44       return base.Apply(context);
     44      return base.Apply();
    4545    }
    4646  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Creators/MultiVRPSolutionCreator.cs

    r5177 r5178  
    135135    }
    136136
    137     public override IOperation Apply(IExecutionContext context) {
     137    public override IOperation Apply() {
    138138      if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one VRP creator to choose from.");
    139       return base.Apply(context);
     139      return base.Apply();
    140140    }
    141141  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers/MultiVRPSolutionCrossover.cs

    r5177 r5178  
    142142    }
    143143
    144     public override IOperation Apply(IExecutionContext context) {
     144    public override IOperation Apply() {
    145145      if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one permutation crossover to choose from.");
    146       return base.Apply(context);
     146      return base.Apply();
    147147    }
    148148  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers/RandomParentCloneCrossover.cs

    r5177 r5178  
    5757    }
    5858
    59     public override IOperation Apply(IExecutionContext context) {
     59    public override IOperation Apply() {
    6060      if (RandomParameter.ActualValue.Next() < 0.5)
    6161        ChildParameter.ActualValue = ParentsParameter.ActualValue[0].Clone() as IVRPEncoding;
     
    6363        ChildParameter.ActualValue = ParentsParameter.ActualValue[1].Clone() as IVRPEncoding;
    6464
    65       return base.Apply(context);
     65      return base.Apply();
    6666    }
    6767  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Manipulators/MultiVRPSolutionManipulator.cs

    r5177 r5178  
    140140    }
    141141
    142     public override IOperation Apply(IExecutionContext context) {
     142    public override IOperation Apply() {
    143143      if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one permutation manipulator to choose from.");
    144       return base.Apply(context);
     144      return base.Apply();
    145145    }
    146146  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs

    r5177 r5178  
    187187    }
    188188
    189     public override IOperation Apply(IExecutionContext context) {
     189    public override IOperation Apply() {
    190190      if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one VRP move generator choose from.");
    191       OperationCollection next = new OperationCollection(base.Apply(context));
     191      OperationCollection next = new OperationCollection(base.Apply());
    192192
    193193      for (int i = 0; i < SampleSizeParameter.ActualValue.Value; i++) {
     
    215215
    216216        if (successor != null) {
    217           next.Insert(0, context.CreateChildOperation(successor));
     217          next.Insert(0, ExecutionContext.CreateChildOperation(successor));
    218218        }
    219219      }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveMaker.cs

    r5177 r5178  
    107107    }
    108108
    109     public override IOperation Apply(IExecutionContext context) {
    110       IOperation next = base.Apply(context);
     109    public override IOperation Apply() {
     110      IOperation next = base.Apply();
    111111
    112112      IVRPEncoding solution = VRPToursParameter.ActualValue as IVRPEncoding;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/PotvinCrossover.cs

    r5177 r5178  
    125125    }
    126126
    127     public override IOperation Apply(IExecutionContext context) {
     127    public override IOperation Apply() {
    128128      ItemArray<IVRPEncoding> parents = new ItemArray<IVRPEncoding>(ParentsParameter.ActualValue.Length);
    129129      for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
     
    140140      ChildParameter.ActualValue = Crossover(RandomParameter.ActualValue, parents[0] as PotvinEncoding, parents[1] as PotvinEncoding);
    141141
    142       return base.Apply(context);
     142      return base.Apply();
    143143    }
    144144  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinManipulator.cs

    r5177 r5178  
    8080    }
    8181
    82     public override IOperation Apply(IExecutionContext context) {
     82    public override IOperation Apply() {
    8383      IVRPEncoding solution = VRPToursParameter.ActualValue;
    8484      if (!(solution is PotvinEncoding)) {
     
    8888      Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as PotvinEncoding);
    8989
    90       return base.Apply(context);
     90      return base.Apply();
    9191    }
    9292  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Crossovers/PrinsCrossover.cs

    r5177 r5178  
    6565    }
    6666
    67     protected abstract PrinsEncoding Crossover(IExecutionContext context, IRandom random, PrinsEncoding parent1, PrinsEncoding parent2);
     67    protected abstract PrinsEncoding Crossover(IRandom random, PrinsEncoding parent1, PrinsEncoding parent2);
    6868
    69     public override IOperation Apply(IExecutionContext context) {
     69    public override IOperation Apply() {
    7070      ItemArray<IVRPEncoding> parents = new ItemArray<IVRPEncoding>(ParentsParameter.ActualValue.Length);
    7171      for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
     
    9595
    9696      ChildParameter.ActualValue =
    97         Crossover(context, RandomParameter.ActualValue, parents[0] as PrinsEncoding, parents[1] as PrinsEncoding);
     97        Crossover(RandomParameter.ActualValue, parents[0] as PrinsEncoding, parents[1] as PrinsEncoding);
    9898
    99       return base.Apply(context);
     99      return base.Apply();
    100100    }
    101101  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Crossovers/PrinsPermutationCrossover.cs

    r5177 r5178  
    4545    }
    4646
    47     protected override PrinsEncoding Crossover(IExecutionContext context, IRandom random, PrinsEncoding parent1, PrinsEncoding parent2) {
     47    protected override PrinsEncoding Crossover(IRandom random, PrinsEncoding parent1, PrinsEncoding parent2) {
    4848      //note - the inner crossover is called here and the result is converted to a prins representation
    4949      //some refactoring should be done here in the future - the crossover operation should be called directly
    5050
    5151      InnerCrossoverParameter.ActualValue.ParentsParameter.ActualName = ParentsParameter.ActualName;
    52       IAtomicOperation op = context.CreateOperation(
    53         InnerCrossoverParameter.ActualValue, context.Scope);
     52      IAtomicOperation op = this.ExecutionContext.CreateOperation(
     53        InnerCrossoverParameter.ActualValue, this.ExecutionContext.Scope);
    5454      op.Operator.Execute((IExecutionContext)op);
    5555
    5656      string childName = InnerCrossoverParameter.ActualValue.ChildParameter.ActualName;
    57       if (context.Scope.Variables.ContainsKey(childName)) {
    58         Permutation permutation = context.Scope.Variables[childName].Value as Permutation;
    59         context.Scope.Variables.Remove(childName);
     57      if (ExecutionContext.Scope.Variables.ContainsKey(childName)) {
     58        Permutation permutation = ExecutionContext.Scope.Variables[childName].Value as Permutation;
     59        ExecutionContext.Scope.Variables.Remove(childName);
    6060
    6161        return new PrinsEncoding(permutation, Cities,
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Manipulators/PrinsExhaustiveLSManipulator.cs

    r5177 r5178  
    3939    }
    4040
    41     protected override void Manipulate(IExecutionContext context, IRandom random, PrinsEncoding individual) {
     41    protected override void Manipulate(IRandom random, PrinsEncoding individual) {
    4242      List<Tour> tours = individual.GetTours(DistanceMatrixParameter);
    4343      bool improvement = false;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Manipulators/PrinsManipulator.cs

    r5177 r5178  
    6464    }
    6565
    66     protected abstract void Manipulate(IExecutionContext context, IRandom random, PrinsEncoding individual);
     66    protected abstract void Manipulate(IRandom random, PrinsEncoding individual);
    6767
    68     public override IOperation Apply(IExecutionContext context) {
     68    public override IOperation Apply() {
    6969      IVRPEncoding solution = VRPToursParameter.ActualValue;
    7070      if (!(solution is PrinsEncoding)) {
     
    8686      }
    8787
    88       Manipulate(context, RandomParameter.ActualValue, VRPToursParameter.ActualValue as PrinsEncoding);
     88      Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as PrinsEncoding);
    8989
    90       return base.Apply(context);
     90      return base.Apply();
    9191    }
    9292  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Manipulators/PrinsPermutationManipulator.cs

    r5177 r5178  
    4545    }
    4646
    47     protected override void Manipulate(IExecutionContext context, IRandom random, PrinsEncoding individual) {
     47    protected override void Manipulate(IRandom random, PrinsEncoding individual) {
    4848      InnerManipulatorParameter.ActualValue.PermutationParameter.ActualName = VRPToursParameter.ActualName;
    4949
    50       IAtomicOperation op = context.CreateOperation(
    51         InnerManipulatorParameter.ActualValue, context.Scope);
     50      IAtomicOperation op = this.ExecutionContext.CreateOperation(
     51        InnerManipulatorParameter.ActualValue, this.ExecutionContext.Scope);
    5252      op.Operator.Execute((IExecutionContext)op);
    5353    }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Manipulators/PrinsStochasticLSManipulator.cs

    r5177 r5178  
    4646    }
    4747
    48     protected override void Manipulate(IExecutionContext context, IRandom random, PrinsEncoding individual) {
     48    protected override void Manipulate(IRandom random, PrinsEncoding individual) {
    4949      List<Tour> tours = individual.GetTours(DistanceMatrixParameter);
    5050      bool improvement = false;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Zhu/Crossovers/ZhuCrossover.cs

    r5177 r5178  
    4545    }
    4646
    47     protected abstract ZhuEncoding Crossover(IExecutionContext context, IRandom random, ZhuEncoding parent1, ZhuEncoding parent2);
     47    protected abstract ZhuEncoding Crossover(IRandom random, ZhuEncoding parent1, ZhuEncoding parent2);
    4848
    49     public override IOperation Apply(IExecutionContext context) {
     49    public override IOperation Apply() {
    5050      ItemArray<IVRPEncoding> parents = new ItemArray<IVRPEncoding>(ParentsParameter.ActualValue.Length);
    5151      for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
     
    7070
    7171      ChildParameter.ActualValue =
    72         Crossover(context, RandomParameter.ActualValue, parents[0] as ZhuEncoding, parents[1] as ZhuEncoding);
     72        Crossover(RandomParameter.ActualValue, parents[0] as ZhuEncoding, parents[1] as ZhuEncoding);
    7373
    74       return base.Apply(context);
     74      return base.Apply();
    7575    }
    7676  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Zhu/Crossovers/ZhuHeuristicCrossover1.cs

    r5177 r5178  
    4949    }
    5050
    51     protected override ZhuEncoding Crossover(IExecutionContext context, IRandom random, ZhuEncoding parent1, ZhuEncoding parent2) {
     51    protected override ZhuEncoding Crossover(IRandom random, ZhuEncoding parent1, ZhuEncoding parent2) {
    5252      parent1 = parent1.Clone() as ZhuEncoding;
    5353      parent2 = parent2.Clone() as ZhuEncoding;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Zhu/Crossovers/ZhuHeuristicCrossover2.cs

    r5177 r5178  
    4141    }
    4242
    43     protected override ZhuEncoding Crossover(IExecutionContext context, IRandom random, ZhuEncoding parent1, ZhuEncoding parent2) {
     43    protected override ZhuEncoding Crossover(IRandom random, ZhuEncoding parent1, ZhuEncoding parent2) {
    4444      List<int> p1 = new List<int>(parent1);
    4545      List<int> p2 = new List<int>(parent2);
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Zhu/Crossovers/ZhuMergeCrossover1.cs

    r5177 r5178  
    4949    }
    5050
    51     protected override ZhuEncoding Crossover(IExecutionContext context, IRandom random, ZhuEncoding parent1, ZhuEncoding parent2) {
     51    protected override ZhuEncoding Crossover(IRandom random, ZhuEncoding parent1, ZhuEncoding parent2) {
    5252      parent1 = parent1.Clone() as ZhuEncoding;
    5353      parent2 = parent2.Clone() as ZhuEncoding;
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Zhu/Crossovers/ZhuMergeCrossover2.cs

    r5177 r5178  
    4141    }
    4242
    43     protected override ZhuEncoding Crossover(IExecutionContext context, IRandom random, ZhuEncoding parent1, ZhuEncoding parent2) {
     43    protected override ZhuEncoding Crossover(IRandom random, ZhuEncoding parent1, ZhuEncoding parent2) {
    4444      List<int> p1 = new List<int>(parent1);
    4545      List<int> p2 = new List<int>(parent2);
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Zhu/Crossovers/ZhuPermutationCrossover.cs

    r5177 r5178  
    4747    }
    4848
    49     protected override ZhuEncoding Crossover(IExecutionContext context, IRandom random, ZhuEncoding parent1, ZhuEncoding parent2) {
     49    protected override ZhuEncoding Crossover(IRandom random, ZhuEncoding parent1, ZhuEncoding parent2) {
    5050      //note - the inner crossover is called here and the result is converted to a prins representation
    5151      //some refactoring should be done here in the future - the crossover operation should be called directly
    5252
    5353      InnerCrossoverParameter.ActualValue.ParentsParameter.ActualName = ParentsParameter.ActualName;
    54       IAtomicOperation op = context.CreateOperation(
    55         InnerCrossoverParameter.ActualValue, context.Scope);
     54      IAtomicOperation op = this.ExecutionContext.CreateOperation(
     55        InnerCrossoverParameter.ActualValue, this.ExecutionContext.Scope);
    5656      op.Operator.Execute((IExecutionContext)op);
    5757
    5858      string childName = InnerCrossoverParameter.ActualValue.ChildParameter.ActualName;
    59       if (context.Scope.Variables.ContainsKey(childName)) {
    60         Permutation permutation = context.Scope.Variables[childName].Value as Permutation;
    61         context.Scope.Variables.Remove(childName);
     59      if (ExecutionContext.Scope.Variables.ContainsKey(childName)) {
     60        Permutation permutation = ExecutionContext.Scope.Variables[childName].Value as Permutation;
     61        ExecutionContext.Scope.Variables.Remove(childName);
    6262
    6363        return new ZhuEncoding(permutation, Cities,
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Zhu/Manipulators/ZhuManipulator.cs

    r5177 r5178  
    4545    }
    4646
    47     protected abstract void Manipulate(IExecutionContext context, IRandom random, ZhuEncoding individual);
     47    protected abstract void Manipulate(IRandom random, ZhuEncoding individual);
    4848
    49     public override IOperation Apply(IExecutionContext context) {
     49    public override IOperation Apply() {
    5050      IVRPEncoding solution = VRPToursParameter.ActualValue;
    5151      if (!(solution is ZhuEncoding)) {
     
    6262      }
    6363
    64       Manipulate(context, RandomParameter.ActualValue, VRPToursParameter.ActualValue as ZhuEncoding);
     64      Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as ZhuEncoding);
    6565
    66       return base.Apply(context);
     66      return base.Apply();
    6767    }
    6868  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Zhu/Manipulators/ZhuPermutationManipulator.cs

    r5177 r5178  
    4747    }
    4848
    49     protected override void Manipulate(IExecutionContext context, IRandom random, ZhuEncoding individual) {
     49    protected override void Manipulate(IRandom random, ZhuEncoding individual) {
    5050      InnerManipulatorParameter.ActualValue.PermutationParameter.ActualName = VRPToursParameter.ActualName;
    5151
    52       IAtomicOperation op = context.CreateOperation(
    53         InnerManipulatorParameter.ActualValue, context.Scope);
     52      IAtomicOperation op = this.ExecutionContext.CreateOperation(
     53        InnerManipulatorParameter.ActualValue, this.ExecutionContext.Scope);
    5454      op.Operator.Execute((IExecutionContext)op);
    5555    }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Evaluators/VRPEvaluator.cs

    r5177 r5178  
    214214    }
    215215
    216     public sealed override IOperation Apply(IExecutionContext context) {
     216    public sealed override IOperation Apply() {
    217217      IVRPEncoding solution = VRPToursParameter.ActualValue;
    218218
     
    229229      TardinessParameter.ActualValue = new DoubleValue(sumEval.Tardiness);
    230230
    231       return base.Apply(context);
     231      return base.Apply();
    232232    }
    233233  }
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/MoveEvaluators/VRPMoveEvaluator.cs

    r5177 r5178  
    9999    protected abstract TourEvaluation GetMoveQuality();
    100100
    101     public override IOperation Apply(IExecutionContext context) {
     101    public override IOperation Apply() {
    102102      TourEvaluation tourEval = GetMoveQuality();
    103103
     
    109109      MoveTravelTimeParameter.ActualValue = new DoubleValue(tourEval.TravelTime);
    110110
    111       return base.Apply(context);
     111      return base.Apply();
    112112    }
    113113  }
Note: See TracChangeset for help on using the changeset viewer.