Changeset 5363
- Timestamp:
- 01/24/11 10:50:01 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.Designer.cs
r5320 r5363 112 112 this.Controls.Add(this.label1); 113 113 this.Name = "SlaveView"; 114 this.Size = new System.Drawing.Size( 667, 435);114 this.Size = new System.Drawing.Size(590, 435); 115 115 this.ResumeLayout(false); 116 116 this.PerformLayout(); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/MenuItems/ConnectionSetupMenuItem.cs
r4905 r5363 35 35 public override System.Drawing.Image Image { 36 36 get { 37 return HeuristicLab.Common.Resources.VS 2008ImageLibrary.NetworkConnections;37 return HeuristicLab.Common.Resources.VSImageLibrary.NetworkConnections; 38 38 } 39 39 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveJobClient.cs
r5055 r5363 23 23 using System.Collections.Generic; 24 24 using System.Drawing; 25 using System.IO; 25 26 using System.Linq; 27 using HeuristicLab.Clients.Hive.Jobs; 26 28 using HeuristicLab.Collections; 27 29 using HeuristicLab.Common; 28 30 using HeuristicLab.Core; 29 31 using HeuristicLab.Optimization; 30 using HeuristicLab.P ersistence.Default.CompositeSerializers.Storable;32 using HeuristicLab.PluginInfrastructure; 31 33 using HeuristicLab.Services.Hive.Common.DataTransfer; 32 using HeuristicLab.Clients.Hive.Jobs;33 using HeuristicLab.PluginInfrastructure;34 using System.IO;35 using HeuristicLab.PluginInfrastructure.Manager;36 34 37 35 namespace HeuristicLab.Clients.Hive { … … 44 42 get { 45 43 if (job.Id == Guid.Empty) { // not yet uploaded 46 return HeuristicLab.Common.Resources.VS 2008ImageLibrary.Event;44 return HeuristicLab.Common.Resources.VSImageLibrary.Event; 47 45 } else { 48 if (job.JobState == JobState.Waiting) return HeuristicLab.Common.Resources.VS 2008ImageLibrary.ExecutablePrepared;49 else if (job.JobState == JobState.WaitingForChildJobs) return HeuristicLab.Common.Resources.VS 2008ImageLibrary.ExecutablePrepared;50 else if (job.JobState == JobState.Calculating) return HeuristicLab.Common.Resources.VS 2008ImageLibrary.ExecutableStarted;51 else if (job.JobState == JobState.Aborted) return HeuristicLab.Common.Resources.VS 2008ImageLibrary.ExecutableStopped;52 else if (job.JobState == JobState.Failed) return HeuristicLab.Common.Resources.VS 2008ImageLibrary.Error;53 else if (job.JobState == JobState.Finished) return HeuristicLab.Common.Resources.VS 2008ImageLibrary.ExecutableStopped;54 else return HeuristicLab.Common.Resources.VS 2008ImageLibrary.Event;46 if (job.JobState == JobState.Waiting) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePrepared; 47 else if (job.JobState == JobState.WaitingForChildJobs) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePrepared; 48 else if (job.JobState == JobState.Calculating) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStarted; 49 else if (job.JobState == JobState.Aborted) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped; 50 else if (job.JobState == JobState.Failed) return HeuristicLab.Common.Resources.VSImageLibrary.Error; 51 else if (job.JobState == JobState.Finished) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped; 52 else return HeuristicLab.Common.Resources.VSImageLibrary.Event; 55 53 } 56 54 } … … 177 175 } else if (OptimizerJob.Optimizer is Optimization.BatchRun) { 178 176 Optimization.BatchRun batchRun = OptimizerJob.OptimizerAsBatchRun; 179 if (batchRun. Algorithm!= null) {177 if (batchRun.Optimizer != null) { 180 178 while (this.childHiveJobs.Count < batchRun.Repetitions) { 181 this.childHiveJobs.Add(new HiveJob(batchRun. Algorithm));179 this.childHiveJobs.Add(new HiveJob(batchRun.Optimizer)); 182 180 } 183 181 while (this.childHiveJobs.Count > batchRun.Repetitions) { … … 200 198 Optimization.BatchRun batchRun = OptimizerJob.OptimizerAsBatchRun; 201 199 batchRun.RepetitionsChanged += new EventHandler(batchRun_RepetitionsChanged); 202 batchRun. AlgorithmChanged += new EventHandler(batchRun_AlgorithmChanged);200 batchRun.OptimizerChanged += new EventHandler(batchRun_OptimizerChanged); 203 201 } 204 202 OptimizerJob.ComputeInParallelChanged += new EventHandler(OptimizerJob_ComputeInParallelChanged); … … 217 215 Optimization.BatchRun batchRun = OptimizerJob.OptimizerAsBatchRun; 218 216 batchRun.RepetitionsChanged -= new EventHandler(batchRun_RepetitionsChanged); 219 batchRun. AlgorithmChanged -= new EventHandler(batchRun_AlgorithmChanged);217 batchRun.OptimizerChanged -= new EventHandler(batchRun_OptimizerChanged); 220 218 } 221 219 OptimizerJob.ComputeInParallelChanged -= new EventHandler(OptimizerJob_ComputeInParallelChanged); … … 224 222 } 225 223 226 void batchRun_ AlgorithmChanged(object sender, EventArgs e) {224 void batchRun_OptimizerChanged(object sender, EventArgs e) { 227 225 if (syncJobsWithOptimizers) { 228 226 this.childHiveJobs.Clear(); … … 308 306 /// replace the child-optimizer in the experiment 309 307 /// if this.Optimizer is BatchRun 310 /// add the runs from the optimizerJob to the batchrun and replace the algorithm308 /// add the runs from the optimizerJob to the batchrun and replace the Optimizer 311 309 /// </summary> 312 310 public void UpdateChildOptimizer(OptimizerJob optimizerJob, Guid childJobId) { … … 341 339 342 340 /// <summary> 343 /// Adds the runs from the optimizerJob to the batchrun and replaces the algorithm341 /// Adds the runs from the optimizerJob to the batchrun and replaces the Optimizer 344 342 /// Sideeffect: the optimizerJob.Optimizer will be prepared (scopes are deleted and executionstate will be reset) 345 343 /// </summary> 346 344 private void UpdateOptimizerInBatchRun(BatchRun batchRun, OptimizerJob optimizerJob) { 347 if (batchRun. Algorithm== null) {348 batchRun. Algorithm = (IAlgorithm)optimizerJob.Optimizer; // only set the first optimizer as algorithm. if every time the Algorithmwould be set, the runs would be cleared each time345 if (batchRun.Optimizer == null) { 346 batchRun.Optimizer = (IOptimizer)optimizerJob.Optimizer; // only set the first optimizer as Optimizer. if every time the Optimizer would be set, the runs would be cleared each time 349 347 } 350 348 foreach (IRun run in optimizerJob.Optimizer.Runs) { … … 438 436 } else if (withoutChildOptimizers && this.OptimizerJob.Optimizer is Optimization.BatchRun) { 439 437 OptimizerJob clonedJob = (OptimizerJob)this.OptimizerJob.Clone(); 440 clonedJob.OptimizerAsBatchRun. Algorithm= null;438 clonedJob.OptimizerAsBatchRun.Optimizer = null; 441 439 jobByteArray = PersistenceUtil.Serialize(clonedJob); 442 440 } else if (this.OptimizerJob.Optimizer is IAlgorithm) { … … 462 460 private void UpdateRequiredPlugins() { 463 461 List<Guid> pluginList = new List<Guid>(); 464 462 465 463 IEnumerable<IPluginDescription> neededPlugins = ApplicationManager.Manager.Plugins; //HivePluginInfoDto.FindPluginsNeeded(optimizerJob.GetType()); 466 464 using (var service = ServiceLocator.Instance.GetService()) { … … 481 479 } 482 480 pluginList.Add(service.Obj.AddPlugin(p, pluginDatas)); 483 } 481 } 484 482 } 485 483 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/Jobs/OptimizerJob.cs
r5062 r5363 24 24 using HeuristicLab.Common; 25 25 using HeuristicLab.Core; 26 using HeuristicLab.Hive; 26 27 using HeuristicLab.Optimization; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Hive;29 29 30 30 namespace HeuristicLab.Clients.Hive.Jobs { … … 85 85 this.log = new Log(); 86 86 } 87 public OptimizerJob(IOptimizer optimizer) : this() { 87 public OptimizerJob(IOptimizer optimizer) 88 : this() { 88 89 this.Optimizer = optimizer; 89 90 … … 98 99 [StorableConstructor] 99 100 protected OptimizerJob(bool deserializing) { } 100 protected OptimizerJob(OptimizerJob original, Cloner cloner) : base(original, cloner) { 101 protected OptimizerJob(OptimizerJob original, Cloner cloner) 102 : base(original, cloner) { 101 103 this.Optimizer = cloner.Clone(original.Optimizer); 102 104 this.log = cloner.Clone(original.Log); … … 145 147 public virtual void Start() { 146 148 if ((optimizer is Optimization.Experiment && OptimizerAsExperiment.Optimizers.Count == 0) || // experiment would not fire OnStopped if it has 0 optimizers 147 (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 148 150 OnJobStopped(); 149 151 } else { … … 281 283 protected virtual void OnDescriptionChanged() { 282 284 var handler = DescriptionChanged; 283 if (handler != null) handler(this, EventArgs.Empty);285 if (handler != null) handler(this, EventArgs.Empty); 284 286 } 285 287 public event EventHandler ItemImageChanged; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HeuristicLab.Services.Hive-3.4.csproj
r5264 r5363 109 109 </ItemGroup> 110 110 <ItemGroup> 111 <None Include="app.config" /> 111 <None Include="app.config"> 112 <SubType>Designer</SubType> 113 </None> 112 114 <None Include="HeuristicLab.snk" /> 113 115 </ItemGroup>
Note: See TracChangeset
for help on using the changeset viewer.