Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/26/15 09:30:43 (9 years ago)
Author:
abeham
Message:

#2521:

  • Adapted Knapsack problem to new problem infrastructure
  • Introduced additional interfaces in binary vector encoding
  • Improved KnapsackImprovementOperator which requires less evaluated solutions in case of an infeasible start solution

Loosely related change:

  • All LookupParameters are now shown by default
  • Wiring code should make sure that wired parameters are hidden
Location:
branches/ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/ISingleObjectiveProblemDefinition.cs

    r13361 r13404  
    2828    where TSolution : class, ISolution {
    2929    bool Maximization { get; }
    30     double Evaluate(TSolution individual, IRandom random);
    31     void Analyze(TSolution[] individuals, double[] qualities, ResultCollection results, IRandom random);
    32     IEnumerable<TSolution> GetNeighbors(TSolution individual, IRandom random);
     30    double Evaluate(TSolution solution, IRandom random);
     31    void Analyze(TSolution[] solutions, double[] qualities, ResultCollection results, IRandom random);
     32    IEnumerable<TSolution> GetNeighbors(TSolution solution, IRandom random);
    3333    bool IsBetter(double quality, double bestQuality);
    3434  }
  • branches/ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/SingleObjectiveProblem.cs

    r13396 r13404  
    100100
    101101    public abstract bool Maximization { get; }
    102     public abstract double Evaluate(TSolution individual, IRandom random);
    103     public virtual void Analyze(TSolution[] individuals, double[] qualities, ResultCollection results, IRandom random) { }
    104     public virtual IEnumerable<TSolution> GetNeighbors(TSolution individual, IRandom random) {
     102    public abstract double Evaluate(TSolution solution, IRandom random);
     103    public virtual void Analyze(TSolution[] solutions, double[] qualities, ResultCollection results, IRandom random) { }
     104    public virtual IEnumerable<TSolution> GetNeighbors(TSolution solution, IRandom random) {
    105105      return Enumerable.Empty<TSolution>();
    106106    }
Note: See TracChangeset for help on using the changeset viewer.