Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/10/11 10:44:42 (13 years ago)
Author:
cneumuel
Message:

#1215

  • evaluation operator returns operatorgraph which creates a scope and an operation for each algorithm execution (each repetition and problem)
  • split ValueConfiguration into ParameterizedValueConfiguration and RangeValueConfiguration
Location:
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3

    • Property svn:ignore
      •  

        old new  
        33obj
        44HeuristicLabProblemsMetaOptimizationPlugin.cs
         5*.vs10x
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterCombinationsEnumerator.cs

    r5357 r5653  
    11using System;
     2using System.Collections;
    23using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
    5 using System.Collections;
    64using HeuristicLab.Core;
    75
     
    2523        if (!initialized)
    2624          throw new SystemException("Enumeration not started. Call MoveNext!");
    27         return Current; 
     25        return Current;
    2826      }
    2927    }
     
    9492      }
    9593
    96       var vc = node as IValueConfiguration;
    97       if (vc != null) {
    98         if (vc.RangeConstraint != null) {
    99           valueEnumerator = new EnumeratorCollectionEnumerator<IItem>();
    100           valueEnumerator.AddEnumerator(vc.RangeConstraint.GetCombinations().GetEnumerator());
    101           valueEnumerator.Reset();
    102           enumerators.Add(valueEnumerator);
    103         } else {
    104           foreach (var parameterConfiguration in vc.ParameterConfigurations) {
    105             if (parameterConfiguration.Optimize) {
    106               var enumerator = new ParameterCombinationsEnumerator(parameterConfiguration);
    107               enumerator.Reset();
    108               enumerators.Add(enumerator);
    109             }
     94      var rangeVc = node as RangeValueConfiguration;
     95      if (rangeVc != null) {
     96        valueEnumerator = new EnumeratorCollectionEnumerator<IItem>();
     97        valueEnumerator.AddEnumerator(rangeVc.RangeConstraint.GetCombinations().GetEnumerator());
     98        valueEnumerator.Reset();
     99        enumerators.Add(valueEnumerator);
     100      }
     101
     102      var parameterizedVc = node as ParameterizedValueConfiguration;
     103      if (parameterizedVc != null) {
     104        foreach (var parameterConfiguration in parameterizedVc.ParameterConfigurations) {
     105          if (parameterConfiguration.Optimize) {
     106            var enumerator = new ParameterCombinationsEnumerator(parameterConfiguration);
     107            enumerator.Reset();
     108            enumerators.Add(enumerator);
    110109          }
    111           enumerators.Reverse(); // this makes the list of combinations better readable
    112110        }
     111        enumerators.Reverse(); // this makes the list of combinations better readable
    113112      }
    114113    }
     
    129128    }
    130129
    131     public void Dispose() {  }
     130    public void Dispose() { }
    132131
    133132    public T Current {
Note: See TracChangeset for help on using the changeset viewer.