- Timestamp:
- 05/22/13 15:29:15 (12 years ago)
- Location:
- branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HLMapper.cs
r9166 r9508 37 37 public static DoubleMatrix ConvertToDoubleMatrix(Parameter parameter) { 38 38 var matrix = parameter.Value as DecimalMatrix; 39 // TODO: Check for empty matrices 39 40 if (matrix.Value.Length == 0 || matrix.Value[0].Length == 0) { 41 return new DoubleMatrix(new double[0, 0]); 42 } 43 40 44 double[,] data = new double[matrix.Value.Length, matrix.Value[0].Length]; 41 45 for (int i=0; i < matrix.Value.Length; i++) { -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveScenarioManager.cs
r9395 r9508 81 81 82 82 public bool DispatchExperiment(User user, Model.Experiment exp, JobExecutionDetails details) { 83 // TODO: Determine how to build a tree of IAlgorithm84 83 // For now the experiment will be flatened for execution 85 84 HeuristicLab.Optimization.Experiment hiveExperiment = new HeuristicLab.Optimization.Experiment(exp.Name); … … 94 93 var entry = stack.Pop(); 95 94 // handle current entry 96 97 // TODO: Store scenario name in entry.Child.Mapper when saving98 95 foreach (var child in entry.Children) { 99 96 // This is a template experiment; … … 215 212 } 216 213 job.HiveTasks.Add(new OptimizerHiveTask(exp)); 217 var service = ConfigureHive(user); 218 219 // TODO: Fix HiveClient class to be not dependent on singleton HiveServiceLocator!!! 220 HiveServiceLocator.Instance.Username = user.Username; 221 HiveServiceLocator.Instance.Password = user.Password; 222 HiveServiceLocator.Instance.EndpointConfigurationName = Configuration.HiveEndpointName; 223 HiveClient.Store(job, new CancellationToken()); 214 215 var locator = ConfigureHive(user); 216 HiveClient.Store(job, new CancellationToken(), locator); 224 217 225 218 job.StopResultPolling(); … … 277 270 taskIds.Add(task.Id); 278 271 } 279 280 // TODO: Fix problems with the HiveServiceLocater singleton!!! 281 HiveServiceLocator.Instance.Username = user.Username; 282 HiveServiceLocator.Instance.Password = user.Password; 283 HiveServiceLocator.Instance.EndpointConfigurationName = Configuration.HiveEndpointName; 284 TaskDownloader downloader = new TaskDownloader(taskIds); 272 273 TaskDownloader downloader = new TaskDownloader(taskIds, ConfigureHive(user)); 285 274 downloader.StartAsync(); 286 275 while (!downloader.IsFinished) { … … 291 280 } 292 281 } 293 //var experiment = dal.JobDao.FindByJobId(user.Username, id);294 282 295 283 IDictionary<Guid, HiveTask> hiveTasks = downloader.Results; … … 330 318 return runs; 331 319 } 332 333 //TODO: We might need images / +++334 320 335 321 private Parameter MapHiveDataType(string name, IItem item) { … … 341 327 var result = new Parameter(); 342 328 result.Type = ParameterType.String; 343 //TODO: How shall we handle dll specific datatypes?344 //if (item is PathTSPTour) {345 // var tour = item as PathTSPTour;346 //}347 //else348 329 if (item is IStringConvertibleValue) { 349 330 var value = (item as IStringConvertibleValue).GetValue(); … … 440 421 result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = item.ItemName != null ? item.ItemName + " (Cannot be displayed properly as string)" : "Cannot be displayed properly as string" }; 441 422 } 442 // TODO: Add workaround for TSP443 423 return result; 444 424 } … … 541 521 542 522 public Model.Task GetTaskData(User u, string jobId, string taskId) { 543 ConfigureHive(u); 544 HiveServiceLocator.Instance.Username = u.Username; 545 HiveServiceLocator.Instance.Password = u.Password; 546 HiveServiceLocator.Instance.EndpointConfigurationName = Configuration.HiveEndpointName; 547 TaskDownloader downloader = new TaskDownloader(new List<Guid>(){Guid.Parse(taskId)}); 523 TaskDownloader downloader = new TaskDownloader(new List<Guid>(){Guid.Parse(taskId)}, ConfigureHive(u)); 548 524 downloader.StartAsync(); 549 525 while (!downloader.IsFinished) { … … 583 559 // push all elements to dictionary 584 560 foreach (var task in jobTasks) { 585 // TODO: Crawl children + parent and create hierarchy!586 561 var children = serviceLocator.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightChildTasks(Guid.Parse(jobId), true, true)); 587 562 foreach (var child in children) {
Note: See TracChangeset
for help on using the changeset viewer.