Opened 15 years ago
Last modified 14 years ago
#922 closed enhancement
Refactor cloning — at Version 63
Reported by: | swagner | Owned by: | swagner |
---|---|---|---|
Priority: | low | Milestone: | HeuristicLab 3.3.2 |
Component: | General | Version: | 3.3.2 |
Keywords: | Cc: |
Description (last modified by swagner)
If a class contains initialization code in the default parameterless constructor, this code usually does not have to be executed when creating a clone. Therefore using the default constructor for creating clones is not a good solution. There should be a specific constructor for this purpose.
Additionally it should also be checked, if every storable class provides a storable constructor.
Change History (63)
comment:1 Changed 15 years ago by swagner
- Priority changed from major to critical
comment:2 Changed 14 years ago by swagner
- Priority changed from critical to minor
comment:3 Changed 14 years ago by gkronber
- Owner changed from swagner to gkronber
- Status changed from new to accepted
comment:4 Changed 14 years ago by gkronber
comment:5 Changed 14 years ago by swagner
Added typed Clone method in Cloner in r4657.
comment:6 Changed 14 years ago by mkommend
- Version changed from 3.3 to branch
Added StorableConstructorTest and StorableClassAttribute.IsStorableClass in r4658.
comment:7 Changed 14 years ago by mkommend
Added CloningConstructorTest in r4660.
comment:8 Changed 14 years ago by mkommend
Added check for existence of the clone method in CloningConstructorTest in r4661.
comment:9 Changed 14 years ago by abeham
- Refactored HeuristicLab.Data
- Refactored HeuristicLab.Operators
comment:10 Changed 14 years ago by abeham
- Refactored HeuristicLab.Encodings.BinaryVectorEncoding
comment:11 Changed 14 years ago by abeham
- Refactored HeuristicLab.Encodings.IntegerVectorEncoding
comment:12 Changed 14 years ago by mkommend
Refactored Optimization in r4665.
comment:13 Changed 14 years ago by mkommend
Refactored Algorithms.DataAnalysis in r4666.
comment:14 Changed 14 years ago by abeham
- Refactored HeuristicLab.Encodings.PermutationEncoding
comment:15 Changed 14 years ago by swagner
- HeuristicLab.Common done
- HeuristicLab.Collections done
- HeuristicLab.Core done
comment:16 Changed 14 years ago by mkommend
Refactored Algorithms.* and fixed BoolValue in r4669.
comment:17 Changed 14 years ago by mkommend
Refactored Selection and fixed some errors and warnings in r4670.
comment:18 Changed 14 years ago by abeham
- Refactored HeuristicLab.Encodings.RealVectorEncoding
comment:19 Changed 14 years ago by swagner
- HeuristicLab.Parameters done
- simplification of cloning code in HeuristicLab.Core
comment:20 Changed 14 years ago by mkommend
Refactored Operators.* in r4673.
comment:21 Changed 14 years ago by gkronber
- Refactored cloning in SymbolicExpressionTreeEncoding
comment:22 Changed 14 years ago by swagner
- HeuristicLab.SequentialEngine done
- HeuristicLab.Random done
comment:23 Changed 14 years ago by mkommend
Refactored ArtificialAntProblem in r4676.
comment:24 Changed 14 years ago by abeham
- Refactored HeuristicLab.Analysis
comment:25 Changed 14 years ago by gkronber
- refactored cloning in DataAnalysis plugins.
comment:26 Changed 14 years ago by swagner
- HeuristicLab.Optimization.Operators done
comment:27 Changed 14 years ago by abeham
- Refactored HeuristicLab.Problems.Knapsack
comment:28 Changed 14 years ago by gkronber
- refactored cloning in HeuristicLab.Problems.OneMax
comment:29 Changed 14 years ago by mkommend
Refactored ExternalEvaluation.* and fixed some errors and warnings in r4681.
comment:30 Changed 14 years ago by abeham
- Refactored HeuristicLab.Problems.TravelingSalesman
comment:31 Changed 14 years ago by mkommend
Fixed warninings and errors in r4684.
comment:32 Changed 14 years ago by abeham
- Refactored HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests
comment:33 Changed 14 years ago by abeham
- Refactored Prins encoding in HeuristicLab.Problems.VehicleRouting
comment:34 Changed 14 years ago by mkommend
Refactored VRP Encodings.General and Zhu in r4687.
comment:35 Changed 14 years ago by swagner
- HeuristicLab.Problems.TestFunctions done
comment:36 Changed 14 years ago by abeham
- Refactored GVR encoding in HeuristicLab.Problems.VehicleRouting
comment:37 Changed 14 years ago by gkronber
- refactored cloning in HeuristicLab.Problems.VehicleRouting.
comment:38 Changed 14 years ago by mkommend
Worked on VRP project in r4691.
comment:39 Changed 14 years ago by gkronber
- Refactored cloning in HeuristicLab.Problems.VehicleRouting.
comment:40 Changed 14 years ago by mkommend
Fixed last errors in r4693.
comment:41 Changed 14 years ago by abeham
- Fixed most of the errors that surfaced in the test cases
- Removed storable attribute from SymbolicExpressionTreeStringFormatter
- Modified StorableConstructorTest that the StorableConstructor may also be public (such as in BoolValue)
comment:42 Changed 14 years ago by abeham
- Removed and sorted usings
comment:43 Changed 14 years ago by mkommend
Corrected some cloning errors in the Core plugin with r4711.
comment:44 Changed 14 years ago by abeham
- initialized list of variable names in storable constructor of variable symbol
comment:45 Changed 14 years ago by abeham
- fixed a cloning bug in Engine and Scope
comment:46 Changed 14 years ago by abeham
- fixed some bugs in the MinAverageMaxValueAnalyzer
comment:47 Changed 14 years ago by mkommend
Fixed some cloning bugs and removed unnecessary default ctors with r4718.
comment:48 Changed 14 years ago by swagner
Minor code restructuring in r4719.
comment:49 Changed 14 years ago by swagner
Merged cloning refactoring branch back into trunk in r4722.
comment:50 Changed 14 years ago by swagner
Removed cloning refactoring branch again in r4723.
comment:51 Changed 14 years ago by swagner
Fixed cloning bugs in r4725.
comment:52 Changed 14 years ago by swagner
- Owner changed from gkronber to swagner
- Status changed from accepted to reviewing
- Version changed from branch to 3.3.1
comment:53 Changed 14 years ago by abeham
Encountered and fixed a bug in r4737
comment:54 follow-up: ↓ 55 Changed 14 years ago by abeham
I tested the trunk (several algorithms on several problems, changing the operator graph, creating an experiment) with the changes from the cloning branch and encountered one more bug:
- I got a "sequence contains no element" exception when creating a new GA / Artificial Ant configuration and running it (running the sample works)
comment:55 in reply to: ↑ 54 Changed 14 years ago by gkronber
Replying to abeham:
I tested the trunk (several algorithms on several problems, changing the operator graph, creating an experiment) with the changes from the cloning branch and encountered one more bug:
- I got a "sequence contains no element" exception when creating a new GA / Artificial Ant configuration and running it (running the sample works)
I'm going to fix this asap.
comment:56 Changed 14 years ago by gkronber
Fixed a problem with ADFs in symbolic expression grammars with r4742.
comment:57 Changed 14 years ago by epitzer
Correct cloning of ProgrammableOperator and ensure static initialization in storable constructor (r4762)
comment:58 Changed 14 years ago by epitzer
Prevent cloning empty compiler errors (r4764)
comment:59 Changed 14 years ago by abeham
- Corrected event pattern in the projects that I converted to the new cloning pattern
comment:60 Changed 14 years ago by swagner
- Milestone changed from HeuristicLab x.x.x to HeuristicLab 3.3.2
comment:61 Changed 14 years ago by swagner
- Status changed from reviewing to assigned
Storable constructors are missing in the HeuristicLab.Persistence plugin.
comment:62 Changed 14 years ago by swagner
- Status changed from assigned to accepted
comment:63 Changed 14 years ago by swagner
- Description modified (diff)
Added branch for refactoring https://dev.heuristiclab.com/svn/hl/core/branches/CloningRefactoring with r4656.