- Timestamp:
- 03/28/10 04:11:23 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs
r3017 r3226 88 88 } 89 89 90 private ReadOnlyObservableKeyedCollection<string, IVariable> readOnlyResults; 91 public override IObservableKeyedCollection<string, IVariable> Results { 90 public override ResultCollection Results { 92 91 get { 93 if (readOnlyResults == null) 94 readOnlyResults = ((VariableCollection)globalScope.Variables["Results"].Value).AsReadOnly(); 95 return readOnlyResults; 92 return (ResultCollection)globalScope.Variables["Results"].Value; 96 93 } 97 94 } … … 114 111 : base() { 115 112 globalScope = new Scope("Global Scope"); 116 globalScope.Variables.Add(new Variable("Results", new VariableCollection()));113 globalScope.Variables.Add(new Variable("Results", new ResultCollection())); 117 114 OperatorGraph = new OperatorGraph(); 118 115 InitializeEngine(); … … 121 118 : base(name) { 122 119 globalScope = new Scope("Global Scope"); 123 globalScope.Variables.Add(new Variable("Results", new VariableCollection()));120 globalScope.Variables.Add(new Variable("Results", new ResultCollection())); 124 121 OperatorGraph = new OperatorGraph(); 125 122 InitializeEngine(); … … 128 125 : base(name, parameters) { 129 126 globalScope = new Scope("Global Scope"); 130 globalScope.Variables.Add(new Variable("Results", new VariableCollection()));127 globalScope.Variables.Add(new Variable("Results", new ResultCollection())); 131 128 OperatorGraph = new OperatorGraph(); 132 129 InitializeEngine(); … … 135 132 : base(name, description) { 136 133 globalScope = new Scope("Global Scope"); 137 globalScope.Variables.Add(new Variable("Results", new VariableCollection()));134 globalScope.Variables.Add(new Variable("Results", new ResultCollection())); 138 135 OperatorGraph = new OperatorGraph(); 139 136 InitializeEngine(); … … 142 139 : base(name, description, parameters) { 143 140 globalScope = new Scope("Global Scope"); 144 globalScope.Variables.Add(new Variable("Results", new VariableCollection()));141 globalScope.Variables.Add(new Variable("Results", new ResultCollection())); 145 142 OperatorGraph = new OperatorGraph(); 146 143 InitializeEngine(); … … 181 178 protected override void OnPrepared() { 182 179 globalScope.Clear(); 183 globalScope.Variables.Add(new Variable("Results", new VariableCollection())); 184 readOnlyResults = null; 180 globalScope.Variables.Add(new Variable("Results", new ResultCollection())); 185 181 186 182 if (engine != null) {
Note: See TracChangeset
for help on using the changeset viewer.