- Timestamp:
- 07/23/20 16:21:55 (4 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Clients.OKB/3.3/RunCreation
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyMultiObjectiveProblem.cs
r17226 r17695 20 20 #endregion 21 21 22 using HEAL.Attic; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Optimization; 25 using HEAL.Attic;26 26 using HeuristicLab.PluginInfrastructure; 27 27 … … 30 30 [StorableType("1AD8A6B9-1B3E-40BA-BAE2-8EAD31793B7D")] 31 31 [NonDiscoverableType] 32 public sealed class EmptyMultiObjectiveProblem : MultiObjectiveHeuristicOptimizationProblem<EmptyMultiObjectiveEvaluator , EmptySolutionCreator> {32 public sealed class EmptyMultiObjectiveProblem : MultiObjectiveHeuristicOptimizationProblem<EmptyMultiObjectiveEvaluator> { 33 33 public override bool CanChangeName { 34 34 get { return false; } … … 41 41 private EmptyMultiObjectiveProblem(StorableConstructorFlag _) : base(_) { } 42 42 private EmptyMultiObjectiveProblem(EmptyMultiObjectiveProblem original, Cloner cloner) : base(original, cloner) { } 43 public EmptyMultiObjectiveProblem() : base(new EmptyMultiObjectiveEvaluator() , new EmptySolutionCreator()) { }44 public EmptyMultiObjectiveProblem(string exceptionMessage) : base(new EmptyMultiObjectiveEvaluator(exceptionMessage) , new EmptySolutionCreator(exceptionMessage)) { }43 public EmptyMultiObjectiveProblem() : base(new EmptyMultiObjectiveEvaluator()) { } 44 public EmptyMultiObjectiveProblem(string exceptionMessage) : base(new EmptyMultiObjectiveEvaluator(exceptionMessage)) { } 45 45 46 46 public override IDeepCloneable Clone(Cloner cloner) { -
branches/2521_ProblemRefactoring/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyProblem.cs
r17226 r17695 20 20 #endregion 21 21 22 using HEAL.Attic; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Optimization; 25 using HEAL.Attic;26 26 using HeuristicLab.PluginInfrastructure; 27 27 … … 30 30 [StorableType("10132D57-7177-42A2-97B9-B77D89AADE6A")] 31 31 [NonDiscoverableType] 32 public sealed class EmptyProblem : HeuristicOptimizationProblem<EmptyEvaluator , EmptySolutionCreator> {32 public sealed class EmptyProblem : HeuristicOptimizationProblem<EmptyEvaluator> { 33 33 public override bool CanChangeName { 34 34 get { return false; } … … 43 43 public EmptyProblem() 44 44 : base() { 45 SolutionCreator = new EmptySolutionCreator();46 45 Evaluator = new EmptyEvaluator(); 47 46 } 48 47 public EmptyProblem(string exceptionMessage) 49 48 : base() { 50 SolutionCreator = new EmptySolutionCreator(exceptionMessage);51 49 Evaluator = new EmptyEvaluator(exceptionMessage); 52 50 } -
branches/2521_ProblemRefactoring/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySingleObjectiveProblem.cs
r17226 r17695 20 20 #endregion 21 21 22 using HEAL.Attic; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Optimization; 25 using HEAL.Attic;26 26 using HeuristicLab.PluginInfrastructure; 27 27 … … 30 30 [StorableType("12D022A4-6DC4-4840-9EE7-F1EEB7A408F6")] 31 31 [NonDiscoverableType] 32 public sealed class EmptySingleObjectiveProblem : SingleObjectiveHeuristicOptimizationProblem<EmptySingleObjectiveEvaluator , EmptySolutionCreator> {32 public sealed class EmptySingleObjectiveProblem : SingleObjectiveHeuristicOptimizationProblem<EmptySingleObjectiveEvaluator> { 33 33 public override bool CanChangeName { 34 34 get { return false; } … … 41 41 private EmptySingleObjectiveProblem(StorableConstructorFlag _) : base(_) { } 42 42 private EmptySingleObjectiveProblem(EmptySingleObjectiveProblem original, Cloner cloner) : base(original, cloner) { } 43 public EmptySingleObjectiveProblem() : base(new EmptySingleObjectiveEvaluator() , new EmptySolutionCreator()) { }44 public EmptySingleObjectiveProblem(string exceptionMessage) : base(new EmptySingleObjectiveEvaluator(exceptionMessage) , new EmptySolutionCreator(exceptionMessage)) { }43 public EmptySingleObjectiveProblem() : base(new EmptySingleObjectiveEvaluator()) { } 44 public EmptySingleObjectiveProblem(string exceptionMessage) : base(new EmptySingleObjectiveEvaluator(exceptionMessage)) { } 45 45 46 46 public override IDeepCloneable Clone(Cloner cloner) { -
branches/2521_ProblemRefactoring/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBProblem.cs
r17612 r17695 61 61 OnDescriptionChanged(); 62 62 OnProblemChanged(); 63 OnSolutionCreatorChanged();64 63 OnEvaluatorChanged(); 65 64 OnOperatorsChanged(); … … 105 104 public IKeyedItemCollection<string, IParameter> Parameters { 106 105 get { return Problem.Parameters; } 107 }108 109 public IParameter SolutionCreatorParameter {110 get { return Problem.SolutionCreatorParameter; }111 }112 public ISolutionCreator SolutionCreator {113 get { return Problem.SolutionCreator; }114 106 } 115 107 public IParameter EvaluatorParameter { … … 210 202 if (handler != null) handler(this, EventArgs.Empty); 211 203 } 212 public event EventHandler SolutionCreatorChanged;213 protected virtual void OnSolutionCreatorChanged() {214 var handler = SolutionCreatorChanged;215 if (handler != null) handler(this, EventArgs.Empty);216 }217 204 public event EventHandler EvaluatorChanged; 218 205 protected virtual void OnEvaluatorChanged() { … … 238 225 Problem.NameChanged += new EventHandler(Problem_NameChanged); 239 226 Problem.DescriptionChanged += new EventHandler(Problem_DescriptionChanged); 240 Problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged);241 227 Problem.EvaluatorChanged += new EventHandler(Problem_EvaluatorChanged); 242 228 Problem.OperatorsChanged += new EventHandler(Problem_OperatorsChanged); … … 251 237 Problem.NameChanged -= new EventHandler(Problem_NameChanged); 252 238 Problem.DescriptionChanged -= new EventHandler(Problem_DescriptionChanged); 253 Problem.SolutionCreatorChanged -= new EventHandler(Problem_SolutionCreatorChanged);254 239 Problem.EvaluatorChanged -= new EventHandler(Problem_EvaluatorChanged); 255 240 Problem.OperatorsChanged -= new EventHandler(Problem_OperatorsChanged); … … 273 258 OnDescriptionChanged(); 274 259 } 275 private void Problem_SolutionCreatorChanged(object sender, EventArgs e) {276 OnSolutionCreatorChanged();277 }278 260 private void Problem_EvaluatorChanged(object sender, EventArgs e) { 279 261 OnEvaluatorChanged();
Note: See TracChangeset
for help on using the changeset viewer.