Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/26/10 03:51:30 (14 years ago)
Author:
swagner
Message:

Removed property ExecutionContext in Operator (#1333)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ParallelEngine/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaPermutationCrossover.cs

    r4722 r5177  
    4747    }
    4848
    49     protected override AlbaEncoding Crossover(IRandom random, AlbaEncoding parent1, AlbaEncoding parent2) {
     49    protected override AlbaEncoding Crossover(IExecutionContext context, 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 = this.ExecutionContext.CreateOperation(
    55         InnerCrossoverParameter.ActualValue, this.ExecutionContext.Scope);
     54      IAtomicOperation op = context.CreateOperation(
     55        InnerCrossoverParameter.ActualValue, context.Scope);
    5656      op.Operator.Execute((IExecutionContext)op);
    5757
    5858      string childName = InnerCrossoverParameter.ActualValue.ChildParameter.ActualName;
    59       if (ExecutionContext.Scope.Variables.ContainsKey(childName)) {
    60         Permutation permutation = ExecutionContext.Scope.Variables[childName].Value as Permutation;
    61         ExecutionContext.Scope.Variables.Remove(childName);
     59      if (context.Scope.Variables.ContainsKey(childName)) {
     60        Permutation permutation = context.Scope.Variables[childName].Value as Permutation;
     61        context.Scope.Variables.Remove(childName);
    6262
    6363        return new AlbaEncoding(permutation, Cities);
Note: See TracChangeset for help on using the changeset viewer.