- Timestamp:
- 05/15/19 13:36:51 (6 years ago)
- Location:
- branches/2457_ExpertSystem/HeuristicLab.Optimization
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2457_ExpertSystem/HeuristicLab.Optimization
- Property svn:mergeinfo changed
-
branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Problems/HeuristicOptimizationProblem.cs
r16075 r16956 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Parameters; 26 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HEAL.Attic; 27 27 28 28 namespace HeuristicLab.Optimization { 29 29 [Item("Heuristic Optimization Problem", "Represents the base class for a heuristic optimization problem.")] 30 [Storable Class]30 [StorableType("DE0478BA-3797-4AC3-9A89-3734D2643823")] 31 31 public abstract class HeuristicOptimizationProblem<T, U> : Problem, IHeuristicOptimizationProblem 32 32 where T : class,IEvaluator … … 36 36 37 37 [StorableConstructor] 38 protected HeuristicOptimizationProblem( bool deserializing) : base(deserializing) { }38 protected HeuristicOptimizationProblem(StorableConstructorFlag _) : base(_) { } 39 39 protected HeuristicOptimizationProblem(HeuristicOptimizationProblem<T, U> original, Cloner cloner) 40 40 : base(original, cloner) { -
branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Problems/MultiObjectiveHeuristicOptimizationProblem.cs
r16075 r16956 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 24 24 using HeuristicLab.Data; 25 25 using HeuristicLab.Parameters; 26 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HEAL.Attic; 27 27 28 28 namespace HeuristicLab.Optimization { 29 29 [Item("Multi-Objective Heuristic Optimization Problem", "A base class for multi-objective heuristic optimization problems.")] 30 [Storable Class]30 [StorableType("C46643E3-7144-4884-A30A-5329BD80DC4E")] 31 31 public abstract class MultiObjectiveHeuristicOptimizationProblem<T, U> : HeuristicOptimizationProblem<T, U>, IMultiObjectiveHeuristicOptimizationProblem 32 32 where T : class, IMultiObjectiveEvaluator … … 35 35 36 36 [StorableConstructor] 37 protected MultiObjectiveHeuristicOptimizationProblem( bool deserializing) : base(deserializing) { }37 protected MultiObjectiveHeuristicOptimizationProblem(StorableConstructorFlag _) : base(_) { } 38 38 protected MultiObjectiveHeuristicOptimizationProblem(MultiObjectiveHeuristicOptimizationProblem<T, U> original, Cloner cloner) : base(original, cloner) { } 39 39 protected MultiObjectiveHeuristicOptimizationProblem() -
branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Problems/Problem.cs
r16075 r16956 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 using System.Collections.Generic; 24 24 using System.Drawing; 25 using HEAL.Attic; 25 26 using HeuristicLab.Collections; 26 27 using HeuristicLab.Common; … … 28 29 using HeuristicLab.Data; 29 30 using HeuristicLab.Parameters; 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;31 31 32 32 namespace HeuristicLab.Optimization { 33 33 [Item("Problem", "Represents the base class for a problem.")] 34 [Storable Class]34 [StorableType("6DC97432-9BD1-4304-802A-1FC48A0E0468")] 35 35 public abstract class Problem : ParameterizedNamedItem, IProblem { 36 36 private const string OperatorsParameterName = "Operators"; … … 44 44 45 45 [StorableConstructor] 46 protected Problem( bool deserializing) : base(deserializing) { }46 protected Problem(StorableConstructorFlag _) : base(_) { } 47 47 protected Problem(Problem original, Cloner cloner) 48 48 : base(original, cloner) { … … 52 52 protected Problem() 53 53 : 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 }); 55 55 OperatorsParameter.Hidden = true; 56 56 RegisterEventHandlers(); … … 66 66 if (operators != null) { 67 67 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 }); 69 69 OperatorsParameter.Hidden = true; 70 70 } … … 84 84 // BackwardsCompatibility3.3 85 85 #region Backwards compatible code, remove with 3.4 86 [Storable( Name = "Operators", AllowOneWay = true)]86 [Storable(OldName = "Operators")] 87 87 private IEnumerable<IOperator> StorableOperators { 88 88 set { … … 95 95 //necessary to convert old experiments files where no parameter was used for saving the operators 96 96 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 }); 98 98 OperatorsParameter.Hidden = true; 99 99 } … … 107 107 #region Backwards compatible code, remove with 3.4 108 108 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 }); 110 110 OperatorsParameter.Hidden = true; 111 111 } -
branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Problems/SingleObjectiveHeuristicOptimizationProblem.cs
- Property svn:mergeinfo changed
r16075 r16956 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 24 24 using HeuristicLab.Data; 25 25 using HeuristicLab.Parameters; 26 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HEAL.Attic; 27 27 28 28 namespace HeuristicLab.Optimization { 29 29 [Item("Single-Objective Heuristic OptimizationProblem", "A base class for single-objective heuristic optimization problems.")] 30 [Storable Class]30 [StorableType("DFD5588E-6AB2-4712-9083-A405EF21226F")] 31 31 public abstract class SingleObjectiveHeuristicOptimizationProblem<T, U> : HeuristicOptimizationProblem<T, U>, ISingleObjectiveHeuristicOptimizationProblem 32 32 where T : class, ISingleObjectiveEvaluator … … 36 36 37 37 [StorableConstructor] 38 protected SingleObjectiveHeuristicOptimizationProblem( bool deserializing) : base(deserializing) { }38 protected SingleObjectiveHeuristicOptimizationProblem(StorableConstructorFlag _) : base(_) { } 39 39 protected SingleObjectiveHeuristicOptimizationProblem(SingleObjectiveHeuristicOptimizationProblem<T, U> original, Cloner cloner) : base(original, cloner) { } 40 40 protected SingleObjectiveHeuristicOptimizationProblem() -
branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Problems/UserDefinedProblem.cs
r16075 r16956 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 25 25 using System.Linq; 26 26 using System.Threading; 27 using HEAL.Attic; 27 28 using HeuristicLab.Collections; 28 29 using HeuristicLab.Common; … … 30 31 using HeuristicLab.Data; 31 32 using HeuristicLab.Parameters; 32 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;33 33 using HeuristicLab.PluginInfrastructure; 34 34 … … 39 39 [Item("User-Defined Problem", "A problem which can be defined by the user.")] 40 40 [Creatable(CreatableAttribute.Categories.Problems, Priority = 120)] 41 [Storable Class]41 [StorableType("9F18A098-A8B8-4F70-93CF-79FF1496AC8A")] 42 42 public sealed class UserDefinedProblem : ParameterizedNamedItem, ISingleObjectiveHeuristicOptimizationProblem, IStorableContent { 43 43 public string Filename { get; set; } … … 122 122 123 123 [StorableConstructor] 124 private UserDefinedProblem( bool deserializing) : base(deserializing) { }124 private UserDefinedProblem(StorableConstructorFlag _) : base(_) { } 125 125 [StorableHook(HookType.AfterDeserialization)] 126 126 private void AfterDeserialization() { … … 130 130 ItemList<IOperator> tmp = ((ValueParameter<ItemList<IOperator>>)Parameters["Operators"]).Value; 131 131 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 }); 133 133 } 134 134 #endregion … … 235 235 236 236 [Item("EmptyUserDefinedProblemEvaluator", "A dummy evaluator that will throw an exception when executed.")] 237 [Storable Class]237 [StorableType("E27E4145-6D44-4A9D-B15A-B0E0528ECD0D")] 238 238 [NonDiscoverableType] 239 239 private sealed class EmptyUserDefinedProblemEvaluator : ParameterizedNamedItem, ISingleObjectiveEvaluator { 240 240 241 241 [StorableConstructor] 242 private EmptyUserDefinedProblemEvaluator( bool deserializing) : base(deserializing) { }242 private EmptyUserDefinedProblemEvaluator(StorableConstructorFlag _) : base(_) { } 243 243 private EmptyUserDefinedProblemEvaluator(EmptyUserDefinedProblemEvaluator original, Cloner cloner) 244 244 : base(original, cloner) {
Note: See TracChangeset
for help on using the changeset viewer.