- Timestamp:
- 05/15/19 13:36:51 (6 years ago)
- Location:
- branches/2457_ExpertSystem/HeuristicLab.Optimization
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2457_ExpertSystem/HeuristicLab.Optimization
- Property svn:mergeinfo changed
-
branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.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. … … 30 30 using HeuristicLab.Core; 31 31 using HeuristicLab.Data; 32 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;32 using HEAL.Attic; 33 33 34 34 namespace HeuristicLab.Optimization { … … 37 37 /// </summary> 38 38 [Item("Algorithm", "A base class for algorithms.")] 39 [Storable Class]39 [StorableType("7879C550-E8C2-4121-84C3-DADB06BD5C96")] 40 40 public abstract class Algorithm : ParameterizedNamedItem, IAlgorithm { 41 41 public static new Image StaticItemImage { … … 171 171 } 172 172 [StorableConstructor] 173 protected Algorithm( bool deserializing) : base(deserializing) { }173 protected Algorithm(StorableConstructorFlag _) : base(_) { } 174 174 [StorableHook(HookType.AfterDeserialization)] 175 175 private void AfterDeserialization() { -
branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Algorithms/BasicAlgorithm.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.Common; 25 25 using HeuristicLab.Core; 26 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HEAL.Attic; 27 27 28 28 namespace HeuristicLab.Optimization { 29 [Storable Class]29 [StorableType("EFBEE5EB-B15B-4FBB-A210-C4E36898B89D")] 30 30 public abstract class BasicAlgorithm : Algorithm, IStorableContent { 31 31 … … 36 36 37 37 public abstract bool SupportsPause { get; } 38 public virtual bool SupportsStop { 39 get { return true; } 40 } 38 41 39 42 [Storable] … … 52 55 53 56 [StorableConstructor] 54 protected BasicAlgorithm( bool deserializing) : base(deserializing) { }57 protected BasicAlgorithm(StorableConstructorFlag _) : base(_) { } 55 58 protected BasicAlgorithm(BasicAlgorithm original, Cloner cloner) 56 59 : base(original, cloner) { … … 106 109 // CancellationToken.ThrowIfCancellationRequested() must be called from within the Run method, otherwise stop does nothing 107 110 // alternatively check the IsCancellationRequested property of the cancellation token 111 if (!SupportsStop) 112 throw new NotSupportedException("Stop is not supported by this algorithm."); 113 108 114 base.Stop(); 109 115 if (ExecutionState == ExecutionState.Paused) OnStopped(); -
branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Algorithms/EngineAlgorithm.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.Common; 25 25 using HeuristicLab.Core; 26 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HEAL.Attic; 27 27 using HeuristicLab.PluginInfrastructure; 28 28 … … 32 32 /// </summary> 33 33 [Item("EngineAlgorithm", "A base class for algorithms which use an engine for execution.")] 34 [Storable Class]34 [StorableType("C3D2307F-9B15-4D3B-900E-616B58268ED6")] 35 35 public abstract class EngineAlgorithm : Algorithm { 36 36 [Storable] … … 113 113 } 114 114 [StorableConstructor] 115 protected EngineAlgorithm( bool deserializing) : base(deserializing) { }115 protected EngineAlgorithm(StorableConstructorFlag _) : base(_) { } 116 116 [StorableHook(HookType.AfterDeserialization)] 117 117 private void AfterDeserialization() { -
branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Algorithms/HeuristicOptimizationAlgorithm.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 HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;25 using HEAL.Attic; 26 26 27 27 namespace HeuristicLab.Optimization { … … 30 30 /// </summary> 31 31 [Item("Heuristic Optimization Algorithm", "A base class for heuristic optimization algorithms.")] 32 [Storable Class]32 [StorableType("13388EBE-E463-4A64-BCE4-77A631CB5DA0")] 33 33 public abstract class HeuristicOptimizationAlgorithm : Algorithm { 34 34 public new IHeuristicOptimizationProblem Problem { … … 44 44 45 45 [StorableConstructor] 46 protected HeuristicOptimizationAlgorithm( bool deserializing) : base(deserializing) { }46 protected HeuristicOptimizationAlgorithm(StorableConstructorFlag _) : base(_) { } 47 47 protected HeuristicOptimizationAlgorithm(HeuristicOptimizationAlgorithm original, Cloner cloner) : base(original, cloner) { } 48 48 -
branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Algorithms/HeuristicOptimizationEngineAlgorithm.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 HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;25 using HEAL.Attic; 26 26 27 27 namespace HeuristicLab.Optimization { … … 30 30 /// </summary> 31 31 [Item("Heuristic Optimization Enigne Algorithm", "A base class for heuristic optimization algorithms using an execution engine.")] 32 [Storable Class]32 [StorableType("A741CA8C-D4DC-4917-8F71-95EA31C97890")] 33 33 public abstract class HeuristicOptimizationEngineAlgorithm : EngineAlgorithm { 34 34 public new IHeuristicOptimizationProblem Problem { … … 44 44 45 45 [StorableConstructor] 46 protected HeuristicOptimizationEngineAlgorithm( bool deserializing) : base(deserializing) { }46 protected HeuristicOptimizationEngineAlgorithm(StorableConstructorFlag _) : base(_) { } 47 47 protected HeuristicOptimizationEngineAlgorithm(HeuristicOptimizationEngineAlgorithm original, Cloner cloner) : base(original, cloner) { } 48 48 -
branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Algorithms/UserDefinedAlgorithm.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 HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;25 using HEAL.Attic; 26 26 27 27 namespace HeuristicLab.Optimization { … … 31 31 [Item("User-Defined Algorithm", "An algorithm which can be defined by the user.")] 32 32 [Creatable(CreatableAttribute.Categories.Algorithms, Priority = 100)] 33 [Storable Class]33 [StorableType("8D1C0ED9-F732-4DE3-8F6C-125DFF9E8D5E")] 34 34 public sealed class UserDefinedAlgorithm : EngineAlgorithm, IParameterizedItem, IStorableContent { 35 35 public string Filename { get; set; } … … 71 71 public UserDefinedAlgorithm(string name, string description) : base(name, description) { } 72 72 [StorableConstructor] 73 private UserDefinedAlgorithm( bool deserializing) : base(deserializing) { }73 private UserDefinedAlgorithm(StorableConstructorFlag _) : base(_) { } 74 74 private UserDefinedAlgorithm(UserDefinedAlgorithm original, Cloner cloner) 75 75 : base(original, cloner) {
Note: See TracChangeset
for help on using the changeset viewer.