Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/25/11 14:10:06 (14 years ago)
Author:
svonolfe
Message:

Implemented first version of success progress analysis (#1392)

Location:
branches/SuccessProgressAnalysis
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/SuccessProgressAnalysis/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj

    r5163 r5372  
    1212    <AssemblyName>HeuristicLab.Analysis-3.3</AssemblyName>
    1313    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    14     <TargetFrameworkProfile></TargetFrameworkProfile>
     14    <TargetFrameworkProfile>
     15    </TargetFrameworkProfile>
    1516    <FileAlignment>512</FileAlignment>
    1617    <SignAssembly>true</SignAssembly>
     
    136137    <Compile Include="HeuristicLabAnalysisPlugin.cs" />
    137138    <Compile Include="Properties\AssemblyInfo.cs" />
     139    <Compile Include="SuccessProgressAnalysis\SuccessProgressAnalyzer.cs" />
    138140    <Compile Include="ValueAnalysis\MinAverageMaxValueAnalyzer.cs" />
    139141    <Compile Include="ValueAnalysis\MinAverageMaxValueCalculator.cs" />
  • branches/SuccessProgressAnalysis/HeuristicLab.Operators/3.3/StochasticMultiBranch.cs

    r4722 r5372  
    4949      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    5050    }
     51    public ValueLookupParameter<StringValue> ExecutedOperatorParameter {
     52      get { return (ValueLookupParameter<StringValue>)Parameters["ExecutedOperator"]; }
     53    }
    5154
    5255    public DoubleArray Probabilities {
    5356      get { return ProbabilitiesParameter.Value; }
    5457      set { ProbabilitiesParameter.Value = value; }
     58    }
     59
     60    [StorableHook(HookType.AfterDeserialization)]
     61    private void AfterDeserializationHook() {
     62      #region Backwards Compatibility
     63      if (!Parameters.ContainsKey("ExecutedOperator")) {
     64        Parameters.Add(new ValueLookupParameter<StringValue>("ExecutedOperator", "The operator that was executed."));
     65      }
     66      #endregion
    5567    }
    5668
     
    6880      Parameters.Add(new ValueLookupParameter<DoubleArray>("Probabilities", "The array of relative probabilities for each operator.", new DoubleArray()));
    6981      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
     82      Parameters.Add(new ValueLookupParameter<StringValue>("ExecutedOperator", "The operator that was executed."));
    7083    }
    7184
     
    133146      OperationCollection next = new OperationCollection(base.Apply());
    134147      if (successor != null) {
     148        ExecutedOperatorParameter.ActualValue = new StringValue(successor.GetType().Name);
     149
    135150        if (CreateChildOperation)
    136151          next.Insert(0, ExecutionContext.CreateChildOperation(successor));
    137152        else next.Insert(0, ExecutionContext.CreateOperation(successor));
     153      } else {
     154        ExecutedOperatorParameter.ActualValue = new StringValue("");
    138155      }
    139156      return next;
Note: See TracChangeset for help on using the changeset viewer.