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/Prins/Crossovers/PrinsPermutationCrossover.cs

    r4722 r5177  
    4545    }
    4646
    47     protected override PrinsEncoding Crossover(IRandom random, PrinsEncoding parent1, PrinsEncoding parent2) {
     47    protected override PrinsEncoding Crossover(IExecutionContext context, 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 = this.ExecutionContext.CreateOperation(
    53         InnerCrossoverParameter.ActualValue, this.ExecutionContext.Scope);
     52      IAtomicOperation op = context.CreateOperation(
     53        InnerCrossoverParameter.ActualValue, context.Scope);
    5454      op.Operator.Execute((IExecutionContext)op);
    5555
    5656      string childName = InnerCrossoverParameter.ActualValue.ChildParameter.ActualName;
    57       if (ExecutionContext.Scope.Variables.ContainsKey(childName)) {
    58         Permutation permutation = ExecutionContext.Scope.Variables[childName].Value as Permutation;
    59         ExecutionContext.Scope.Variables.Remove(childName);
     57      if (context.Scope.Variables.ContainsKey(childName)) {
     58        Permutation permutation = context.Scope.Variables[childName].Value as Permutation;
     59        context.Scope.Variables.Remove(childName);
    6060
    6161        return new PrinsEncoding(permutation, Cities,
Note: See TracChangeset for help on using the changeset viewer.