Changeset 5309 for branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive
- Timestamp:
- 01/17/11 12:16:40 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive 3.3.sln
r5294 r5309 29 29 ConfigMerger.exe = ConfigMerger.exe 30 30 HeuristicLab 3.3.vsmdi = HeuristicLab 3.3.vsmdi 31 HeuristicLab.Hive 3.3 4.vsmdi = HeuristicLab.Hive 3.34.vsmdi31 HeuristicLab.Hive 3.32.vsmdi = HeuristicLab.Hive 3.32.vsmdi 32 32 LocalTestRun.testrunconfig = LocalTestRun.testrunconfig 33 33 PreBuildEvent.cmd = PreBuildEvent.cmd … … 108 108 Global 109 109 GlobalSection(TestCaseManagementSettings) = postSolution 110 CategoryFile = HeuristicLab.Hive 3.3 4.vsmdi110 CategoryFile = HeuristicLab.Hive 3.32.vsmdi 111 111 EndGlobalSection 112 112 GlobalSection(SolutionConfigurationPlatforms) = preSolution -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveJob.cs
r5294 r5309 178 178 } else if (Job.Optimizer is Optimization.BatchRun) { 179 179 Optimization.BatchRun batchRun = Job.OptimizerAsBatchRun; 180 if (batchRun. Algorithm!= null) {180 if (batchRun.Optimizer != null) { 181 181 while (this.childHiveJobs.Count < batchRun.Repetitions) { 182 this.childHiveJobs.Add(new HiveJob(batchRun. Algorithm));182 this.childHiveJobs.Add(new HiveJob(batchRun.Optimizer)); 183 183 } 184 184 while (this.childHiveJobs.Count > batchRun.Repetitions) { … … 201 201 Optimization.BatchRun batchRun = Job.OptimizerAsBatchRun; 202 202 batchRun.RepetitionsChanged += new EventHandler(batchRun_RepetitionsChanged); 203 batchRun. AlgorithmChanged += new EventHandler(batchRun_AlgorithmChanged);203 batchRun.OptimizerChanged += new EventHandler(batchRun_OptimizerChanged); 204 204 } 205 205 … … 219 219 Optimization.BatchRun batchRun = Job.OptimizerAsBatchRun; 220 220 batchRun.RepetitionsChanged -= new EventHandler(batchRun_RepetitionsChanged); 221 batchRun. AlgorithmChanged -= new EventHandler(batchRun_AlgorithmChanged);221 batchRun.OptimizerChanged -= new EventHandler(batchRun_OptimizerChanged); 222 222 } 223 223 … … 227 227 } 228 228 229 void batchRun_ AlgorithmChanged(object sender, EventArgs e) {229 void batchRun_OptimizerChanged(object sender, EventArgs e) { 230 230 if (syncJobsWithOptimizers) { 231 231 this.childHiveJobs.Clear(); … … 311 311 /// replace the child-optimizer in the experiment 312 312 /// if this.Optimizer is BatchRun 313 /// add the runs from the optimizerJob to the batchrun and replace the algorithm313 /// add the runs from the optimizerJob to the batchrun and replace the Optimizer 314 314 /// </summary> 315 315 public void UpdateChildOptimizer(OptimizerJob optimizerJob, Guid childJobId) { … … 344 344 345 345 /// <summary> 346 /// Adds the runs from the optimizerJob to the batchrun and replaces the algorithm346 /// Adds the runs from the optimizerJob to the batchrun and replaces the Optimizer 347 347 /// Sideeffect: the optimizerJob.Optimizer will be prepared (scopes are deleted and executionstate will be reset) 348 348 /// </summary> 349 349 private void UpdateOptimizerInBatchRun(BatchRun batchRun, OptimizerJob optimizerJob) { 350 if (batchRun. Algorithm== null) {351 batchRun. Algorithm = (IAlgorithm)optimizerJob.Optimizer; // only set the first optimizer as algorithm. if every time the Algorithm would be set, the runs would be cleared each time350 if (batchRun.Optimizer == null) { 351 batchRun.Optimizer = optimizerJob.Optimizer; // only set the first optimizer as algorithm. if every time the Algorithm would be set, the runs would be cleared each time 352 352 } 353 353 foreach (IRun run in optimizerJob.Optimizer.Runs) { … … 441 441 } else if (withoutChildOptimizers && this.Job.Optimizer is Optimization.BatchRun) { 442 442 OptimizerJob clonedJob = (OptimizerJob)this.Job.Clone(); 443 clonedJob.OptimizerAsBatchRun. Algorithm= null;443 clonedJob.OptimizerAsBatchRun.Optimizer = null; 444 444 jobByteArray = SerializedJob.Serialize(clonedJob); 445 445 } else if (this.Job.Optimizer is IAlgorithm) { -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/Jobs/OptimizerJob.cs
r5213 r5309 147 147 public virtual void Start() { 148 148 if ((optimizer is Optimization.Experiment && OptimizerAsExperiment.Optimizers.Count == 0) || // experiment would not fire OnStopped if it has 0 optimizers 149 (optimizer is Optimization.BatchRun && OptimizerAsBatchRun. Algorithm== null)) { // batchrun would not fire OnStopped if algorithm == null149 (optimizer is Optimization.BatchRun && OptimizerAsBatchRun.Optimizer == null)) { // batchrun would not fire OnStopped if algorithm == null 150 150 OnJobStopped(); 151 151 } else {
Note: See TracChangeset
for help on using the changeset viewer.