Opened 9 years ago
Last modified 3 years ago
#2521 accepted enhancement
Refactor Problem/Encoding — at Version 59
Reported by: | abeham | Owned by: | mkommend |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 4.0 |
Component: | General | Version: | branch |
Keywords: | Cc: |
Description (last modified by mkommend)
- Merge HeuristicOptimizationProblem with BasicProblem
- Translate Scheduling/ScheduleEncoding
- Unify structure of Encodings
- Decouple Solutions from ValueTypeArrays (e.g. IntVector subclass IntArray)
- Type generation of generic types with reference between the type constraints fails
- SingleObjectiveProgrammableProblemView -> ProgrammableProblemView
- Swap TSolution and TEncoding
- Introduce new parameter type that can look up problems and algorithms
- Rename ISolution to IEncodedSolution
- Make operators (SingleObjectiveAnalyzer<TSolution>, ...) internal
- Introduce SolutionParameter in ISolutionCreator<TSolution>
- Create new interface that specifies solution parameter
- Adapt all operators to this interface
- Make ISingleObjectiveOperaotr a meaningful interface and adapt all operators
- Same for IMultiObjectiveOperator
- Adapt unit tests
- AckleyEvaluator change from evaluator to problem? stays the storable type GUID the same
- Cancellation token in Evaluate function of Problems
Compare with trunk:
- Knapsack Problem - Hamming Similartiy Calculator
- QAP
- External Evaluation
- P3 EvaluationTracker
- PSOSwarmUpdater & Initializer Boundsparameter
To discuss:
- 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.
Refactoring of Plugins
- HL.Problems.BinPacking
- HL.Problems.GraphColoring
- HL.Problems.PTSP
- HL.Problems.Scheduling
- HL.Problems.TestFunctions.MultiObjective
- HL.Algorithms.MOCMAEvolutionStrategy
Change History (59)
comment:1 Changed 9 years ago by mkommend
- Owner set to mkommend
- Status changed from new to accepted
comment:2 Changed 9 years ago by mkommend
r13330: Deleted wrongly created for problem refactoring.
comment:3 Changed 9 years ago by mkommend
r13331: Branched trunk/sources for problem refactoring.
comment:4 Changed 9 years ago by abeham
- Description modified (diff)
comment:5 Changed 9 years ago by mkommend
r13336: Refactored encodings and problems.
comment:6 Changed 9 years ago by mkommend
r13337: Added new class for problem refactoring.
comment:7 Changed 9 years ago by mkommend
r13339: Rectored problems and encodings.
comment:8 Changed 9 years ago by mkommend
r13345: refactored programmable problem
comment:9 Changed 9 years ago by mkommend
r13348: Refactored single-objective programmable problem.
comment:10 Changed 9 years ago by abeham
r13351: Adapted multi-encoding for new infrastructure
TODO: Evaluator, Analyzer, ... need to be copied
comment:11 Changed 9 years ago by abeham
r13356: working on multi-encoding
comment:12 Changed 9 years ago by abeham
r13357: changed solution name of combined encoding
comment:13 Changed 9 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 9 years ago by mkommend
comment:15 Changed 9 years ago by mkommend
r13362: Forgot to commit IMultiObjectiveProblem.
comment:16 Changed 9 years ago by mkommend
r13364: Refactored IntegerVectorEncoding, KnapsackProblem, and P3.
comment:17 Changed 9 years ago by abeham
r13365: fixed recreation of programmable problem's encoding
comment:18 Changed 9 years ago by mkommend
r13366: Adapted PermutationEncoding and TSP.
comment:19 Changed 9 years ago by mkommend
r13372: Fixed all problems.
comment:20 Changed 9 years ago by abeham
r13373: adapted templates, fixed missing reference in outdated plugin lawnmower
comment:21 Changed 9 years ago by abeham
r13374: removed obsolete file
comment:22 Changed 9 years ago by abeham
r13376: working on refactoring
comment:23 Changed 9 years ago by mkommend
r13377: Added missing interfaces to problems.
comment:24 Changed 9 years ago by abeham
r13380: updated categories, template
comment:25 Changed 9 years ago by abeham
r13382: added default ctor to SymbolicExpressionTreeEncoding (otherwise the parameter in Problem<..> cannot create it)
comment:26 Changed 9 years ago by abeham
r13385: fixed plugin dependencies and updated samples
comment:27 Changed 9 years ago by abeham
- Readded excluded views
- Removed ProblemInstanceProviderView which was not referenced in the project file
- Fixed plugin dependency
comment:28 Changed 9 years ago by abeham
r13390: fixed template and bug in programmable problem with multi encoding
comment:29 Changed 9 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 9 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 9 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 9 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 9 years ago by abeham
r13405: Implemented SchafferF6 test function
comment:34 Changed 9 years ago by abeham
- Description modified (diff)
comment:35 Changed 9 years ago by abeham
- Description modified (diff)
comment:36 Changed 9 years ago by abeham
- Description modified (diff)
comment:37 Changed 9 years ago by mkommend
- Description modified (diff)
comment:38 Changed 9 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 9 years ago by mkommend
r13422: Adapted type discovery and type selector to allow the creation of generic programmable problems.
comment:40 Changed 9 years ago by mkommend
- Description modified (diff)
comment:41 Changed 9 years ago by mkommend
r13435: Intermediate version of schedule encoding refactoring.
comment:42 Changed 9 years ago by mkommend
r13436: Minor improvements in SchedulingEncoding.
comment:43 Changed 9 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)
r13327: Branched whole trunk for problem refactoring.