Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/05/15 15:35:15 (10 years ago)
Author:
pfleck
Message:

#2350

  • Changed PopulationSize parameter to IntValue.
  • Implemented TryMoveUp procedure in AlpsSsMover.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/RandomLayerProcessor.cs

    r12136 r12142  
    4141    }
    4242
    43     private ILookupParameter<IntArray> PopulationSizeParameter {
    44       get { return (ILookupParameter<IntArray>)Parameters["PopulationSize"]; }
    45     }
    46 
    4743    public IOperator Operator {
    4844      get { return OperatorParameter.Value; }
     
    5955      Parameters.Add(new OperatorParameter("Operator", "The operator which should be applied on a random sub-scopes of the current scope."));
    6056      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
    61 
    62       Parameters.Add(new LookupParameter<IntArray>("PopulationSize"));
    6357    }
    6458
     
    7468        var subScopes = ExecutionContext.Scope.SubScopes;
    7569        int index = random.Next(subScopes.Count);
    76         var selectedLayer = subScopes[index];
    77 
    78         var layerParameters = new LayerIntermediateParameter {
    79             new ValueParameter<IntValue>(PopulationSizeParameter.ActualName, new IntValue(PopulationSizeParameter.ActualValue[Math.Min(index, PopulationSizeParameter.ActualValue.Length - 1)]))
    80           };
    81         var immediateContext = new ExecutionContext(ExecutionContext.Parent, layerParameters, selectedLayer);
    82         next.Insert(0, immediateContext.CreateChildOperation(Operator, selectedLayer));
     70        next.Insert(0, ExecutionContext.CreateOperation(Operator, subScopes[index]));
    8371      }
    8472      return next;
Note: See TracChangeset for help on using the changeset viewer.