Changeset 11595 for branches/ProgrammableProblem/HeuristicLab.Optimization
- Timestamp:
- 11/27/14 11:42:47 (10 years ago)
- Location:
- branches/ProgrammableProblem/HeuristicLab.Optimization/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/Algorithms/EngineAlgorithm.cs
r11171 r11595 159 159 if ((engine != null) && (operatorGraph.InitialOperator != null)) { 160 160 ExecutionContext context = null; 161 if (Problem != null) context = new ExecutionContext(context, Problem, globalScope); 161 if (Problem != null) { 162 foreach (var item in Problem.ExecutionContextItems) 163 context = new ExecutionContext(context, item, globalScope); 164 } 162 165 context = new ExecutionContext(context, this, globalScope); 163 166 context = new ExecutionContext(context, operatorGraph.InitialOperator, globalScope); -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/Interfaces/IProblem.cs
r11171 r11595 31 31 IEnumerable<IItem> Operators { get; } 32 32 33 34 IEnumerable<IParameterizedItem> ExecutionContextItems { get; } 33 35 event EventHandler OperatorsChanged; 34 36 event EventHandler Reset; -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/Problems/Problem.cs
r11573 r11595 116 116 IEnumerable<IItem> IProblem.Operators { get { return GetOperators(); } } 117 117 118 protected virtual IEnumerable<IItem> GetOperators() 119 { 118 protected virtual IEnumerable<IItem> GetOperators() { 120 119 return Operators; 120 } 121 122 public virtual IEnumerable<IParameterizedItem> ExecutionContextItems { 123 get { yield return this; } 121 124 } 122 125 #endregion -
branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/Problems/UserDefinedProblem.cs
r11171 r11595 115 115 get { return OperatorsParameter.Value; } 116 116 } 117 118 public IEnumerable<IParameterizedItem> ExecutionContextItems { 119 get { yield return this; } 120 } 117 121 #endregion 118 122
Note: See TracChangeset
for help on using the changeset viewer.