Changeset 15560 for trunk/sources
- Timestamp:
- 12/22/17 16:34:50 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization/3.3/MetaOptimizers/Experiment.cs
r15452 r15560 235 235 } 236 236 237 Task.WaitAll(startedOptimizers.Values.ToArray()); // retr eive exeptions of the asyncrounously started optimizer237 Task.WaitAll(startedOptimizers.Values.ToArray()); // retrieve exeptions of the asyncrounously started optimizer 238 238 } 239 239 } … … 289 289 public event EventHandler Prepared; 290 290 private void OnPrepared() { 291 if (ExecutionState == ExecutionState.Prepared) return; 291 292 ExecutionState = ExecutionState.Prepared; 292 293 EventHandler handler = Prepared; … … 295 296 public event EventHandler Started; 296 297 private void OnStarted() { 298 if (ExecutionState == ExecutionState.Started) return; 297 299 ExecutionState = ExecutionState.Started; 298 300 EventHandler handler = Started; … … 301 303 public event EventHandler Paused; 302 304 private void OnPaused() { 305 if (ExecutionState == ExecutionState.Paused) return; 303 306 ExecutionState = ExecutionState.Paused; 304 307 EventHandler handler = Paused; … … 307 310 public event EventHandler Stopped; 308 311 private void OnStopped() { 312 if (ExecutionState == ExecutionState.Stopped) return; 309 313 ExecutionState = ExecutionState.Stopped; 310 314 EventHandler handler = Stopped; … … 427 431 lock (locker) { 428 432 // 1. experiment is running & further startable optimizers are available => continue executing 429 if (experimentStarted && StartableOptimizers.Any()) return; 433 if (experimentStarted && StartableOptimizers.Any()) 434 return; 430 435 431 436 // 2. any optimizer is running => continue executing 432 elseif (Optimizers.Any(x => x.ExecutionState == ExecutionState.Started))437 if (Optimizers.Any(x => x.ExecutionState == ExecutionState.Started)) 433 438 return; 434 439 440 experimentStarted = false; 435 441 // 3. any optimizer is paused => experiment paused 436 elseif (Optimizers.Any(x => x.ExecutionState == ExecutionState.Paused))442 if (Optimizers.Any(x => x.ExecutionState == ExecutionState.Paused)) 437 443 OnPaused(); 438 444
Note: See TracChangeset
for help on using the changeset viewer.