Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/05/13 15:28:06 (11 years ago)
Author:
mkommend
Message:

#2038: Added backwards compatibility regions into the modified algorithms for elites reevaluation.

Location:
trunk/sources/HeuristicLab.Algorithms.RAPGA/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.RAPGA/3.3/RAPGA.cs

    r9569 r9591  
    200200    [StorableHook(HookType.AfterDeserialization)]
    201201    private void AfterDeserialization() {
     202      #region Backwards compatible code, remove with 3.4
    202203      if (!Parameters.ContainsKey("ReevaluateElites")) {
    203204        Parameters.Add(new FixedValueParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)", (BoolValue)new BoolValue(false).AsReadOnly()) { Hidden = true });
    204205      }
     206      #endregion
    205207      Initialize();
    206208    }
  • trunk/sources/HeuristicLab.Algorithms.RAPGA/3.3/RAPGAMainLoop.cs

    r9569 r9591  
    119119    public override IDeepCloneable Clone(Cloner cloner) {
    120120      return new RAPGAMainLoop(this, cloner);
     121    }
     122
     123    [StorableHook(HookType.AfterDeserialization)]
     124    private void AfterDeserialization() {
     125      #region Backwards compatible code, remove with 3.4
     126      if (!Parameters.ContainsKey("ReevaluateElites")) {
     127        Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)"));
     128      }
     129      #endregion
    121130    }
    122131
Note: See TracChangeset for help on using the changeset viewer.