Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/05/10 06:38:53 (15 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • corrected persistence and initialization of algorithms
  • fixed SGA performance test
Location:
trunk/sources/HeuristicLab.Optimization/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization/3.3/Algorithm.cs

    r2932 r2933  
    4343    private IProblem problem;
    4444    [Storable]
     45    private IProblem ProblemPersistence {
     46      get { return problem; }
     47      set {
     48        if (problem != null) DeregisterProblemEvents();
     49        problem = value;
     50        if (problem != null) RegisterProblemEvents();
     51      }
     52    }
    4553    public IProblem Problem {
    4654      get { return problem; }
  • trunk/sources/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs

    r2932 r2933  
    3636    private OperatorGraph operatorGraph;
    3737    [Storable]
     38    private OperatorGraph OperatorGraphPersistence {
     39      get { return operatorGraph; }
     40      set {
     41        if (operatorGraph != null) operatorGraph.InitialOperatorChanged -= new EventHandler(OperatorGraph_InitialOperatorChanged);
     42        operatorGraph = value;
     43        if (operatorGraph != null) operatorGraph.InitialOperatorChanged += new EventHandler(OperatorGraph_InitialOperatorChanged);
     44      }
     45    }
    3846    protected OperatorGraph OperatorGraph {
    3947      get { return operatorGraph; }
     
    5866    private IEngine engine;
    5967    [Storable]
     68    private IEngine EnginePersistence {
     69      get { return engine; }
     70      set {
     71        if (engine != null) DeregisterEngineEvents();
     72        engine = value;
     73        if (engine != null) RegisterEngineEvents();
     74      }
     75    }
    6076    public IEngine Engine {
    6177      get { return engine; }
Note: See TracChangeset for help on using the changeset viewer.