| 1 | = Move Operators = |
| 2 | |
| 3 | == IMoveOperator == |
| 4 | The basic interface that marks all move operators. |
| 5 | |
| 6 | '''Remarks:''' A group of move operators that belong together should derive an interface from this one and implement the interface in each operator. |
| 7 | |
| 8 | In an algorithm one can thus find out all move operators that belong together, by grouping operators according to the most specific interface derived from this interface that they implement. |
| 9 | |
| 10 | '''A practical example:''' |
| 11 | |
| 12 | You have a solution representation {{{MyRep}}} and you have a move {{{MyRepMove}}} that you want to make available to the friendly GUIs. So in {{{MyRep}}} you derive an interface {{{IMyRepMoveOperator}}}. |
| 13 | |
| 14 | Now you need to implement at least three operators that handle these moves: A !MoveGenerator, a !MoveMaker, and a !MoveEvaluator. |
| 15 | |
| 16 | Note: The !MoveEvaluator should be implemented in the problem plugin if you choose to separate representation and problem. |
| 17 | |
| 18 | In each of these operators you implement {{{IMyRepMoveOperator}}} as well as the appropriate operator specific interface. |
| 19 | |
| 20 | For a !MoveGenerator that would be one of {{{IExhaustiveMoveGenerator}}}, {{{ISingleMoveGenerator}}}, or {{{IMultiMoveGenerator}}}, for a !MoveMaker that would be {{{IMoveMaker}}}, and for a !MoveEvaluator that would either be {{{ISingleObjectiveMoveEvaluator}}} or {{{IMultiObjectiveMoveEvaluator}}} |
| 21 | |
| 22 | If you have this you need to make sure that an instance of all your operators are loaded in the Operators collection of your IProblem and you can select them in the respective algorithms. |
| 23 | |
| 24 | For Tabu Search support you will need two additional operators: A !TabuChecker and a !TabuMaker. |
| 25 | |
| 26 | If you decide later that you want another move, e.g. {{{MyRepMove2}}}, you would do as before and group them under the interface {{{IMyRepMove2Operator}}} |
| 27 | If you want to make use of multiple different moves, all your operators would need to know about all the moves that you plan to use. |
| 28 | |
| 29 | Take a look at the Permutation and TSP plugin to see how this looks like in real code. |