Changeset 12969 for branches/gteufl/HeuristicLab.Clients.Hive/3.3/HiveTasks
- Timestamp:
- 09/25/15 14:39:59 (9 years ago)
- Location:
- branches/gteufl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gteufl
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 25 obj
-
- Property svn:mergeinfo changed
-
Property
svn:global-ignores
set to
*.nuget
packages
- Property svn:ignore
-
branches/gteufl/HeuristicLab.Clients.Hive/3.3/HiveTasks/EngineHiveTask.cs
r10130 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 47 47 48 48 public override TaskData GetAsTaskData(bool withoutChildOptimizers, out List<IPluginDescription> plugins) { 49 plugins = new List<IPluginDescription>();50 if (this.itemTask == null)49 if (ItemTask == null) { 50 plugins = new List<IPluginDescription>(); 51 51 return null; 52 } 52 53 53 54 TaskData jobData = new TaskData(); … … 60 61 jobData.Data = PersistenceUtil.Serialize(ItemTask, out usedTypes); 61 62 62 PluginUtil.CollectDeclaringPlugins(plugins, usedTypes);63 plugins = PluginUtil.GetPluginsForTask(usedTypes, ItemTask); 63 64 return jobData; 64 65 } -
branches/gteufl/HeuristicLab.Clients.Hive/3.3/HiveTasks/HiveTask.cs
r10130 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 295 295 /// </param> 296 296 public virtual TaskData GetAsTaskData(bool withoutChildOptimizers, out List<IPluginDescription> plugins) { 297 plugins = new List<IPluginDescription>();298 if (this.itemTask == null)297 if (ItemTask == null) { 298 plugins = new List<IPluginDescription>(); 299 299 return null; 300 } 300 301 301 302 IEnumerable<Type> usedTypes; 302 byte[] taskByteArray = PersistenceUtil.Serialize( this.ItemTask, out usedTypes);303 byte[] taskByteArray = PersistenceUtil.Serialize(ItemTask, out usedTypes); 303 304 TaskData taskData = new TaskData() { TaskId = task.Id, Data = taskByteArray }; 304 PluginUtil.CollectDeclaringPlugins(plugins, usedTypes);305 plugins = PluginUtil.GetPluginsForTask(usedTypes, ItemTask); 305 306 return taskData; 306 307 } -
branches/gteufl/HeuristicLab.Clients.Hive/3.3/HiveTasks/OptimizerHiveTask.cs
r9895 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 234 234 itemTaskLock.EnterWriteLock(); 235 235 try { 236 if (batchRun.Optimizer == null) { 237 batchRun.Optimizer = (IOptimizer)optimizerTask.Item; // only set the first optimizer as Optimizer. if every time the Optimizer would be set, the runs would be cleared each time 238 } 239 foreach (IRun run in optimizerTask.Item.Runs) { 240 if (!batchRun.Runs.Contains(run)) { 236 if (optimizerTask.Item is IAlgorithm) { 237 // only set the first optimizer as Optimizer. if every time the Optimizer would be set, the runs would be cleared each time 238 if (batchRun.Optimizer == null) { 239 batchRun.Optimizer = (IOptimizer)optimizerTask.Item.Clone(); 240 batchRun.Optimizer.Runs.Clear(); 241 } 242 243 foreach (IRun run in optimizerTask.Item.Runs) { 244 run.Name = GetNewRunName(run, batchRun.Runs); 245 batchRun.Optimizer.Runs.Add(run); 246 } 247 } else { 248 // only set the first optimizer as Optimizer. if every time the Optimizer would be set, the runs would be cleared each time 249 if (batchRun.Optimizer == null) { 250 batchRun.Optimizer = optimizerTask.Item; 251 } 252 foreach (IRun run in optimizerTask.Item.Runs) { 253 if (batchRun.Runs.Contains(run)) continue; 241 254 run.Name = GetNewRunName(run, batchRun.Runs); 242 255 batchRun.Runs.Add(run); … … 334 347 /// </param> 335 348 public override TaskData GetAsTaskData(bool withoutChildOptimizers, out List<IPluginDescription> plugins) { 336 plugins = new List<IPluginDescription>();337 if (this.itemTask == null) // || this.jobItem.Optimizer == null349 if (ItemTask == null) { 350 plugins = new List<IPluginDescription>(); 338 351 return null; 352 } 339 353 340 354 IEnumerable<Type> usedTypes; 341 355 byte[] jobByteArray; 342 if (withoutChildOptimizers && this.ItemTask.Item is Optimization.Experiment) {343 OptimizerTask clonedJob = (OptimizerTask) this.ItemTask.Clone(); // use a cloned task, so that the childHiveJob don't get confused356 if (withoutChildOptimizers && ItemTask.Item is Optimization.Experiment) { 357 OptimizerTask clonedJob = (OptimizerTask)ItemTask.Clone(); // use a cloned task, so that the childHiveJob don't get confused 344 358 clonedJob.OptimizerAsExperiment.Optimizers.Clear(); 345 359 jobByteArray = PersistenceUtil.Serialize(clonedJob, out usedTypes); 346 } else if (withoutChildOptimizers && this.ItemTask.Item is Optimization.BatchRun) {347 OptimizerTask clonedJob = (OptimizerTask) this.ItemTask.Clone();360 } else if (withoutChildOptimizers && ItemTask.Item is Optimization.BatchRun) { 361 OptimizerTask clonedJob = (OptimizerTask)ItemTask.Clone(); 348 362 clonedJob.OptimizerAsBatchRun.Optimizer = null; 349 363 jobByteArray = PersistenceUtil.Serialize(clonedJob, out usedTypes); 350 } else if ( this.ItemTask.Item is IAlgorithm) {351 ((IAlgorithm) this.ItemTask.Item).StoreAlgorithmInEachRun = false; // avoid storing the algorithm in runs to reduce size352 jobByteArray = PersistenceUtil.Serialize( this.ItemTask, out usedTypes);364 } else if (ItemTask.Item is IAlgorithm) { 365 ((IAlgorithm)ItemTask.Item).StoreAlgorithmInEachRun = false; // avoid storing the algorithm in runs to reduce size 366 jobByteArray = PersistenceUtil.Serialize(ItemTask, out usedTypes); 353 367 } else { 354 jobByteArray = PersistenceUtil.Serialize( this.ItemTask, out usedTypes);368 jobByteArray = PersistenceUtil.Serialize(ItemTask, out usedTypes); 355 369 } 356 370 357 371 TaskData jobData = new TaskData() { TaskId = task.Id, Data = jobByteArray }; 358 PluginUtil.CollectDeclaringPlugins(plugins, usedTypes);372 plugins = PluginUtil.GetPluginsForTask(usedTypes, ItemTask); 359 373 return jobData; 360 374 }
Note: See TracChangeset
for help on using the changeset viewer.