Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3189 for trunk


Ignore:
Timestamp:
03/23/10 00:07:29 (15 years ago)
Author:
abeham
Message:

Prevent starting of algorithm when problem or vital operators are null #933

Location:
trunk/sources
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs

    r3187 r3189  
    153153    }
    154154
     155    protected override void OnPrepared() {
     156      base.OnPrepared();
     157      if (Engine != null) {
     158        if (Problem == null || MoveGenerator == null || MoveMaker == null || MoveEvaluator == null)
     159          Engine.Prepare(null);
     160      }
     161    }
     162
    155163    #region Events
    156164    protected override void OnProblemChanged() {
  • trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs

    r3187 r3189  
    181181    }
    182182
     183    protected override void OnPrepared() {
     184      base.OnPrepared();
     185      if (Engine != null) {
     186        if (Problem == null || MoveGenerator == null || MoveMaker == null || MoveEvaluator == null)
     187          Engine.Prepare(null);
     188      }
     189    }
     190
    183191    #region Events
    184192    protected override void OnProblemChanged() {
  • trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs

    r3187 r3189  
    175175    }
    176176
     177    protected override void OnPrepared() {
     178      base.OnPrepared();
     179      if (Engine != null) {
     180        if (Problem == null || MoveGenerator == null || MoveMaker == null || MoveEvaluator == null
     181          || TabuMoveEvaluator == null || TabuMoveMaker == null)
     182          Engine.Prepare(null);
     183      }
     184    }
     185
    177186    #region Events
    178187    protected override void OnProblemChanged() {
Note: See TracChangeset for help on using the changeset viewer.