Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12223


Ignore:
Timestamp:
03/18/15 16:02:27 (8 years ago)
Author:
pfleck
Message:

#2350 Fixed calculation of init phase duration.

Location:
branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/AlpsSsGeneticAlgorithmMainLoop.cs

    r12220 r12223  
    8080      var setTargetIndedxToNextInit = new Assigner() { Name = "TargetIndex = NextInit" };
    8181      var incrementNextInit = new IntCounter() { Name = "Incr. NextInit" };
    82       var checkInitFinished = new Comparator() { Name = "DoInit = NextInit >= PopulationSize" };
     82      var checkInitFinished = new Comparator() { Name = "DoInit = NextInit < LayerSize" };
    8383      var workingScopeProcessor = new NamedSubScopeProcessor() { Name = "WorkingScope Processor" };
    8484      var createRandomIndividual = new SolutionsCreator() { Name = "Create random Individual" };
     
    9696      var reactivateInit = new Assigner() { Name = "DoInit = true" };
    9797      var resetNextInit = new Assigner() { Name = "NextInit = 1" };
    98       var resetTargetIndex = new Assigner() { Name = "TargetIndex = 0" };
     98      var resetTargetIndex = new Assigner() { Name = "TargetIndex = MatingPoolSize" };
    9999      var tryMoveUp = new AlpsSsMover() { Name = "Try Move Up" };
    100100      var incrementEvaluations = new IntCounter() { Name = "Incr. EvaluatedSolutions" };
     
    161161
    162162      checkInitFinished.LeftSideParameter.ActualName = "NextInit";
    163       checkInitFinished.RightSideParameter.ActualName = "PopulationSize";
    164       checkInitFinished.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
     163      checkInitFinished.RightSideParameter.ActualName = "LayerSize";
     164      checkInitFinished.Comparison = new Comparison(ComparisonType.Less);
    165165      checkInitFinished.ResultParameter.ActualName = "DoInit";
    166166      checkInitFinished.Successor = workingScopeProcessor;
     
    217217
    218218      resetTargetIndex.LeftSideParameter.ActualName = "TargetIndex";
    219       resetTargetIndex.RightSideParameter.Value = new IntValue(0);
     219      resetTargetIndex.RightSideParameter.ActualName = "MatingPoolSize";
    220220      resetTargetIndex.Successor = createRandomIndividual;
    221221
  • branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/RandomIntAssigner.cs

    r12136 r12223  
    3232  [StorableClass]
    3333  public class RandomIntAssigner : SingleSuccessorOperator, IStochasticOperator {
    34     public LookupParameter<IItem> LeftSideParameter {
    35       get { return (LookupParameter<IItem>)Parameters["LeftSide"]; }
     34    public LookupParameter<IntValue> LeftSideParameter {
     35      get { return (LookupParameter<IntValue>)Parameters["LeftSide"]; }
    3636    }
    3737    public ValueLookupParameter<IntValue> MinimumParameter {
     
    5252    public RandomIntAssigner()
    5353      : base() {
    54       Parameters.Add(new LookupParameter<IItem>("LeftSide", "The parameter whose value gets assigned."));
     54      Parameters.Add(new LookupParameter<IntValue>("LeftSide", "The parameter whose value gets assigned."));
    5555      Parameters.Add(new ValueLookupParameter<IntValue>("Minimum", new IntValue(0)));
    5656      Parameters.Add(new ValueLookupParameter<IntValue>("Maximum", new IntValue(10)));
Note: See TracChangeset for help on using the changeset viewer.