Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/03/15 11:18:07 (10 years ago)
Author:
bburlacu
Message:

#2276: Merged trunk changes.

Location:
branches/HeuristicLab.DatasetRefactor/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DatasetRefactor/sources

  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Clients.Hive/3.3/HiveTasks/OptimizerHiveTask.cs

    r12031 r12105  
    234234      itemTaskLock.EnterWriteLock();
    235235      try {
    236         if (batchRun.Optimizer == null) {
    237           batchRun.Optimizer = (IOptimizer)optimizerTask.Item; // only set the first optimizer as Optimizer. if every time the Optimizer would be set, the runs would be cleared each time
    238         }
    239         foreach (IRun run in optimizerTask.Item.Runs) {
    240           if (!batchRun.Runs.Contains(run)) {
     236        if (optimizerTask.Item is IAlgorithm) {
     237          // only set the first optimizer as Optimizer. if every time the Optimizer would be set, the runs would be cleared each time
     238          if (batchRun.Optimizer == null) {
     239            batchRun.Optimizer = (IOptimizer)optimizerTask.Item.Clone();
     240            batchRun.Optimizer.Runs.Clear();
     241          }
     242
     243          foreach (IRun run in optimizerTask.Item.Runs) {
     244            run.Name = GetNewRunName(run, batchRun.Runs);
     245            batchRun.Optimizer.Runs.Add(run);
     246          }
     247        } else {
     248          // only set the first optimizer as Optimizer. if every time the Optimizer would be set, the runs would be cleared each time
     249          if (batchRun.Optimizer == null) {
     250            batchRun.Optimizer = optimizerTask.Item;
     251          }
     252          foreach (IRun run in optimizerTask.Item.Runs) {
     253            if (batchRun.Runs.Contains(run)) continue;
    241254            run.Name = GetNewRunName(run, batchRun.Runs);
    242255            batchRun.Runs.Add(run);
Note: See TracChangeset for help on using the changeset viewer.