Changeset 5372 for branches/SuccessProgressAnalysis/HeuristicLab.Operators/3.3/StochasticMultiBranch.cs
- Timestamp:
- 01/25/11 14:10:06 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SuccessProgressAnalysis/HeuristicLab.Operators/3.3/StochasticMultiBranch.cs
r4722 r5372 49 49 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } 50 50 } 51 public ValueLookupParameter<StringValue> ExecutedOperatorParameter { 52 get { return (ValueLookupParameter<StringValue>)Parameters["ExecutedOperator"]; } 53 } 51 54 52 55 public DoubleArray Probabilities { 53 56 get { return ProbabilitiesParameter.Value; } 54 57 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 55 67 } 56 68 … … 68 80 Parameters.Add(new ValueLookupParameter<DoubleArray>("Probabilities", "The array of relative probabilities for each operator.", new DoubleArray())); 69 81 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use.")); 82 Parameters.Add(new ValueLookupParameter<StringValue>("ExecutedOperator", "The operator that was executed.")); 70 83 } 71 84 … … 133 146 OperationCollection next = new OperationCollection(base.Apply()); 134 147 if (successor != null) { 148 ExecutedOperatorParameter.ActualValue = new StringValue(successor.GetType().Name); 149 135 150 if (CreateChildOperation) 136 151 next.Insert(0, ExecutionContext.CreateChildOperation(successor)); 137 152 else next.Insert(0, ExecutionContext.CreateOperation(successor)); 153 } else { 154 ExecutedOperatorParameter.ActualValue = new StringValue(""); 138 155 } 139 156 return next;
Note: See TracChangeset
for help on using the changeset viewer.