Free cookie consent management tool by TermsFeed Policy Generator

Opened 7 years ago

Closed 7 years ago

#2783 closed enhancement (done)

Provide useful helper methods in BasicProblem

Reported by: abeham Owned by: abeham
Priority: medium Milestone: HeuristicLab 3.3.15
Component: Optimization Version: 3.3.14
Keywords: Cc:

Description

It would be helpful if BasicProblem could offer a couple of helper methods:

  • Tuple<Individual, double> GetBestIndividual(Individual[], double[])
  • List<List<Tuple<Individual, double[]>>> GetParetoFronts(Individual[], double[][])
  • UpdateOrAddResult(string name, IItem value)

It is quite tedious to implement these over and over.

Change History (7)

comment:1 Changed 7 years ago by abeham

  • Owner set to abeham
  • Status changed from new to accepted

comment:2 Changed 7 years ago by abeham

  • Owner changed from abeham to mkommend
  • Status changed from accepted to reviewing

r15051:

  • Implemented GetBestIndividual as public static and protected method in SingleObjectiveBasicProblem
  • Impblemented GetParetorFronts as public static and protected method in MultiObjectiveBasicProblem
  • Implemented AddOrUpdateResult as public method in ResultCollection

comment:3 Changed 7 years ago by mkommend

  • Owner changed from mkommend to abeham
  • Status changed from reviewing to assigned

Reviewed r15051.

I am OK with the changes in the ResultCollection and SingleObjectiveBasicProblem as these are only minimal. However, ParetoFront calculation and domination are rather lengthy and spread throughout HL at various locations. It would be better to extract those in a separate utility class (related to #2592 comment 15).

comment:4 Changed 7 years ago by abeham

  • Owner changed from abeham to mkommend
  • Status changed from assigned to reviewing

r15080: Moved pareto front calculation from MultiObjectiveBasicProblem to a new class DominationCalculator<T>. Changed FastNonDominatedSort to use the new class.

I tested the changes with your NSGA-II results and others and given the same seed the results come out exactly the same as before.

comment:5 Changed 7 years ago by mkommend

r15086: Renamed individuals to solutions in DominationCalculator to be consistent with other methods. r15087: Reverse merge of unrelated changes r15086 in CheckedItemListView.

Version 0, edited 7 years ago by mkommend (next)

comment:6 Changed 7 years ago by mkommend

  • Owner changed from mkommend to abeham
  • Status changed from reviewing to readytorelease

Reviewed r15080.

comment:7 Changed 7 years ago by abeham

  • Resolution set to done
  • Status changed from readytorelease to closed

r15109: merged r15051,r15080,r15086,r15087 to stable

Note: See TracTickets for help on using tickets.