Changeset 14613 for branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting
- Timestamp:
- 01/26/17 15:44:04 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpNetwork1.cs
r14610 r14613 64 64 RegisterEvents(); 65 65 } 66 67 private void RegisterEvents() {68 MetaSolver.Algorithm.ExecutionStateChanged += OnExecutionStateChanged;69 MetaSolver.Algorithm.ExecutionTimeChanged += OnExecutionTimeChanged;70 MetaSolver.Algorithm.Prepared += OnPrepared;71 MetaSolver.Algorithm.Started += OnStarted;72 MetaSolver.Algorithm.Paused += OnPaused;73 MetaSolver.Algorithm.Stopped += OnStopped;74 MetaSolver.Algorithm.ExceptionOccurred += OnExceptionOccurred;75 }76 77 66 public LrpNetwork1() : base("LrpNetwork1") { 78 67 var orchestratorNode = new LrpOrchestratorNode1("Orchestrator"); … … 124 113 } 125 114 115 private void RegisterEvents() { 116 MetaSolver.AlgorithmChanged += MetaSolver_AlgorithmChanged; 117 RegisterAlgorithmEvents(); 118 } 119 120 private void RegisterAlgorithmEvents() { 121 var algorithm = MetaSolver.Algorithm; 122 if (algorithm == null) return; 123 124 algorithm.ExecutionStateChanged += OnExecutionStateChanged; 125 algorithm.ExecutionTimeChanged += OnExecutionTimeChanged; 126 algorithm.Prepared += OnPrepared; 127 algorithm.Started += OnStarted; 128 algorithm.Paused += OnPaused; 129 algorithm.Stopped += OnStopped; 130 algorithm.ExceptionOccurred += OnExceptionOccurred; 131 } 132 133 private void MetaSolver_AlgorithmChanged(object sender, EventArgs e) { 134 RegisterAlgorithmEvents(); 135 } 136 126 137 #region IOptimizer Members 127 138 public RunCollection Runs { get { return MetaSolver.Algorithm.Runs; } }
Note: See TracChangeset
for help on using the changeset viewer.