Changeset 2882 for trunk/sources/HeuristicLab.Optimization
- Timestamp:
- 02/27/10 03:35:11 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization/3.3
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization/3.3/Algorithm.cs
r2864 r2882 22 22 using System; 23 23 using System.Drawing; 24 using HeuristicLab.Collections; 24 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; … … 55 56 } 56 57 } 58 59 public abstract IObservableKeyedCollection<string, IVariable> Results { get; } 57 60 58 61 public abstract TimeSpan ExecutionTime { get; } -
trunk/sources/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs
r2864 r2882 21 21 22 22 using System; 23 using HeuristicLab.Collections; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; … … 68 69 } 69 70 71 private ReadOnlyObservableKeyedCollection<string, IVariable> readOnlyResults; 72 public override IObservableKeyedCollection<string, IVariable> Results { 73 get { 74 if (readOnlyResults == null) 75 readOnlyResults = ((VariableCollection)globalScope.Variables["Results"].Value).AsReadOnly(); 76 return readOnlyResults; 77 } 78 } 79 70 80 public override TimeSpan ExecutionTime { 71 81 get { … … 85 95 : base() { 86 96 globalScope = new Scope(); 97 globalScope.Variables.Add(new Variable("Results", new VariableCollection())); 87 98 OperatorGraph = new OperatorGraph(); 88 99 } … … 90 101 : base(name) { 91 102 globalScope = new Scope(); 103 globalScope.Variables.Add(new Variable("Results", new VariableCollection())); 92 104 OperatorGraph = new OperatorGraph(); 93 105 } … … 95 107 : base(name, parameters) { 96 108 globalScope = new Scope(); 109 globalScope.Variables.Add(new Variable("Results", new VariableCollection())); 97 110 OperatorGraph = new OperatorGraph(); 98 111 } … … 100 113 : base(name, description) { 101 114 globalScope = new Scope(); 115 globalScope.Variables.Add(new Variable("Results", new VariableCollection())); 102 116 OperatorGraph = new OperatorGraph(); 103 117 } … … 105 119 : base(name, description, parameters) { 106 120 globalScope = new Scope(); 121 globalScope.Variables.Add(new Variable("Results", new VariableCollection())); 107 122 OperatorGraph = new OperatorGraph(); 108 123 } … … 133 148 protected override void OnPrepared() { 134 149 globalScope.Clear(); 150 globalScope.Variables.Add(new Variable("Results", new VariableCollection())); 151 readOnlyResults = null; 152 135 153 if (engine != null) { 136 154 ExecutionContext context = null; -
trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
r2865 r2882 52 52 <None Include="HeuristicLabOptimizationPlugin.cs.frame" /> 53 53 <Compile Include="Algorithm.cs" /> 54 <Compile Include="Interfaces\IMultiObjectiveSelector.cs" /> 55 <Compile Include="Interfaces\ISingleObjectiveSelector.cs" /> 56 <Compile Include="Interfaces\IReducer.cs" /> 57 <Compile Include="Interfaces\ISelector.cs" /> 54 58 <Compile Include="Interfaces\IMultiObjectiveProblem.cs" /> 55 59 <Compile Include="Interfaces\IMultiObjectiveEvaluator.cs" /> -
trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IAlgorithm.cs
r2864 r2882 21 21 22 22 using System; 23 using HeuristicLab.Collections; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; … … 31 32 Type ProblemType { get; } 32 33 IProblem Problem { get; set; } 34 IObservableKeyedCollection<string, IVariable> Results { get; } 33 35 TimeSpan ExecutionTime { get; } 34 36 bool Running { get; }
Note: See TracChangeset
for help on using the changeset viewer.