Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/28/10 04:11:23 (14 years ago)
Author:
swagner
Message:

Implemented first version of algorithm batch processing (#947).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs

    r3017 r3226  
    8888    }
    8989
    90     private ReadOnlyObservableKeyedCollection<string, IVariable> readOnlyResults;
    91     public override IObservableKeyedCollection<string, IVariable> Results {
     90    public override ResultCollection Results {
    9291      get {
    93         if (readOnlyResults == null)
    94           readOnlyResults = ((VariableCollection)globalScope.Variables["Results"].Value).AsReadOnly();
    95         return readOnlyResults;
     92        return (ResultCollection)globalScope.Variables["Results"].Value;
    9693      }
    9794    }
     
    114111      : base() {
    115112      globalScope = new Scope("Global Scope");
    116       globalScope.Variables.Add(new Variable("Results", new VariableCollection()));
     113      globalScope.Variables.Add(new Variable("Results", new ResultCollection()));
    117114      OperatorGraph = new OperatorGraph();
    118115      InitializeEngine();
     
    121118      : base(name) {
    122119      globalScope = new Scope("Global Scope");
    123       globalScope.Variables.Add(new Variable("Results", new VariableCollection()));
     120      globalScope.Variables.Add(new Variable("Results", new ResultCollection()));
    124121      OperatorGraph = new OperatorGraph();
    125122      InitializeEngine();
     
    128125      : base(name, parameters) {
    129126      globalScope = new Scope("Global Scope");
    130       globalScope.Variables.Add(new Variable("Results", new VariableCollection()));
     127      globalScope.Variables.Add(new Variable("Results", new ResultCollection()));
    131128      OperatorGraph = new OperatorGraph();
    132129      InitializeEngine();
     
    135132      : base(name, description) {
    136133      globalScope = new Scope("Global Scope");
    137       globalScope.Variables.Add(new Variable("Results", new VariableCollection()));
     134      globalScope.Variables.Add(new Variable("Results", new ResultCollection()));
    138135      OperatorGraph = new OperatorGraph();
    139136      InitializeEngine();
     
    142139      : base(name, description, parameters) {
    143140      globalScope = new Scope("Global Scope");
    144       globalScope.Variables.Add(new Variable("Results", new VariableCollection()));
     141      globalScope.Variables.Add(new Variable("Results", new ResultCollection()));
    145142      OperatorGraph = new OperatorGraph();
    146143      InitializeEngine();
     
    181178    protected override void OnPrepared() {
    182179      globalScope.Clear();
    183       globalScope.Variables.Add(new Variable("Results", new VariableCollection()));
    184       readOnlyResults = null;
     180      globalScope.Variables.Add(new Variable("Results", new ResultCollection()));
    185181
    186182      if (engine != null) {
Note: See TracChangeset for help on using the changeset viewer.