- Timestamp:
- 03/15/12 09:11:17 (13 years ago)
- Location:
- branches/HeuristicLab.TimeSeries
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs
r7268 r7615 240 240 } 241 241 242 protected override IEnumerable<KeyValuePair<string, IItem>> GetCollectedValues(IItem value) { 243 var children = base.GetCollectedValues(value); 244 foreach (var child in children) { 245 if (child.Value is IOperator) 246 yield return new KeyValuePair<string, IItem>(child.Key, new StringValue(((IOperator)child.Value).Name)); 247 else yield return child; 248 } 249 } 250 242 251 #region Events 243 252 public event EventHandler ExecutionStateChanged; … … 265 274 ExecutionState = ExecutionState.Prepared; 266 275 ExecutionTime = TimeSpan.Zero; 267 foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects( ).OfType<IStatefulItem>()) {276 foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects(new HashSet<string>() { "runs" }).OfType<IStatefulItem>()) { 268 277 statefulObject.InitializeState(); 269 278 } … … 286 295 protected virtual void OnStopped() { 287 296 ExecutionState = ExecutionState.Stopped; 288 foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects( ).OfType<IStatefulItem>()) {297 foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects(new HashSet<string>() { "runs" }).OfType<IStatefulItem>()) { 289 298 statefulObject.ClearState(); 290 299 } -
branches/HeuristicLab.TimeSeries/HeuristicLab.Optimization/3.3/BatchRun.cs
r7268 r7615 339 339 private void Optimizer_Paused(object sender, EventArgs e) { 340 340 if (ExecutionState == ExecutionState.Started) { 341 batchRunStarted = false;342 batchRunPaused = true;343 batchRunStopped = false;344 341 OnPaused(); 345 342 } -
branches/HeuristicLab.TimeSeries/HeuristicLab.Optimization/3.3/Experiment.cs
r7268 r7615 337 337 private void optimizer_Prepared(object sender, EventArgs e) { 338 338 if (Optimizers.All(x => x.ExecutionState == ExecutionState.Prepared)) OnPrepared(); 339 else if (Optimizers.All(x => x.ExecutionState != ExecutionState.Started)) OnPaused();340 339 } 341 340 private void optimizer_Started(object sender, EventArgs e) { -
branches/HeuristicLab.TimeSeries/HeuristicLab.Optimization/3.3/Problems/Problem.cs
r7460 r7615 26 26 using HeuristicLab.Common; 27 27 using HeuristicLab.Core; 28 using HeuristicLab.Data; 28 29 using HeuristicLab.Parameters; 29 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 97 98 #endregion 98 99 100 protected override IEnumerable<KeyValuePair<string, IItem>> GetCollectedValues(IItem value) { 101 var children = base.GetCollectedValues(value); 102 foreach (var child in children) { 103 if (child.Value is IOperator) 104 yield return new KeyValuePair<string, IItem>(child.Key, new StringValue(((IOperator)child.Value).Name)); 105 else yield return child; 106 } 107 } 108 99 109 #region events 100 110 private void Operators_Changed(object sender, EventArgs e) {
Note: See TracChangeset
for help on using the changeset viewer.