Changeset 12625 for branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/MetaOptimizers/Experiment.cs
- Timestamp:
- 07/07/15 09:19:43 (9 years ago)
- Location:
- branches/TimeLimitRunOptimizer/HeuristicLab.Optimization
- Files:
-
- 2 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/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 {
Note: See TracChangeset
for help on using the changeset viewer.