Changeset 15290 for branches/FitnessLandscapeAnalysis
- Timestamp:
- 07/27/17 10:06:10 (7 years ago)
- Location:
- branches/FitnessLandscapeAnalysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape.Views/MultiTrajectory/MultiTrajectoryView.cs
r7128 r15290 136 136 } 137 137 private void startButton_Click(object sender, System.EventArgs e) { 138 Content.Start ();138 Content.StartAsync(); 139 139 } 140 140 private void pauseButton_Click(object sender, System.EventArgs e) { -
branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape/MultiTrajectory/MultiTrajectoryAnalysis.cs
r7202 r15290 1 1 using System; 2 using System.Linq;3 2 using System.Collections.Generic; 3 using System.Drawing; 4 using System.Threading; 5 using System.Threading.Tasks; 4 6 using HeuristicLab.Common; 7 using HeuristicLab.Common.Resources; 5 8 using HeuristicLab.Core; 6 9 using HeuristicLab.Data; 10 using HeuristicLab.Encodings.BinaryVectorEncoding; 11 using HeuristicLab.Encodings.PermutationEncoding; 12 using HeuristicLab.Encodings.RealVectorEncoding; 7 13 using HeuristicLab.Optimization; 8 14 using HeuristicLab.Parameters; 9 15 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 10 16 using HeuristicLab.PluginInfrastructure; 11 using HeuristicLab.Encodings.BinaryVectorEncoding;12 using HeuristicLab.Encodings.RealVectorEncoding;13 using HeuristicLab.Encodings.PermutationEncoding;14 using HeuristicLab.Common.Resources;15 using System.Drawing;16 17 17 18 namespace HeuristicLab.Analysis.FitnessLandscape.MultiTrajectory { … … 314 315 if (handler != null) 315 316 handler(this, EventArgs.Empty); 316 } 317 } 317 318 protected virtual void OnStoreAlgorithmInEachRunChanged() { 318 319 EventHandler handler = StoreAlgorithmInEachRunChanged; … … 445 446 446 447 public void Start() { 448 Start(CancellationToken.None); 449 } 450 public void Start(CancellationToken cancellationToken) { 447 451 running = true; 448 452 ExecutionState = ExecutionState.Started; 449 453 PerformNextStep(); 454 } 455 public async Task StartAsync() { await StartAsync(CancellationToken.None); } 456 public async Task StartAsync(CancellationToken cancellationToken) { 457 await AsyncHelper.DoAsync(Start, cancellationToken); 450 458 } 451 459 … … 524 532 values.Add(string.Format("{0}.{1}", prefix, value.Key), value.Value); 525 533 } 526 } 534 } 527 535 528 536 protected virtual void CreateRun() { … … 642 650 OnProblemChanged(); 643 651 } 644 void Algorithm_Runs_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IRun> e) { 652 void Algorithm_Runs_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IRun> e) { 645 653 if (subAlgorithmRuns != null) 646 654 foreach (var run in e.Items) { … … 686 694 (PreassignedSolutionCreator == null || !(PreassignedSolutionCreator is IRealVectorCreator))) 687 695 PreassignedSolutionCreator = new PreassignedRealVectorCreator(); 688 else if (problem.SolutionCreator is IPermutationCreator && 696 else if (problem.SolutionCreator is IPermutationCreator && 689 697 (PreassignedSolutionCreator == null || !(PreassignedSolutionCreator is IPermutationCreator))) 690 PreassignedSolutionCreator = new PreassignePermutationCreator(); 691 } 698 PreassignedSolutionCreator = new PreassignePermutationCreator(); 699 } 692 700 } 693 701 #endregion
Note: See TracChangeset
for help on using the changeset viewer.