Changeset 11977 for branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GrammaticalOptimization/Solvers
- Timestamp:
- 02/11/15 03:01:59 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GrammaticalOptimization/Solvers/SequentialSearch.cs
r11976 r11977 62 62 } 63 63 64 public bool StopRequested { 65 get; 66 set; 67 } 68 64 69 public override void Run(int maxIterations) { 65 70 Reset(); 66 71 67 for (int i = 0; /*!bestQuality.IsAlmost(1.0) && */!Done() && i < maxIterations; i++) {72 for (int i = 0; !StopRequested && !Done() && i < maxIterations; i++) { 68 73 var phrase = SampleSentence(problem.Grammar); 69 74 // can fail on the last sentence … … 171 176 172 177 private void Reset() { 178 StopRequested = false; 173 179 behaviourPolicy.Reset(); 174 180 greedyPolicy.Reset(); … … 238 244 } 239 245 #endregion 240 246 241 247 } 242 248 }
Note: See TracChangeset
for help on using the changeset viewer.