Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/01/11 17:48:53 (13 years ago)
Author:
mkommend
Message:

#1479: Integrated trunk changes.

Location:
branches/GP.Grammar.Editor/HeuristicLab.Optimization.Operators/3.3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/GP.Grammar.Editor/HeuristicLab.Optimization.Operators/3.3/DiscreteDoubleValueModifier.cs

    r5445 r6618  
    3434  [StorableClass]
    3535  public abstract class DiscreteDoubleValueModifier : SingleSuccessorOperator, IDiscreteDoubleValueModifier {
     36    #region parameter properties
    3637    /// <summary>
    3738    /// The parameter that should be modified.
     
    7071      get { return (IValueLookupParameter<IntValue>)Parameters["EndIndex"]; }
    7172    }
    72 
     73    #endregion
    7374    [StorableConstructor]
    7475    protected DiscreteDoubleValueModifier(bool deserializing) : base(deserializing) { }
  • branches/GP.Grammar.Editor/HeuristicLab.Optimization.Operators/3.3/HeuristicLabOptimizationOperatorsPlugin.cs.frame

    r6099 r6618  
    2626  /// Plugin class for HeuristicLab.Optimization.Operators plugin.
    2727  /// </summary>
    28   [Plugin("HeuristicLab.Optimization.Operators", "3.3.4.$WCREV$")]
     28  [Plugin("HeuristicLab.Optimization.Operators", "3.3.5.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Optimization.Operators-3.3.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Collections", "3.3")]
  • branches/GP.Grammar.Editor/HeuristicLab.Optimization.Operators/3.3/Properties/AssemblyInfo.frame

    r6099 r6618  
    5454// by using the '*' as shown below:
    5555[assembly: AssemblyVersion("3.3.0.0")]
    56 [assembly: AssemblyFileVersion("3.3.4.$WCREV$")]
     56[assembly: AssemblyFileVersion("3.3.5.$WCREV$")]
  • branches/GP.Grammar.Editor/HeuristicLab.Optimization.Operators/3.3/SolutionsCreator.cs

    r5445 r6618  
    4343      get { return (ValueLookupParameter<IOperator>)Parameters["Evaluator"]; }
    4444    }
     45    public ValueLookupParameter<BoolValue> ParallelParameter {
     46      get { return (ValueLookupParameter<BoolValue>)Parameters["Parallel"]; }
     47    }
    4548    private ScopeParameter CurrentScopeParameter {
    4649      get { return (ScopeParameter)Parameters["CurrentScope"]; }
     
    6265      Parameters.Add(new ValueLookupParameter<IOperator>("SolutionCreator", "The operator which is used to create new solutions."));
    6366      Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator", "The operator which is used to evaluate new solutions. This operator is executed in parallel, if an engine is used which supports parallelization."));
    64       Parameters.Add(new ScopeParameter("CurrentScope", "The current scope to which the new solutions are added as sub-scopes."));
     67      Parameters.Add(new ValueLookupParameter<BoolValue>("Parallel", "True if the operator should be applied in parallel on all sub-scopes, otherwise false.", new BoolValue(true)));
     68      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope to which the new solutions are added as sub-scopes."));     
     69    }
     70    [StorableHook(HookType.AfterDeserialization)]
     71    private void AfterDeserialization() {
     72      if (!Parameters.ContainsKey("Parallel")) Parameters.Add(new ValueLookupParameter<BoolValue>("Parallel", "True if the operator should be applied in parallel on all sub-scopes, otherwise false.", new BoolValue(true))); // backwards compatibility
    6573    }
    6674
     
    7381      IOperator creator = SolutionCreatorParameter.ActualValue;
    7482      IOperator evaluator = EvaluatorParameter.ActualValue;
     83      bool parallel = ParallelParameter.ActualValue.Value;
    7584
    7685      int current = CurrentScope.SubScopes.Count;
     
    7988
    8089      OperationCollection creation = new OperationCollection();
    81       OperationCollection evaluation = new OperationCollection() { Parallel = true };
     90      OperationCollection evaluation = new OperationCollection() { Parallel = parallel };
    8291      for (int i = 0; i < count; i++) {
    8392        if (creator != null) creation.Add(ExecutionContext.CreateOperation(creator, CurrentScope.SubScopes[current + i]));
Note: See TracChangeset for help on using the changeset viewer.