Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4551 for trunk


Ignore:
Timestamp:
10/04/10 10:40:54 (14 years ago)
Author:
mkommend
Message:

Corrected ExecutionState of experiments if optimizers are added or removed (ticket #1231).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization/3.3/Experiment.cs

    r4419 r4551  
    265265      Runs.AddRange(optimizer.Runs);
    266266      optimizer.Prepare();
     267      if (ExecutionState == ExecutionState.Stopped && optimizer.ExecutionState == ExecutionState.Prepared)
     268        OnPrepared();
    267269    }
    268270    private void RemoveOptimizer(IOptimizer optimizer) {
    269271      DeregisterOptimizerEvents(optimizer);
    270272      Runs.RemoveRange(optimizer.Runs);
     273      if (ExecutionState == ExecutionState.Prepared && !optimizers.Any(opt => opt.ExecutionState == ExecutionState.Prepared))
     274        OnStopped();
    271275    }
    272276
Note: See TracChangeset for help on using the changeset viewer.