Opened 8 years ago
Last modified 2 years ago
#2521 accepted enhancement
Refactor Problem/Encoding — at Version 78
Reported by: | abeham | Owned by: | mkommend |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 4.0 |
Component: | General | Version: | branch |
Keywords: | Cc: |
Description (last modified by mkommend)
- SingleObjective- & MultiObjectiveProblem introduce virtual member calls in their ctor to get the Maximization value, which poses a problem as the value might not be known at this time
- Return additional data from Evaluate (see discussion in #2774)
- Decouple Solutions from ValueTypeArrays (e.g. IntVector subclass IntArray)
- Change ExternalEvaluation to work similar to ProgrammableProblems
- Introduce new parameter type that can look up problems and algorithms
- Introduce SolutionParameter in ISolutionCreator<TSolution>
- Create new interface that specifies solution parameter
- Adapt all operators to this interface
- Adapt unit tests
- Cancellation token in Evaluate function of Problems
- Introduce base problems for each encoding
Refactoring of Plugins
- HL.Problems.BinPacking
- HL.Problems.GraphColoring abeham
- HL.Problems.PTSP
- HL.Problems.Scheduling
- HL.Problems.TestFunctions.MultiObjective mkommend
- HL.Problems.GrammaticalEvolution.DataAnalysis
- HL.Algorithms.MOCMAEvolutionStrategy
Compare with trunk:
- Knapsack Problem - Hamming Similartiy Calculator
- QAP
- External Evaluation
- P3 EvaluationTracker
- PSOSwarmUpdater & Initializer Boundsparameter
To discuss:
- Merge HeuristicOptimizationProblem with BasicProblem
- Add new() constraint on TEncoding and TSolution of the Problem classes to forbid the creation of a Problem with abstract or not instantiable type parameters.
- Provide specialized code templates, which are compiled, for programmable problems (e.g. BinaryProblem that configures the bounds correctly)
- Change name of result for best scope solution analyzer due to name clashes with programmable problems' analyze method.
- Unify structure of Encodings
- Make ISingleObjectiveOperator a meaningful interface and adapt all operators
- Same for IMultiObjectiveOperator
- AckleyEvaluator change from evaluator to problem? stays the storable type GUID the same
- Type generation of generic types with reference between the type constraints fails (e.g. set Encoding in ExternalEvaluation)
Change History (78)
comment:1 Changed 8 years ago by mkommend
- Owner set to mkommend
- Status changed from new to accepted
comment:2 Changed 8 years ago by mkommend
r13330: Deleted wrongly created for problem refactoring.
comment:3 Changed 8 years ago by mkommend
r13331: Branched trunk/sources for problem refactoring.
comment:4 Changed 8 years ago by abeham
- Description modified (diff)
comment:5 Changed 8 years ago by mkommend
r13336: Refactored encodings and problems.
comment:6 Changed 8 years ago by mkommend
r13337: Added new class for problem refactoring.
comment:7 Changed 8 years ago by mkommend
r13339: Rectored problems and encodings.
comment:8 Changed 8 years ago by mkommend
r13345: refactored programmable problem
comment:9 Changed 8 years ago by mkommend
r13348: Refactored single-objective programmable problem.
comment:10 Changed 8 years ago by abeham
r13351: Adapted multi-encoding for new infrastructure
TODO: Evaluator, Analyzer, ... need to be copied
comment:11 Changed 8 years ago by abeham
r13356: working on multi-encoding
comment:12 Changed 8 years ago by abeham
r13357: changed solution name of combined encoding
comment:13 Changed 8 years ago by abeham
r13359: worked on multi-encoding (it works again). Some issues are still present:
- The programmable template needs to be slightly updated for multi-encoding
- The encoding is recreated every time it is compiled making it impossible to configure operators
comment:14 Changed 8 years ago by mkommend
comment:15 Changed 8 years ago by mkommend
r13362: Forgot to commit IMultiObjectiveProblem.
comment:16 Changed 8 years ago by mkommend
r13364: Refactored IntegerVectorEncoding, KnapsackProblem, and P3.
comment:17 Changed 8 years ago by abeham
r13365: fixed recreation of programmable problem's encoding
comment:18 Changed 8 years ago by mkommend
r13366: Adapted PermutationEncoding and TSP.
comment:19 Changed 8 years ago by mkommend
r13372: Fixed all problems.
comment:20 Changed 8 years ago by abeham
r13373: adapted templates, fixed missing reference in outdated plugin lawnmower
comment:21 Changed 8 years ago by abeham
r13374: removed obsolete file
comment:22 Changed 8 years ago by abeham
r13376: working on refactoring
comment:23 Changed 8 years ago by mkommend
r13377: Added missing interfaces to problems.
comment:24 Changed 8 years ago by abeham
r13380: updated categories, template
comment:25 Changed 8 years ago by abeham
r13382: added default ctor to SymbolicExpressionTreeEncoding (otherwise the parameter in Problem<..> cannot create it)
comment:26 Changed 8 years ago by abeham
r13385: fixed plugin dependencies and updated samples
comment:27 Changed 8 years ago by abeham
- Readded excluded views
- Removed ProblemInstanceProviderView which was not referenced in the project file
- Fixed plugin dependency
comment:28 Changed 8 years ago by abeham
r13390: fixed template and bug in programmable problem with multi encoding
comment:29 Changed 8 years ago by abeham
- Refactored QuadraticAssignmentProblem to use new SingleObjectiveProblem
- Removed QAPEvaluator
- Adapted RobustTabooSearch
- Introduced several interfaces in PermutationEncoding necessary for wiring
- Changed all Encodings to use IItem instead of IOperator in ConfigureOperators (name still unchanged)
- Added a protected MaximizationParameter property in SingleObjectiveProblem (necessary for wiring)
- Changed AlleleFrequencyAnalyzer to use ISolution interface instead of IItem
- Added a comment to ISolutionCreator<TSolution> of some changes that would be welcomed
comment:30 Changed 8 years ago by abeham
- Adapted single-objective test function problem to new problem infrastructure
- Added additional interfaces to RealVectorEncoding
- Fixed IParticleUpdater interface (must implement IStochasticOperator if it contains a Random parameter)
comment:31 Changed 8 years ago by abeham
I'd like to suggest that we swap the generic type parameters from Problem<TEncoding, TSolution> to Problem<TSolution, TEncoding>. The reason is that TSolution is limiting TEncoding and not vice versa. It feels strange to write the more limiting generic type parameter first.
comment:32 Changed 8 years ago by abeham
- 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
comment:33 Changed 8 years ago by abeham
r13405: Implemented SchafferF6 test function
comment:34 Changed 8 years ago by abeham
- Description modified (diff)
comment:35 Changed 8 years ago by abeham
- Description modified (diff)
comment:36 Changed 8 years ago by abeham
- Description modified (diff)
comment:37 Changed 8 years ago by mkommend
- Description modified (diff)
comment:38 Changed 8 years ago by mkommend
r13408: Adapted unit tests in problem refactoring branch.
All compile, some fail:
- SA Rastrigin example (missing move evaluators?)
- LS Knapsack example
comment:39 Changed 8 years ago by mkommend
r13422: Adapted type discovery and type selector to allow the creation of generic programmable problems.
comment:40 Changed 8 years ago by mkommend
- Description modified (diff)
comment:41 Changed 8 years ago by mkommend
r13435: Intermediate version of schedule encoding refactoring.
comment:42 Changed 8 years ago by mkommend
r13436: Minor improvements in SchedulingEncoding.
comment:43 Changed 8 years ago by mkommend
r13437: Added encodings for schedules.
comment:44 Changed 8 years ago by mkommend
r13443: Adapted decoders for SchedulingProblem.
comment:45 Changed 8 years ago by pfleck
- Replaced JSMDecodingErrorPolicy and JSMForcingStrategy with EnumValues.
- Removed obsolete views for the scheduling enums.
comment:46 Changed 8 years ago by mkommend
r13469: Refactored problem base classes and adapted scheduling encoding, scheduling problem and unit tests.
comment:47 Changed 8 years ago by mkommend
- Description modified (diff)
comment:48 Changed 7 years ago by abeham
r14684: added clean script
comment:49 Changed 6 years ago by abeham
r15697: renamed branch according to guidelines
comment:50 Changed 5 years ago by abeham
comment:51 Changed 5 years ago by abeham
comment:52 Changed 5 years ago by abeham
comment:53 Changed 5 years ago by mkommend
r16724: Corrected compilation errors in some projects.
comment:54 Changed 5 years ago by abeham
- Adapt Encodings.ScheduleEncoding to new persistence
- Adapt Problems.Programmable to new persistence
comment:55 Changed 5 years ago by abeham
r16726: fixed single-objective test functions
comment:56 Changed 5 years ago by mkommend
- Description modified (diff)
comment:57 Changed 5 years ago by mkommend
- Description modified (diff)
comment:58 Changed 5 years ago by abeham
r16749: fixed RealVectorEncoding
comment:59 Changed 5 years ago by mkommend
- Description modified (diff)
comment:60 Changed 5 years ago by mkommend
- Description modified (diff)
r16750: Renamed SingleObjectiveProgrammableProblemView to ProgrammableProblemView.
comment:61 Changed 5 years ago by abeham
- Description modified (diff)
comment:62 Changed 5 years ago by mkommend
- Description modified (diff)
r16751: Renamed Solution to EncodedSolution.
comment:63 Changed 5 years ago by abeham
r16752: added comment to P3
- removed todos from EvaluationServiceClientView
comment:64 Changed 5 years ago by mkommend
- Description modified (diff)
comment:65 Changed 5 years ago by mkommend
r16753: Made basic problem specific operators internal and sealed.
comment:66 Changed 5 years ago by mkommend
- Description modified (diff)
comment:67 Changed 5 years ago by abeham
r16767: Adapted graph coloring problem
comment:68 Changed 5 years ago by mkommend
- Description modified (diff)
comment:69 Changed 5 years ago by mkommend
r16801: Merged trunk changes and adapted programmable problem templates for combined solutions.
comment:70 Changed 5 years ago by mkommend
- Description modified (diff)
comment:71 Changed 5 years ago by mkommend
comment:72 Changed 5 years ago by mkommend
r16808: Added StorableType to FitnessFunction enum of GraphColoringProblem.
comment:73 Changed 5 years ago by abeham
- Description modified (diff)
comment:74 Changed 5 years ago by abeham
r16811: Removed usage of default constructor
comment:75 Changed 5 years ago by mkommend
- Description modified (diff)
comment:77 Changed 5 years ago by mkommend
- Description modified (diff)
comment:78 Changed 5 years ago by mkommend
- Description modified (diff)
r13327: Branched whole trunk for problem refactoring.