Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13804


Ignore:
Timestamp:
04/27/16 16:43:07 (8 years ago)
Author:
abeham
Message:

#2457: removed algorithm instances that do not appear in any run

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Common/3.3/KnowledgeCenter.cs

    r13803 r13804  
    452452          }
    453453        });
    454 
     454       
    455455        algorithmId2AlgorithmInstanceMapping.Clear();
     456        algorithmId2RunMapping.Clear();
     457        algorithmInstances.Clear();
    456458        progress.Status = "Downloading algorithm instances...";
    457459        progress.ProgressValue = 0;
     
    503505          }
    504506        });
    505 
    506507        progress.Status = "Finishing...";
     508
     509        // remove algorithm instances that do not appear in any downloaded run
     510        for (var algIdx = 0; algIdx < algorithmInstances.Count; algIdx++) {
     511          var id = algorithmId2AlgorithmInstanceMapping.GetBySecond(algorithmInstances[algIdx]);
     512          if (!algorithmId2RunMapping.ContainsFirst(id)) {
     513            algorithmId2AlgorithmInstanceMapping.RemoveByFirst(id);
     514            algorithmInstances.RemoveAt(algIdx);
     515            algIdx--;
     516          }
     517        }
    507518       
    508519        try {
Note: See TracChangeset for help on using the changeset viewer.