Changeset 13834 for branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/ProgressHub.cs
- Timestamp:
- 05/04/16 16:38:21 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/ProgressHub.cs
r13827 r13834 8 8 using HeuristicLab.Data; 9 9 using System.Reflection; 10 using HeuristicLab.Core; 10 11 11 12 namespace HeuristicLab.Clients.Hive.WebJobManager … … 257 258 258 259 //BUGGERS 259 if (name == "ReevaluateElites") 260 name = "ReevaluteElites"; 261 if (name == "DominateOnEqualQualities" || name == "PlusSelection" || name == "ReevaluteElites") 262 val = ((BoolValue)val).Value; 263 264 // if (name == "ReduceToPopulationSize") 265 //name += "Parameter"; 266 267 try 268 { 269 Algorithm alg = (Algorithm)curr.ItemTask.Item; 270 if (prob) 271 alg.Problem.GetType().GetProperty(name).SetValue(alg, val); 272 else 273 alg.GetType().GetProperty(name).SetValue(alg, val); 274 } 275 catch (NullReferenceException e) 276 { 277 Console.WriteLine("NullRefException: " + name + " - " + type); 278 } 279 catch(TargetException e) 280 { 281 Console.WriteLine("TargetException: " + name + " - " + type); 282 } 260 // if (name == "DominateOnEqualQualities" || name == "PlusSelection" || name == "ReevaluteElites") 261 // val = ((BoolValue)val).Value; 262 263 // if (name == "ReduceToPopulationSize") 264 //name += "Parameter"; 265 if (val != null) 266 { 267 try 268 { 269 IAlgorithm alg = (IAlgorithm)curr.ItemTask.Item; 270 if (prob) 271 alg.Problem.Parameters[name].ActualValue = (IItem)val; 272 else 273 { 274 alg.Parameters[name].ActualValue = (IItem)val; 275 } 276 } 277 catch (NullReferenceException e) 278 { 279 Console.WriteLine("NullRefException: " + name + " - " + type); 280 } 281 catch (TargetException e) 282 { 283 Console.WriteLine("TargetException: " + name + " - " + type); 284 } 285 catch (NotSupportedException e) 286 { 287 Clients.Caller.dataNotSupported(name); 288 } 289 } 290 else 291 Clients.Caller.formatWrong(name, type); 292 293 283 294 } 284 295
Note: See TracChangeset
for help on using the changeset viewer.