Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/04/11 17:23:40 (13 years ago)
Author:
svonolfe
Message:

Worked on VNS main loop (#1425)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VNS/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/VariableNeighborhoodSearchMainLoop.cs

    r5603 r5609  
    126126      QualityComparator qualityComparator = new QualityComparator();
    127127      ConditionalBranch improvesQualityBranch = new ConditionalBranch();
     128      ConditionalBranch improvesQualityBranch2 = new ConditionalBranch();
    128129
    129130      Assigner bestQualityUpdater = new Assigner();
     
    134135      Assigner indexResetter = new Assigner();
    135136
    136       SubScopesRemover remover = new SubScopesRemover();
     137      SubScopesRemover remover1 = new SubScopesRemover();
     138      SubScopesRemover remover2 = new SubScopesRemover();
    137139      Placeholder analyzer2 = new Placeholder();
    138140
     
    145147      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Iterations", new IntValue(0)));
    146148      variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("Index", new DoubleValue(0)));
     149      variableCreator.CollectedValues.Add(new ValueParameter<BoolValue>("Continue", new BoolValue(false)));
    147150      variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(0)));
    148151
     
    183186      evaluator.OperatorParameter.ActualName = EvaluatorParameter.Name;
    184187
    185       qualityComparator.LeftSideParameter.ActualName = "OriginalQuality";
    186       qualityComparator.RightSideParameter.ActualName = QualityParameter.Name;
     188      qualityComparator.LeftSideParameter.ActualName = QualityParameter.Name;
     189      qualityComparator.RightSideParameter.ActualName = "OriginalQuality";
    187190      qualityComparator.ResultParameter.ActualName = "IsBetter";
    188191
    189192      improvesQualityBranch.ConditionParameter.ActualName = "IsBetter";
     193      improvesQualityBranch2.ConditionParameter.ActualName = "IsBetter";
    190194
    191195      bestQualityUpdater.Name = "Update BestQuality";
     
    194198
    195199      cleaner.Name = "Clean scope";
     200      cleaner.ClearSubScopesParameter.Value = new BoolValue(false);
    196201      originalRestorer.Name = "Restore original solution";
    197202
     
    204209      indexResetter.RightSideParameter.Value = new IntValue(0);
    205210
    206       remover.Name = "Remove subscope";
     211      remover1.Name = remover2.Name = "Remove subscope";
    207212
    208213      analyzer2.Name = "Analyzer (placeholder)";
     
    253258      improvesQualityBranch.TrueBranch = bestQualityUpdater;
    254259      improvesQualityBranch.FalseBranch = cleaner;
    255       improvesQualityBranch.Successor = remover;
    256260
    257261      bestQualityUpdater.Successor = indexResetter;
     262      indexResetter.Successor = remover1;
    258263
    259264      cleaner.Successor = originalRestorer;
    260       originalRestorer.Successor = indexCounter;
     265      originalRestorer.Successor = remover2;
     266      remover2.Successor = indexCounter;
    261267      /////////
    262       indexTermination.TrueBranch = null;
    263       indexTermination.FalseBranch = iterationInit;
     268      indexTermination.TrueBranch = improvesQualityBranch2;
     269      indexTermination.FalseBranch = null;
     270
     271      improvesQualityBranch2.TrueBranch = null;
     272      improvesQualityBranch2.FalseBranch = createChild;
    264273
    265274      iterationsCounter.Successor = iterationsComparator;
Note: See TracChangeset for help on using the changeset viewer.