- Timestamp:
- 07/07/15 09:19:43 (10 years ago)
- Location:
- branches/TimeLimitRunOptimizer/HeuristicLab.Optimization
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/TimeLimitRunOptimizer/HeuristicLab.Optimization
- Property svn:mergeinfo changed
/branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Optimization (added) merged: 12031,12105,12247,12505 /trunk/sources/HeuristicLab.Optimization merged: 12114,12504,12509,12524,12617
- Property svn:mergeinfo changed
-
branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/Algorithms/UserDefinedAlgorithm.cs
r12118 r12625 30 30 /// </summary> 31 31 [Item("User-Defined Algorithm", "An algorithm which can be defined by the user.")] 32 [Creatable( "Algorithms")]32 [Creatable(CreatableAttribute.Categories.Algorithms, Priority = 100)] 33 33 [StorableClass] 34 34 public sealed class UserDefinedAlgorithm : EngineAlgorithm, IParameterizedItem, IStorableContent { -
branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiObjectiveEvaluator.cs
r12012 r12625 31 31 [Item("Multi-objective Evaluator", "Calls the Evaluate method of the problem definition and writes the return value into the scope.")] 32 32 [StorableClass] 33 public class MultiObjectiveEvaluator : SingleSuccessorOperator, IMultiObjectiveEvaluationOperator, IStochasticOperator {33 public class MultiObjectiveEvaluator : InstrumentedOperator, IMultiObjectiveEvaluationOperator, IStochasticOperator { 34 34 35 35 public ILookupParameter<IRandom> RandomParameter { … … 60 60 } 61 61 62 public override IOperation Apply() {62 public override IOperation InstrumentedApply() { 63 63 var random = RandomParameter.ActualValue; 64 64 var encoding = EncodingParameter.ActualValue; 65 65 var individual = encoding.GetIndividual(ExecutionContext.Scope); 66 66 QualitiesParameter.ActualValue = new DoubleArray(EvaluateFunc(individual, random)); 67 return base. Apply();67 return base.InstrumentedApply(); 68 68 } 69 69 } -
branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveEvaluator.cs
r12012 r12625 31 31 [Item("Single-objective Evaluator", "Calls the script's Evaluate method to get the quality value of the parameter vector.")] 32 32 [StorableClass] 33 public sealed class SingleObjectiveEvaluator : SingleSuccessorOperator, ISingleObjectiveEvaluationOperator, IStochasticOperator {33 public sealed class SingleObjectiveEvaluator : InstrumentedOperator, ISingleObjectiveEvaluationOperator, IStochasticOperator { 34 34 35 35 public ILookupParameter<IRandom> RandomParameter { … … 58 58 public override IDeepCloneable Clone(Cloner cloner) { return new SingleObjectiveEvaluator(this, cloner); } 59 59 60 public override IOperation Apply() {60 public override IOperation InstrumentedApply() { 61 61 var random = RandomParameter.ActualValue; 62 62 var encoding = EncodingParameter.ActualValue; 63 63 var individual = encoding.GetIndividual(ExecutionContext.Scope); 64 64 QualityParameter.ActualValue = new DoubleValue(EvaluateFunc(individual, random)); 65 return base. Apply();65 return base.InstrumentedApply(); 66 66 } 67 67 } -
branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/MetaOptimizers/BatchRun.cs
r12118 r12625 36 36 /// </summary> 37 37 [Item("Batch Run", "A run in which an optimizer is executed a given number of times.")] 38 [Creatable( "Testing & Analysis")]38 [Creatable(CreatableAttribute.Categories.TestingAndAnalysis, Priority = 110)] 39 39 [StorableClass] 40 40 public sealed class BatchRun : NamedItem, IOptimizer, IStorableContent { … … 237 237 batchRunAction = BatchRunAction.Prepare; 238 238 // a race-condition may occur when the optimizer has changed the state by itself in the meantime 239 try { Optimizer.Prepare(clearRuns); } catch (InvalidOperationException) { } 239 try { Optimizer.Prepare(clearRuns); } 240 catch (InvalidOperationException) { } 240 241 } else { 241 242 ExecutionState = ExecutionState.Stopped; … … 249 250 if (Optimizer.ExecutionState == ExecutionState.Stopped) Optimizer.Prepare(); 250 251 // a race-condition may occur when the optimizer has changed the state by itself in the meantime 251 try { Optimizer.Start(); } catch (InvalidOperationException) { } 252 try { Optimizer.Start(); } 253 catch (InvalidOperationException) { } 252 254 } 253 255 public void Pause() { … … 258 260 if (Optimizer.ExecutionState != ExecutionState.Started) return; 259 261 // a race-condition may occur when the optimizer has changed the state by itself in the meantime 260 try { Optimizer.Pause(); } catch (InvalidOperationException) { } 262 try { Optimizer.Pause(); } 263 catch (InvalidOperationException) { } 261 264 } 262 265 public void Stop() { … … 270 273 } 271 274 // a race-condition may occur when the optimizer has changed the state by itself in the meantime 272 try { Optimizer.Stop(); } catch (InvalidOperationException) { } 275 try { Optimizer.Stop(); } 276 catch (InvalidOperationException) { } 273 277 } 274 278 -
branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/MetaOptimizers/Experiment.cs
r12118 r12625 34 34 /// </summary> 35 35 [Item("Experiment", "An experiment which contains multiple algorithms, batch runs or other experiments.")] 36 [Creatable( "Testing & Analysis")]36 [Creatable(CreatableAttribute.Categories.TestingAndAnalysis, Priority = 100)] 37 37 [StorableClass] 38 38 public sealed class Experiment : NamedItem, IOptimizer, IStorableContent { … … 180 180 foreach (IOptimizer optimizer in Optimizers.Where(x => x.ExecutionState != ExecutionState.Started)) { 181 181 // a race-condition may occur when the optimizer has changed the state by itself in the meantime 182 try { optimizer.Prepare(clearRuns); } catch (InvalidOperationException) { } 182 try { optimizer.Prepare(clearRuns); } 183 catch (InvalidOperationException) { } 183 184 } 184 185 } … … 193 194 if (optimizer != null) { 194 195 // a race-condition may occur when the optimizer has changed the state by itself in the meantime 195 try { optimizer.Start(); } catch (InvalidOperationException) { } 196 try { optimizer.Start(); } 197 catch (InvalidOperationException) { } 196 198 } 197 199 } … … 205 207 foreach (IOptimizer optimizer in Optimizers.Where(x => x.ExecutionState == ExecutionState.Started)) { 206 208 // a race-condition may occur when the optimizer has changed the state by itself in the meantime 207 try { optimizer.Pause(); } catch (InvalidOperationException) { } 209 try { optimizer.Pause(); } 210 catch (InvalidOperationException) { } 208 211 } 209 212 } … … 218 221 foreach (var optimizer in Optimizers.Where(x => (x.ExecutionState == ExecutionState.Started) || (x.ExecutionState == ExecutionState.Paused))) { 219 222 // a race-condition may occur when the optimizer has changed the state by itself in the meantime 220 try { optimizer.Stop(); } catch (InvalidOperationException) { } 223 try { optimizer.Stop(); } 224 catch (InvalidOperationException) { } 221 225 } 222 226 } else { -
branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/MetaOptimizers/TimeLimitRun.cs
r12128 r12625 36 36 /// A run in which an algorithm is executed for a certain maximum time only. 37 37 /// </summary> 38 [Item("Time Limit Run", "A run in which an optimizer is executed a certain maximum time.")]39 [Creatable( "Testing & Analysis")]38 [Item("Timelimit Run", "A run in which an optimizer is executed a certain maximum time.")] 39 [Creatable(CreatableAttribute.Categories.TestingAndAnalysis, Priority = 115)] 40 40 [StorableClass] 41 41 public sealed class TimeLimitRun : NamedItem, IOptimizer, IStorableContent, INotifyPropertyChanged { -
branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/Problems/SingleObjectiveHeuristicOptimizationProblem.cs
-
branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/Problems/UserDefinedProblem.cs
r12118 r12625 38 38 /// </summary> 39 39 [Item("User-Defined Problem", "A problem which can be defined by the user.")] 40 [Creatable( "Problems")]40 [Creatable(CreatableAttribute.Categories.Problems, Priority = 120)] 41 41 [StorableClass] 42 42 public sealed class UserDefinedProblem : ParameterizedNamedItem, ISingleObjectiveHeuristicOptimizationProblem, IStorableContent { -
branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/RunCollection.cs
r12118 r12625 32 32 namespace HeuristicLab.Optimization { 33 33 [Item("Run Collection", "Represents a collection of runs.")] 34 [Creatable( "Testing & Analysis")]34 [Creatable(CreatableAttribute.Categories.TestingAndAnalysis, Priority = 120)] 35 35 [StorableClass] 36 36 public class RunCollection : ItemCollection<IRun>, IStringConvertibleMatrix, IStorableContent { -
branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/RunCollectionModification/RunCollectionFormulaModifer.cs
r12118 r12625 68 68 variables (run parameters or results): 69 69 unquoted or in double quotes if they contain special characters or whitespace 70 mathematical functions :71 +, -, /, ^ (power), log70 mathematical functions (resulting in double values): 71 +, -, *, /, ^ (power), log 72 72 predicates: 73 73 ==, <, >, isnull, not 74 conversions: 75 toint, todouble 76 array indexing: 77 [] 74 78 stack manipulation: 75 79 drop swap dup
Note: See TracChangeset
for help on using the changeset viewer.