Opened 11 years ago

Closed 9 years ago

Last modified 9 years ago

#95 closed enhancement (done)

Refactor operator architecture

Reported by: swagner Owned by: swagner
Priority: highest Milestone: HeuristicLab 3.3.0
Component: Core Version: 3.3
Keywords: Cc: gkronber

Description

The operator architecture suffers from some drawbacks related to calling operators and handling parameters.

This ticket represents a master ticket for a comprehensive refactoring of the operator architecture.

Related tickets: #48, #57, #67, #68, #93, #94

Change History (123)

comment:1 Changed 11 years ago by gkronber

I take the chance to describe some of my views in this ticket. I believe there are strong symmetries in the current evaluation model of HL and the evaluation model of Scheme. So the ideas I pursued the last few days are mainly about adapting the way name-binding is handled in Scheme for HL. This is in line with the idea of what we called 'Call'-objects in our previous discussion leading to ticket #57. The main concept being to move the functionality of scopes into two separate entities. My view is that scopes mix two separate concepts:

  1. Grouping simple values to an collection of values (which are moved and destroyed together)
    1. Binding of names to values
    2. Binding of formal and actual names (over multiple steps)

The rough idea is to move bindings to 'environments' or 'frames' which are created by the engine for each application of an operator to a scope. The engine stores the mapping of actual to formal names for the current operator in the environment. Environments can be hierarchically linked (for instance when using CombinedOperators). In the new model the scopes would only store variables in a structured and easily navigable data-structure same as now. Bindings in environments point to the data in the scope-tree. We could probably implement this almost in the same way as it is implemented in the scopes now.

However the environment-model is probably bad in our situation. We have to remember that the scope-tree was designed especially in this way to make parallelization easy. The scheme environment-model is definitely not adequate for this and would have to be stripped down severely to prevent problems. There are also other minor issues that I won't discuss in this ticket. It should suffice to say that it gets messy quickly.

Anyway my conclusion for now is that while we might copy some smaller ideas from scheme it's probably not possible fully adapt the evaluation model of HL to it. Further discussions are needed.

comment:2 Changed 11 years ago by swagner

  • Status changed from new to assigned

comment:3 Changed 11 years ago by swagner

  • Milestone changed from 3.1 to 3.2
  • Version changed from 3.1 to 3.2

comment:4 Changed 11 years ago by swagner

  • Owner swagner deleted
  • Status changed from assigned to new

comment:5 Changed 11 years ago by swagner

  • Owner set to swagner

comment:6 Changed 11 years ago by swagner

  • Status changed from new to assigned

comment:7 Changed 11 years ago by swagner

Created branch "Operator Architecture Refactoring" in r606

comment:8 Changed 11 years ago by swagner

  • Status changed from assigned to new

comment:9 Changed 11 years ago by swagner

  • Status changed from new to assigned

comment:10 Changed 11 years ago by swagner

  • Status changed from assigned to new

comment:11 Changed 11 years ago by swagner

  • Status changed from new to assigned

comment:12 Changed 11 years ago by swagner

Removed branch "Operator Architecture Refactoring" in r878 and created it again in r879.

comment:13 Changed 10 years ago by swagner

  • Milestone changed from 3.2 to Iteration 0

Milestone 3.2 deleted

comment:14 Changed 10 years ago by swagner

Removed branch "Operator Architecture Refactoring" in r1991.

comment:15 Changed 10 years ago by swagner

Created branch "Operator Architecture Refactoring" again in r1992. Finally, the time has come to get this done!!!

comment:16 Changed 10 years ago by swagner

Refactoring of the operator architecture started in r1994.

comment:17 Changed 10 years ago by swagner

Continued refactoring in r2027.

comment:18 Changed 10 years ago by swagner

Continued refactoring in r2029.

comment:19 Changed 10 years ago by swagner

Continued refactoring in r2030.

comment:20 follow-up: Changed 10 years ago by swagner

Continued refactoring in r2033.

comment:21 in reply to: ↑ 20 ; follow-up: Changed 10 years ago by epitzer

Replying to swagner:

Continued refactoring in r2033.

When you are using the GC memory handles, they might actually change while you use them. Why not simply use plain old references to all already objects? They are safer and more transparent and will get rid of the need for GUIDs or ids alltogether.

comment:22 in reply to: ↑ 21 Changed 10 years ago by swagner

Replying to epitzer:

Replying to swagner:

Continued refactoring in r2033.

When you are using the GC memory handles, they might actually change while you use them. Why not simply use plain old references to all already objects? They are safer and more transparent and will get rid of the need for GUIDs or ids alltogether.

OK, I will change this according to your suggestion.

comment:23 Changed 10 years ago by swagner

Continued refactoring in r2042.

comment:24 Changed 10 years ago by swagner

Continued refactoring in r2046.

comment:25 Changed 10 years ago by swagner

  • Version changed from 3.2 to 3.3

comment:26 Changed 10 years ago by swagner

Starting to commit first results from the refactoring of HeuristicLab.Core and related plugins. Multiple commits will follow now. Please note that the HeuristicLab 3.3 solution might not build until all commits are done.

comment:27 Changed 10 years ago by swagner

Committed HeuristicLab.Core in r2652 and r2653.

comment:28 Changed 10 years ago by swagner

Committed HeuristicLab.Core.Views in r2654 and r2655.

comment:29 Changed 10 years ago by swagner

Committed remaining changes in r2656.

comment:30 Changed 10 years ago by swagner

Finished committing first results from the refactoring of HeuristicLab.Core and related plugins.

NOTE: Not all plugins in the HeuristicLab 3.3 solution have already been adapted to these changes. Therefore they will NOT build at the moment and have to be unloaded in the solution.

comment:31 Changed 10 years ago by swagner

Fixed update of execution time in EngineBaseView in r2662.

comment:32 Changed 10 years ago by swagner

Started to adapt HeuristicLab.Data and HeuristicLab.Operators in r2663.

comment:33 Changed 10 years ago by swagner

Abandoned policy that the names of all abstract base classes have to end with "Base" in r2664. Renaming of all base classes has to be carried out in some other plugins such as HeuristicLab.PluginInfrastructure or HeuristicLab.MainForm as well.

comment:34 Changed 9 years ago by swagner

Continued work on HeuristicLab.Data in r2665.

comment:35 Changed 9 years ago by swagner

Continued work on HeuristicLab.Data in r2669.

comment:36 Changed 9 years ago by swagner

Unified visual appearance of views and continued work on HeuristicLab.Data in r2676.

comment:37 Changed 9 years ago by swagner

Continued work on HeuristicLab.Data in r2677.

comment:38 Changed 9 years ago by swagner

Continued work on HeuristicLab.Data and HeuristicLab.Operators in r2684.

comment:39 Changed 9 years ago by swagner

Fixed error in parameter lookup in r2685.

comment:40 Changed 9 years ago by swagner

Started to implement ideas which came up during today's presentation of HeuristicLab.Core and related plugins in r2687.

comment:41 Changed 9 years ago by swagner

Finished to implement ideas which came up during yesterday's presentation of HeuristicLab.Core and related plugins in r2694.

comment:42 Changed 9 years ago by swagner

Added two new plugins for parameters and parameter views in r2714.

comment:43 Changed 9 years ago by swagner

Adapted on parameters to be able to use generic content types of views in r2715.

comment:44 Changed 9 years ago by swagner

Worked on content definitions of views and corrected a bug when cloning a CombinedOperator in r2727.

comment:45 Changed 9 years ago by swagner

Fixed hint path for external libraries used in HeuristicLab.Persistence in r2731.

comment:46 Changed 9 years ago by swagner

Added extension method to pretty print type names in r2739.

comment:47 Changed 9 years ago by swagner

Worked on parameters and operators in r2740.

comment:48 Changed 9 years ago by swagner

Added ItemArray and ItemArrayView in r2746.

comment:49 Changed 9 years ago by swagner

Changed access modifiers in CombinedOperatorView in r2747.

comment:50 Changed 9 years ago by swagner

Worked on parameters and operators in r2756.

comment:51 Changed 9 years ago by swagner

Worked on parameters and operators in r2757.

comment:52 Changed 9 years ago by swagner

Worked on parameters and operators in r2773.

comment:53 Changed 9 years ago by swagner

Implemented reviewers' comments and added additional plugins HeuristicLab.Evolutionary, HeuristicLab.Permutation, HeuristicLab.Selection, and HeuristicLab.Routing.TSP in r2790.

comment:54 Changed 9 years ago by swagner

Implemented reviewers' comments in r2791.

comment:55 Changed 9 years ago by swagner

Added method ShowView to ViewHost to be able to set the currently shown view in r2792.

comment:56 Changed 9 years ago by swagner

Replaced new EventArgs() by EventArgs.Empty in r2793.

comment:57 Changed 9 years ago by swagner

Worked on operators in r2794.

comment:58 Changed 9 years ago by swagner

Worked on operators, parameters and problems in r2796.

comment:59 Changed 9 years ago by mkommend

changed ViewHost to cach the currently display ViewType r2797

comment:60 Changed 9 years ago by swagner

Added some minor changes of ViewHost in r2800.

comment:61 Changed 9 years ago by swagner

Worked on parameters, TSP and selection in r2805.

comment:62 Changed 9 years ago by mkommend

corrected bug in ViewHost r2809

comment:63 Changed 9 years ago by swagner

Worked on selection on r2817.

comment:64 Changed 9 years ago by swagner

Corrected several bugs in order to get SGA working in r2818.

comment:65 Changed 9 years ago by abeham

Added MPX and PMX operator in r2820

comment:66 Changed 9 years ago by abeham

Updated MPX and PMX in r2823

comment:67 Changed 9 years ago by swagner

Worked on operators and SGA and improved performance in r2830.

comment:68 Changed 9 years ago by swagner

Implemented reviewers' comments in r2831.

comment:69 Changed 9 years ago by swagner

Corrected minor bugs in r2833.

comment:70 Changed 9 years ago by swagner

Worked on operators, engines and optimization in r2834.

comment:71 Changed 9 years ago by mkommend

changed ViewHost to use ViewContextMenuStrip r2838

comment:72 Changed 9 years ago by mkommend

corrected bug in setter of ViewHost.viewType (allowed null to be set) r2839

comment:73 Changed 9 years ago by abeham

Added a test project for HeuristicLab.Permutation in r2836 and r2840 updated OX in r2835

comment:74 Changed 9 years ago by mkommend

corrected ViewHost; viewsLabel tooltip and image r2841

comment:75 Changed 9 years ago by swagner

Worked on parameterized items in r2845.

comment:76 Changed 9 years ago by swagner

Worked on algorithms in r2851.

comment:77 Changed 9 years ago by swagner

Worked on algorithms in r2852.

comment:78 Changed 9 years ago by swagner

Worked on algorithms in r2857.

comment:79 Changed 9 years ago by swagner

Implemented reviewers' comments in r2863.

comment:80 Changed 9 years ago by swagner

Worked on algorithms in r2864.

comment:81 Changed 9 years ago by swagner

Worked on algorithms in r2865.

comment:82 Changed 9 years ago by swagner

Added missing files in r2866.

comment:83 Changed 9 years ago by abeham

Added permutation operator variants and readded all references in r2871

comment:84 Changed 9 years ago by abeham

updated CosaCrossover in r2879

comment:85 Changed 9 years ago by abeham

removed the AbsoluteTopologicalCrossover in r2880 as discussed with swagner

comment:86 Changed 9 years ago by swagner

Worked on algorithms in r2882.

comment:87 Changed 9 years ago by swagner

Renamed HeuristicLab.Routing.TSP to HeuristicLab.Problems.TSP in r2883.

comment:88 Changed 9 years ago by swagner

Renamed HeuristicLab.SGA to HeuristicLab.Algorithms.SGA in r2884:2889.

comment:89 Changed 9 years ago by swagner

Worked on algorithms, problems and parameters in r2890.

comment:90 Changed 9 years ago by swagner

Worked on algorithms and parameters in r2891.

comment:91 Changed 9 years ago by mkommend

removed accidentally commited resize events on ItemCollectionsView r2892

comment:92 Changed 9 years ago by swagner

Removed unnecessary folder in r2894.

comment:93 Changed 9 years ago by swagner

Removed unnecessary file from project in r2903.

comment:94 Changed 9 years ago by swagner

Added project dependency, files entry and svn:ignore properties for HeuristicLab.Encodings.RealVector in r2905.

comment:95 Changed 9 years ago by swagner

Renamed HeuristicLab.Permutation to HeuristicLab.Encodings.Permutation in r2906.

comment:96 Changed 9 years ago by swagner

Restructured HeuristicLab.Encodings.Permutation project in r2907.

comment:97 Changed 9 years ago by swagner

Worked on analysis in r2908.

comment:98 Changed 9 years ago by swagner

Corrected plugin metadata and license headers in r2911.

comment:99 Changed 9 years ago by swagner

Corrected svn:ignore properties in r2912.

comment:100 Changed 9 years ago by abeham

included some operators in RealVector in r2913

comment:101 Changed 9 years ago by swagner

Worked on engines and algorithms in r2916.

comment:102 Changed 9 years ago by swagner

Implemented reviewers' comments concerning GUI in r2917.

comment:103 Changed 9 years ago by swagner

Implemented reviewers' comments on version r2917 in r2924.

comment:104 Changed 9 years ago by abeham

changed namespace of unit tests in RealVector and Permutation in r2929. This is necessary as otherwise there would be multiple tests with the same id when a new version of the plugin is released and consequently a new test project.

comment:105 Changed 9 years ago by abeham

fixed permutation tests (they broke because of the namespace change) in r2930

comment:106 Changed 9 years ago by swagner

Worked on ItemAttribute and named items and corrected version information in Optimizer in r2931.

comment:107 Changed 9 years ago by swagner

Replaced Changed in !IItem by ToStringChanged in r2932. This change had a drastic impact on runtime and memory performance.

comment:108 Changed 9 years ago by swagner

Corrected persistence and initialization of algorithms and fixed SGA performance test in r2933.

comment:109 Changed 9 years ago by swagner

Removed plugins HeuristicLab.Charting 3.3 and HeuristicLab.Charting.Data 3.3 in r2943 and r2944. These plugins will not be part of the release.

comment:110 Changed 9 years ago by swagner

Updated solution and Files.txt in r2945.

comment:111 Changed 9 years ago by swagner

Updated configurations in r2946.

comment:112 Changed 9 years ago by swagner

Implemented reviewers' comments on version r2917 in r2947.

comment:113 Changed 9 years ago by swagner

Implemented reviewers' comments on version r2917 in r2948.

comment:114 Changed 9 years ago by swagner

Implemented reviewers' comments on version r2917 in r2949.

comment:115 Changed 9 years ago by swagner

Moved and renamed test project of HeuristicLab.Persistence in r2950.

comment:116 Changed 9 years ago by swagner

Adapted test project of HeuristicLab.Persistence according to other test projects in r2951.

comment:117 Changed 9 years ago by swagner

  • Resolution set to fixed
  • Status changed from assigned to closed

From my point of view refactoring of the operator architecture is finished. All further changes should be handled in other tickets.

comment:118 Changed 9 years ago by swagner

  • Resolution fixed deleted
  • Status changed from closed to reopened

Forgot to delete branch.

comment:119 Changed 9 years ago by swagner

  • Status changed from reopened to new

comment:120 Changed 9 years ago by swagner

  • Status changed from new to assigned

comment:121 Changed 9 years ago by swagner

  • Resolution set to fixed
  • Status changed from assigned to closed

Deleted branch in r2959.

comment:122 Changed 9 years ago by swagner

  • Milestone changed from Iteration 4 to Current

Milestone Iteration 4 deleted

comment:11 Changed 9 years ago by swagner

  • Milestone changed from Current to HeuristicLab 3.3.0

Milestone Current deleted

Note: See TracTickets for help on using tickets.