- Timestamp:
- 03/07/16 10:18:05 (9 years ago)
- Location:
- branches/WebJobManager
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/WebJobManager/HeuristicLab.Optimization/3.3/MetaOptimizers/BatchRun.cs
r12504 r13656 41 41 public string Filename { get; set; } 42 42 43 public static new Image StaticItemImage { 44 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 45 } 46 public override Image ItemImage { 47 get { 43 public static new Image StaticItemImage 44 { 45 get { return new Bitmap(25, 25); } 46 } 47 public override Image ItemImage 48 { 49 get 50 { 48 51 if (ExecutionState == ExecutionState.Prepared) return HeuristicLab.Common.Resources.VSImageLibrary.BatchRunPrepared; 49 52 else if (ExecutionState == ExecutionState.Started) return HeuristicLab.Common.Resources.VSImageLibrary.BatchRunStarted; … … 56 59 [Storable] 57 60 private ExecutionState executionState; 58 public ExecutionState ExecutionState { 61 public ExecutionState ExecutionState 62 { 59 63 get { return executionState; } 60 private set { 64 private set 65 { 61 66 if (executionState != value) { 62 67 executionState = value; … … 69 74 [Storable] 70 75 private TimeSpan executionTime; 71 public TimeSpan ExecutionTime { 72 get { 76 public TimeSpan ExecutionTime 77 { 78 get 79 { 73 80 if ((Optimizer != null) && (Optimizer.ExecutionState != ExecutionState.Stopped)) 74 81 return executionTime + Optimizer.ExecutionTime; … … 76 83 return executionTime; 77 84 } 78 private set { 85 private set 86 { 79 87 executionTime = value; 80 88 OnExecutionTimeChanged(); … … 87 95 [Storable] 88 96 private IOptimizer optimizer; 89 public IOptimizer Optimizer { 97 public IOptimizer Optimizer 98 { 90 99 get { return optimizer; } 91 set { 100 set 101 { 92 102 if (optimizer != value) { 93 103 if (optimizer != null) { … … 110 120 #region Backwards compatible code (remove with 3.4) 111 121 [Storable(AllowOneWay = true)] 112 private IAlgorithm algorithm { 122 private IAlgorithm algorithm 123 { 113 124 set { optimizer = value; } 114 125 } … … 117 128 [Storable] 118 129 private int repetitions; 119 public int Repetitions { 130 public int Repetitions 131 { 120 132 get { return repetitions; } 121 set { 133 set 134 { 122 135 if (repetitions != value) { 123 136 repetitions = value; … … 130 143 [Storable] 131 144 private int repetitionsCounter; 132 public int RepetitionsCounter { 145 public int RepetitionsCounter 146 { 133 147 get { return repetitionsCounter; } 134 private set { 148 private set 149 { 135 150 if (value != repetitionsCounter) { 136 151 repetitionsCounter = value; … … 142 157 [Storable] 143 158 private RunCollection runs; 144 public RunCollection Runs { 159 public RunCollection Runs 160 { 145 161 get { return runs; } 146 private set { 162 private set 163 { 147 164 if (value == null) throw new ArgumentNullException(); 148 165 if (runs != value) { … … 154 171 } 155 172 156 public IEnumerable<IOptimizer> NestedOptimizers { 157 get { 173 public IEnumerable<IOptimizer> NestedOptimizers 174 { 175 get 176 { 158 177 if (Optimizer == null) yield break; 159 178 -
branches/WebJobManager/HeuristicLab.Optimization/3.3/MetaOptimizers/Experiment.cs
r13000 r13656 40 40 public string Filename { get; set; } 41 41 42 public static new Image StaticItemImage { 43 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 44 } 45 public override Image ItemImage { 46 get { 42 public static new Image StaticItemImage 43 { 44 get { return new Bitmap(25, 25); } 45 } 46 public override Image ItemImage 47 { 48 get 49 { 47 50 if (ExecutionState == ExecutionState.Prepared) return HeuristicLab.Common.Resources.VSImageLibrary.ExperimentPrepared; 48 51 else if (ExecutionState == ExecutionState.Started) return HeuristicLab.Common.Resources.VSImageLibrary.ExperimentStarted; … … 55 58 [Storable] 56 59 private ExecutionState executionState; 57 public ExecutionState ExecutionState { 60 public ExecutionState ExecutionState 61 { 58 62 get { return executionState; } 59 private set { 63 private set 64 { 60 65 if (executionState != value) { 61 66 executionState = value; … … 68 73 [Storable] 69 74 private TimeSpan executionTime; 70 public TimeSpan ExecutionTime { 75 public TimeSpan ExecutionTime 76 { 71 77 get { return executionTime; } 72 private set { 78 private set 79 { 73 80 executionTime = value; 74 81 OnExecutionTimeChanged(); … … 78 85 [Storable] 79 86 private OptimizerList optimizers; 80 public OptimizerList Optimizers { 87 public OptimizerList Optimizers 88 { 81 89 get { return optimizers; } 82 90 } … … 84 92 [Storable] 85 93 private RunCollection runs; 86 public RunCollection Runs { 94 public RunCollection Runs 95 { 87 96 get { return runs; } 88 private set { 97 private set 98 { 89 99 if (value == null) throw new ArgumentNullException(); 90 100 if (runs != value) { … … 96 106 } 97 107 98 public IEnumerable<IOptimizer> NestedOptimizers { 99 get { 108 public IEnumerable<IOptimizer> NestedOptimizers 109 { 110 get 111 { 100 112 if (Optimizers == null) yield break; 101 113 -
branches/WebJobManager/HeuristicLab.Optimization/3.3/MetaOptimizers/TimeLimitRun.cs
r13321 r13656 43 43 44 44 #region ItemImage 45 public static new Image StaticItemImage { 46 get { return VSImageLibrary.Event; } 47 } 48 public override Image ItemImage { 45 public static new Image StaticItemImage 46 { 47 get { return new Bitmap(25, 25); } 48 } 49 public override Image ItemImage 50 { 49 51 get { return (Algorithm != null) ? Algorithm.ItemImage : VSImageLibrary.ExecutableStopped; } 50 52 } … … 56 58 [Storable] 57 59 private TimeSpan maximumExecutionTime; 58 public TimeSpan MaximumExecutionTime { 60 public TimeSpan MaximumExecutionTime 61 { 59 62 get { return maximumExecutionTime; } 60 set { 63 set 64 { 61 65 if (maximumExecutionTime == value) return; 62 66 maximumExecutionTime = value; … … 69 73 [Storable] 70 74 private ObservableList<TimeSpan> snapshotTimes; 71 public ObservableList<TimeSpan> SnapshotTimes { 75 public ObservableList<TimeSpan> SnapshotTimes 76 { 72 77 get { return snapshotTimes; } 73 set { 78 set 79 { 74 80 if (snapshotTimes == value) return; 75 81 snapshotTimes = value; … … 83 89 private bool storeAlgorithmInEachSnapshot; 84 90 [Storable] 85 public bool StoreAlgorithmInEachSnapshot { 91 public bool StoreAlgorithmInEachSnapshot 92 { 86 93 get { return storeAlgorithmInEachSnapshot; } 87 set { 94 set 95 { 88 96 if (storeAlgorithmInEachSnapshot == value) return; 89 97 storeAlgorithmInEachSnapshot = value; … … 94 102 [Storable] 95 103 private RunCollection snapshots; 96 public RunCollection Snapshots { 104 public RunCollection Snapshots 105 { 97 106 get { return snapshots; } 98 set { 107 set 108 { 99 109 if (snapshots == value) return; 100 110 snapshots = value; … … 104 114 105 115 #region Inherited Properties 106 public ExecutionState ExecutionState { 116 public ExecutionState ExecutionState 117 { 107 118 get { return (Algorithm != null) ? Algorithm.ExecutionState : ExecutionState.Stopped; } 108 119 } 109 120 110 public TimeSpan ExecutionTime { 121 public TimeSpan ExecutionTime 122 { 111 123 get { return (Algorithm != null) ? Algorithm.ExecutionTime : TimeSpan.FromSeconds(0); } 112 124 } … … 114 126 [Storable] 115 127 private IAlgorithm algorithm; 116 public IAlgorithm Algorithm { 128 public IAlgorithm Algorithm 129 { 117 130 get { return algorithm; } 118 set { 131 set 132 { 119 133 if (algorithm == value) return; 120 134 if (algorithm != null) DeregisterAlgorithmEvents(); … … 130 144 [Storable] 131 145 private RunCollection runs; 132 public RunCollection Runs { 146 public RunCollection Runs 147 { 133 148 get { return runs; } 134 private set { 149 private set 150 { 135 151 if (value == null) throw new ArgumentNullException(); 136 152 if (runs == value) return; … … 140 156 } 141 157 142 public IEnumerable<IOptimizer> NestedOptimizers { 143 get { 158 public IEnumerable<IOptimizer> NestedOptimizers 159 { 160 get 161 { 144 162 if (Algorithm == null) yield break; 145 163 yield return Algorithm;
Note: See TracChangeset
for help on using the changeset viewer.