Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/15/14 15:06:57 (10 years ago)
Author:
abeham
Message:

#2174: Worked on programmable problem

  • Changed ProblemBase to IProblemDefinition and SingleObjectiveProblemBase to ISingleObjectiveProblemDefinition
  • Derived ParameterVectorCreater, -Crossover, and -Manipulator from MultiOperator<> instead of InstrumentedOperator
  • Split the megamoth ScriptOnInstanceChanged to multiple methods dealing with single-vector and multi-vector encodings separately, it's still a lot of tedious code
  • Removed maximization from Configuration again (would not be consistent with multi-objective problems)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/RealParameterConfiguration.cs

    r10850 r10856  
    6161      bounds = cloner.Clone(original.bounds);
    6262    }
    63     public RealParameterConfiguration(int length, double min, double max)
    64       : base() {
     63    public RealParameterConfiguration(int length, double min, double max) {
    6564      if (min >= max) throw new ArgumentException("min must be less than max", "min");
    6665      this.length = new IntValue(length);
     
    6968      bounds[0, 1] = max;
    7069    }
    71     public RealParameterConfiguration(int length, IList<double> min, IList<double> max)
    72       : base() {
     70    public RealParameterConfiguration(int length, IList<double> min, IList<double> max) {
    7371      if (min.Count == 0) throw new ArgumentException("Bounds must be given for the real parameters.");
    7472      if (min.Count != max.Count) throw new ArgumentException("min must be of the same length as max", "min");
    75       if (min.Zip(max, (m, M) => m >= M).Any()) throw new ArgumentException("min must be less than max in each dimension", "min");
     73      if (min.Zip(max, (mi, ma) => mi >= ma).Any()) throw new ArgumentException("min must be less than max in each dimension", "min");
    7674      this.length = new IntValue(length);
    7775      bounds = new DoubleMatrix(min.Count, 2);
Note: See TracChangeset for help on using the changeset viewer.