Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/19/10 18:49:17 (15 years ago)
Author:
gkronber
Message:

Removed max. and min. time offset constraints as algorithm parameters and from all engines. The time constraints were added to the relevant terminal symbols (variable & differential) instead. The time offset constraint can be changed by editing the symbols in the function library. #880 (Max and min time offsets for variable symbols are not set correctly by FunctionLibraryInjectors)

Location:
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/OffspringSelectionGPTimeSeriesPrognosis.cs

    r2821 r2843  
    3535    }
    3636
    37     public int MinTimeOffset {
    38       get { return GetVariableInjector().GetVariable("MinTimeOffset").GetValue<IntData>().Data; }
    39       set { GetVariableInjector().GetVariable("MinTimeOffset").GetValue<IntData>().Data = value; }
    40     }
    41 
    42     public int MaxTimeOffset {
    43       get { return GetVariableInjector().GetVariable("MaxTimeOffset").GetValue<IntData>().Data; }
    44       set { GetVariableInjector().GetVariable("MaxTimeOffset").GetValue<IntData>().Data = value; }
    45     }
    46 
    4737    protected override IOperator CreateProblemInjector() {
    4838      return DefaultTimeSeriesOperators.CreateProblemInjector();
    49     }
    50 
    51     protected override IOperator CreateFunctionLibraryInjector() {
    52       CombinedOperator op = new CombinedOperator();
    53       op.Name = "FunctionLibraryInjector";
    54       SequentialProcessor seq = new SequentialProcessor();
    55       DefaultFunctionLibraryInjector funLibInjector = new DefaultFunctionLibraryInjector();
    56       seq.AddSubOperator(funLibInjector);
    57       seq.AddSubOperator(new ScalingTreeEvaluatorInjector());
    58       op.OperatorGraph.AddOperator(seq);
    59       op.OperatorGraph.InitialOperator = seq;
    60       return op;
    61     }
    62 
    63     protected override VariableInjector CreateGlobalInjector() {
    64       VariableInjector injector = base.CreateGlobalInjector();
    65       injector.AddVariable(new HeuristicLab.Core.Variable("MinTimeOffset", new IntData()));
    66       injector.AddVariable(new HeuristicLab.Core.Variable("MaxTimeOffset", new IntData()));
    67       return injector;
    6839    }
    6940
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/StandardGPTimeSeriesPrognosis.cs

    r2821 r2843  
    3535    }
    3636
    37     public int MinTimeOffset {
    38       get { return GetVariableInjector().GetVariable("MinTimeOffset").GetValue<IntData>().Data; }
    39       set { GetVariableInjector().GetVariable("MinTimeOffset").GetValue<IntData>().Data = value; }
    40     }
    41 
    42     public int MaxTimeOffset {
    43       get { return GetVariableInjector().GetVariable("MaxTimeOffset").GetValue<IntData>().Data; }
    44       set { GetVariableInjector().GetVariable("MaxTimeOffset").GetValue<IntData>().Data = value; }
    45     }
    46 
    4737    protected override IOperator CreateProblemInjector() {
    4838      return DefaultTimeSeriesOperators.CreateProblemInjector();
    4939    }
    5040
    51     protected override IOperator CreateFunctionLibraryInjector() {
    52       CombinedOperator op = new CombinedOperator();
    53       op.Name = "FunctionLibraryInjector";
    54       SequentialProcessor seq = new SequentialProcessor();
    55       DefaultFunctionLibraryInjector funLibInjector = new DefaultFunctionLibraryInjector();
    56       seq.AddSubOperator(funLibInjector);
    57       seq.AddSubOperator(new ScalingTreeEvaluatorInjector());
    58       op.OperatorGraph.AddOperator(seq);
    59       op.OperatorGraph.InitialOperator = seq;
    60       return op;
    61     }
    62 
    6341    protected override IOperator CreateModelAnalyzerOperator() {
    6442      return DefaultTimeSeriesOperators.CreatePostProcessingOperator();
    65     }
    66 
    67     protected override VariableInjector CreateGlobalInjector() {
    68       VariableInjector injector = base.CreateGlobalInjector();
    69       injector.AddVariable(new HeuristicLab.Core.Variable("MinTimeOffset", new IntData()));
    70       injector.AddVariable(new HeuristicLab.Core.Variable("MaxTimeOffset", new IntData()));
    71       return injector;
    7243    }
    7344
Note: See TracChangeset for help on using the changeset viewer.