Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17655


Ignore:
Timestamp:
07/07/20 17:46:40 (4 years ago)
Author:
abeham
Message:

#2521: adapted readonly of reference parameters

Location:
branches/2521_ProblemRefactoring
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessCovarianceOptimizationProblem.cs

    r17520 r17655  
    181181      Encoding.TreeLength = 10;
    182182      Encoding.TreeDepth = 5;
    183       Encoding.GrammarParameter.ReadOnly = false;
    184183      Encoding.Grammar = g;
    185       Encoding.GrammarParameter.ReadOnly = true;
     184      Encoding.GrammarParameter.ReadOnly = GrammarRefParameter.ReadOnly = true;
    186185    }
    187186
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Binary/3.3/DeceptiveTrapProblem.cs

    r17570 r17655  
    5858      Parameters.Add(TrapSizeParameter = new FixedValueParameter<IntValue>("Trap Size", "", new IntValue(7)));
    5959      Parameters.Add(NumberOfTrapsParameter = new FixedValueParameter<IntValue>("Number of Traps", "", new IntValue(7)));
    60       DimensionRefParameter.ReadOnly = true;
     60      Encoding.LengthParameter.ReadOnly = DimensionRefParameter.ReadOnly = true;
    6161      Dimension = TrapSize * NumberOfTraps;
    6262
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Problem.cs

    r17382 r17655  
    126126      Encoding.TreeLength = 20;
    127127      Encoding.TreeDepth = 10;
    128       Encoding.GrammarParameter.ReadOnly = false;
    129128      Encoding.Grammar = g;
    130       Encoding.GrammarParameter.ReadOnly = true;
     129      Encoding.GrammarParameter.ReadOnly = GrammarRefParameter.ReadOnly = true;
    131130
    132131      BestKnownQuality = 89;
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/BasicSymbolicRegression/Problem.cs

    r17520 r17655  
    175175      }
    176176
    177       Encoding.GrammarParameter.ReadOnly = false;
    178177      Encoding.Grammar = g;
    179       Encoding.GrammarParameter.ReadOnly = true;
     178      Encoding.GrammarParameter.ReadOnly = GrammarRefParameter.ReadOnly = true;
    180179    }
    181180    #endregion
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/EvenParityProblem.cs

    r17382 r17655  
    9595        g.AddTerminalSymbol(string.Format("{0}", i));
    9696
    97       Encoding.GrammarParameter.ReadOnly = false;
    9897      Encoding.Grammar = g;
    99       Encoding.GrammarParameter.ReadOnly = true;
     98      Encoding.GrammarParameter.ReadOnly = GrammarRefParameter.ReadOnly = true;
    10099
    101       BestKnownQualityParameter.ReadOnly = false;
    102100      BestKnownQuality = Math.Pow(2, NumberOfBits); // this is a benchmark problem (the best achievable quality is known for a given number of bits)
    103101      BestKnownQualityParameter.ReadOnly = true;
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/MultiplexerProblem.cs

    r17382 r17655  
    109109        g.AddTerminalSymbol(string.Format("d{0}", i));
    110110
    111       Encoding.GrammarParameter.ReadOnly = false;
    112111      Encoding.Grammar = g;
    113       Encoding.GrammarParameter.ReadOnly = true;
    114 
    115       BestKnownQualityParameter.ReadOnly = false;
     112      Encoding.GrammarParameter.ReadOnly = GrammarRefParameter.ReadOnly = true;
     113
    116114      BestKnownQuality = Math.Pow(2, NumberOfBits); // this is a benchmark problem (the best achievable quality is known for a given number of bits)
    117115      BestKnownQualityParameter.ReadOnly = true;
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Problem.cs

    r17382 r17655  
    7676      Encoding.TreeLength = 1000;
    7777      Encoding.TreeDepth = 17;
    78       Encoding.GrammarParameter.ReadOnly = false;
    7978      Encoding.Grammar = g;
    80       Encoding.GrammarParameter.ReadOnly = true;
     79      Encoding.GrammarParameter.ReadOnly = GrammarRefParameter.ReadOnly = true;
    8180    }
    8281
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/robocode/Problem.cs

    r17382 r17655  
    8888      Encoding.FunctionArguments = 0;
    8989      Encoding.FunctionDefinitions = 0;
     90      Encoding.GrammarParameter.ReadOnly = GrammarRefParameter.ReadOnly = true;
    9091
    9192      RegisterEventHandlers();
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GraphColoring/3.3/GraphColoringProblem.cs

    r17544 r17655  
    7474    public GraphColoringProblem() {
    7575      Maximization = false;
    76       Parameters.Add(adjacencyListParameter = new ValueParameter<IntMatrix>("Adjacency List", "The adjacency list that describes the (symmetric) edges in the graph with nodes from 0 to N-1."));
     76      Parameters.Add(adjacencyListParameter = new ValueParameter<IntMatrix>("Adjacency List", "The adjacency list that describes the (symmetric) edges in the graph with nodes from 0 to N-1.") { ReadOnly = true });
    7777      Parameters.Add(fitnessFunctionParameter = new ValueParameter<EnumValue<FitnessFunction>>("Fitness Function", "The function to use for evaluating the quality of a solution.", new EnumValue<FitnessFunction>(FitnessFunction.Penalized)));
    78       Parameters.Add(bestKnownColorsParameter = new OptionalValueParameter<IntValue>("BestKnownColors", "The least amount of colors in a valid coloring."));
     78      Parameters.Add(bestKnownColorsParameter = new OptionalValueParameter<IntValue>("BestKnownColors", "The least amount of colors in a valid coloring.") { ReadOnly = true });
    7979
    8080      var imat = new IntMatrix(defaultInstance.Length, 2);
     
    8484      }
    8585      Dimension = defaultInstanceNodes;
     86      Encoding.LengthParameter.ReadOnly = DimensionRefParameter.ReadOnly = true;
    8687      AdjacencyListParameter.Value = imat;
    8788      BestKnownQualityParameter.Value = null;
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs

    r17570 r17655  
    7777    public KnapsackProblem()
    7878      : base(new BinaryVectorEncoding("Selection")) {
    79       DimensionRefParameter.ReadOnly = true;
     79      Encoding.LengthParameter.ReadOnly = DimensionRefParameter.ReadOnly = true;
    8080      Maximization = true;
    8181      Parameters.Add(KnapsackCapacityParameter = new ValueParameter<IntValue>("KnapsackCapacity", "Capacity of the Knapsack.", new IntValue(1)));
Note: See TracChangeset for help on using the changeset viewer.