Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/04/19 08:22:42 (6 years ago)
Author:
gkronber
Message:

#2925 merged r16661:16890 from trunk to branch

Location:
branches/2925_AutoDiffForDynamicalModels
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2925_AutoDiffForDynamicalModels

  • branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Optimization

  • branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Optimization/3.3/Problems/Problem.cs

    r16662 r16892  
    2323using System.Collections.Generic;
    2424using System.Drawing;
     25using HEAL.Attic;
    2526using HeuristicLab.Collections;
    2627using HeuristicLab.Common;
     
    2829using HeuristicLab.Data;
    2930using HeuristicLab.Parameters;
    30 using HEAL.Attic;
    3131
    3232namespace HeuristicLab.Optimization {
     
    5252    protected Problem()
    5353      : base() {
    54       Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>(), false));
     54      Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>()) { GetsCollected = false });
    5555      OperatorsParameter.Hidden = true;
    5656      RegisterEventHandlers();
     
    6666        if (operators != null) {
    6767          Parameters.Remove(OperatorsParameterName);
    68           Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>(operators), false));
     68          Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>(operators)) { GetsCollected = false });
    6969          OperatorsParameter.Hidden = true;
    7070        }
     
    8484    // BackwardsCompatibility3.3
    8585    #region Backwards compatible code, remove with 3.4
    86     [Storable(Name = "Operators", AllowOneWay = true)]
     86    [Storable(OldName = "Operators")]
    8787    private IEnumerable<IOperator> StorableOperators {
    8888      set {
     
    9595        //necessary to convert old experiments files where no parameter was used for saving the operators
    9696        if (!Parameters.ContainsKey(OperatorsParameterName)) {
    97           Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>(), false));
     97          Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>()) { GetsCollected = false });
    9898          OperatorsParameter.Hidden = true;
    9999        }
     
    107107        #region Backwards compatible code, remove with 3.4
    108108        if (!Parameters.ContainsKey(OperatorsParameterName)) {
    109           Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>(), false));
     109          Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>()) { GetsCollected = false });
    110110          OperatorsParameter.Hidden = true;
    111111        }
  • branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Optimization/3.3/Problems/UserDefinedProblem.cs

    r16662 r16892  
    2525using System.Linq;
    2626using System.Threading;
     27using HEAL.Attic;
    2728using HeuristicLab.Collections;
    2829using HeuristicLab.Common;
     
    3031using HeuristicLab.Data;
    3132using HeuristicLab.Parameters;
    32 using HEAL.Attic;
    3333using HeuristicLab.PluginInfrastructure;
    3434
     
    130130        ItemList<IOperator> tmp = ((ValueParameter<ItemList<IOperator>>)Parameters["Operators"]).Value;
    131131        Parameters.Remove("Operators");
    132         Parameters.Add(new ValueParameter<ItemList<IItem>>("Operators", "The operators and items that the problem provides to the algorithms.", new ItemList<IItem>(tmp), false));
     132        Parameters.Add(new ValueParameter<ItemList<IItem>>("Operators", "The operators and items that the problem provides to the algorithms.", new ItemList<IItem>(tmp)) { GetsCollected = false });
    133133      }
    134134      #endregion
Note: See TracChangeset for help on using the changeset viewer.