Changeset 5610 for branches/VNS
- Timestamp:
- 03/04/11 18:27:23 (14 years ago)
- Location:
- branches/VNS/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VNS/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/LocalSearchImprovement.cs
r5609 r5610 163 163 164 164 loop.MoveGeneratorParameter.Value = MoveGeneratorParameter.Value; 165 if (loop.MoveGeneratorParameter.Value != null && loop.MoveGeneratorParameter.Value.Parameters.ContainsKey("SampleSize")) { 166 IParameter parameter = loop.MoveGeneratorParameter.Value.Parameters["SampleSize"]; 167 if(parameter is IValueParameter) 168 (parameter as IValueParameter).Value = SampleSizeParameter.Value; 169 } 165 170 loop.MoveEvaluatorParameter.Value = MoveEvaluatorParameter.Value; 166 171 loop.MoveMakerParameter.Value = MoveMakerParameter.Value; -
branches/VNS/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/VariableNeighborhoodSearchMainLoop.cs
r5609 r5610 145 145 ConditionalBranch iterationsTermination = new ConditionalBranch(); 146 146 147 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>(" Iterations", new IntValue(0)));147 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("OuterIterations", new IntValue(0))); 148 148 variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("Index", new DoubleValue(0))); 149 149 variableCreator.CollectedValues.Add(new ValueParameter<BoolValue>("Continue", new BoolValue(false))); 150 variableCreator.CollectedValues.Add(new ValueParameter<BoolValue>("IsBetter", new BoolValue(false))); 150 151 variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(0))); 151 152 … … 158 159 159 160 resultsCollector1.CopyValue = new BoolValue(false); 160 resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>(" Iterations"));161 resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("OuterIterations")); 161 162 resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality")); 162 163 resultsCollector1.ResultsParameter.ActualName = ResultsParameter.Name; … … 218 219 iterationsCounter.Name = "Iterations Counter"; 219 220 iterationsCounter.Increment = new IntValue(1); 220 iterationsCounter.ValueParameter.ActualName = " Iterations";221 iterationsCounter.ValueParameter.ActualName = "OuterIterations"; 221 222 222 223 iterationsComparator.Name = "Iterations >= MaximumIterations"; 223 224 iterationsComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual); 224 iterationsComparator.LeftSideParameter.ActualName = " Iterations";225 iterationsComparator.LeftSideParameter.ActualName = "OuterIterations"; 225 226 iterationsComparator.RightSideParameter.ActualName = MaximumIterationsParameter.Name; 226 227 iterationsComparator.ResultParameter.ActualName = "Terminate"; … … 242 243 ///////// 243 244 resultsCollector1.Successor = iteration; 245 244 246 iteration.OperatorGraph.InitialOperator = iterationInit; 245 247 iteration.Successor = iterationsCounter;
Note: See TracChangeset
for help on using the changeset viewer.