Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2166


Ignore:
Timestamp:
07/16/09 14:23:36 (15 years ago)
Author:
gkronber
Message:

Removed range constraint on GP variable weights and constant values. #710

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

Legend:

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

    r1618 r2166  
    4444      GetVariableInfo(VALUE).Local = true;
    4545
    46       ConstrainedDoubleData valueData = new ConstrainedDoubleData();
     46      DoubleData valueData = new DoubleData();
    4747      // initialize a default range for the contant value
    48       valueData.AddConstraint(new DoubleBoundedConstraint(-20.0, 20.0));
    4948      HeuristicLab.Core.Variable value = new HeuristicLab.Core.Variable(VALUE, valueData);
    5049      AddVariable(value);
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/ModelAnalyzerExporter.cs

    r1529 r2166  
    120120
    121121    public static string ExportToHL2(this Constant constant, IFunctionTree tree) {
    122       double value = ((ConstrainedDoubleData)tree.GetLocalVariable(Constant.VALUE).Value).Data;
     122      double value = ((DoubleData)tree.GetLocalVariable(Constant.VALUE).Value).Data;
    123123      return "[T]Constant(" + value.ToString("r") + ";0;0)";
    124124    }
     
    129129
    130130    public static string ExportToHL2(this Differential differential, IFunctionTree tree) {
    131       double weight = ((ConstrainedDoubleData)tree.GetLocalVariable(Differential.WEIGHT).Value).Data;
     131      double weight = ((DoubleData)tree.GetLocalVariable(Differential.WEIGHT).Value).Data;
    132132      double index = ((ConstrainedIntData)tree.GetLocalVariable(Differential.INDEX).Value).Data;
    133133      double offset = ((ConstrainedIntData)tree.GetLocalVariable(Differential.OFFSET).Value).Data;
     
    177177
    178178    public static string ExportToHL2(this Variable variable, IFunctionTree tree) {
    179       double weight = ((ConstrainedDoubleData)tree.GetLocalVariable(Variable.WEIGHT).Value).Data;
     179      double weight = ((DoubleData)tree.GetLocalVariable(Variable.WEIGHT).Value).Data;
    180180      double index = ((ConstrainedIntData)tree.GetLocalVariable(Variable.INDEX).Value).Data;
    181181      double offset = ((ConstrainedIntData)tree.GetLocalVariable(Variable.OFFSET).Value).Data;
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Variable.cs

    r2165 r2166  
    6464      GetVariableInfo(MANIPULATION).Local = false;
    6565
    66       ConstrainedDoubleData weight = new ConstrainedDoubleData();
    67       // initialize a totally arbitrary range for the weight = [-1.0, 1.0]
    68       weight.AddConstraint(new DoubleBoundedConstraint(-1.0, 1.0));
     66      DoubleData weight = new DoubleData();
    6967      AddVariable(new HeuristicLab.Core.Variable(WEIGHT, weight));
    7068
Note: See TracChangeset for help on using the changeset viewer.