Question
Do you think genetic algorithms are worth a try for the problem below, or will I remove the problems of local minima?
I think aspects of the problem are great for customizing the style of the generator / fitness function. (If you violated a similar project, I would like to hear from you, and not do something like that)
Thanks for any tips on how to structure things and stick this right.
Problem
I am looking for a good scheduling algorithm to use for the next real problem.
I have a sequence with 15 slots like this (numbers can vary from 0 to 20):
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
(And there are only 10 different sequences of this type)
Each sequence should expand into an array, where each slot can occupy 1 position.
1 1 0 0 1 1 1 0 0 0 1 1 1 0 0 1 1 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 1 0 0 0 1 1 1 0 0 0 1 1 0 0 1 1 0 0 0 1 1 1 0 0 0 1 1
The limitations on the matrix are as follows:
- [horizontally, i.e. horizontal] The number of placed should be equal to 11 or 111
- [row-wise] The distance between two sequences 1 must be at least 00
- The sum of each column must match the original array.
- The number of rows in the matrix should be optimized.
Then the array should select one of 4 different matrices, which can have a different number of rows:
A, B, C, D
A, B, C and D are departments of the real world. The load should be placed well enough over a 10-day period so as not to interfere with other goals of the department.
Each of the matrices is compared with an extension of 10 different source sequences, so you have:
A1, A2, A3, A4, A5, A6, A7, A8, A9, A10 B1, B2, B3, B4, B5, B6, B7, B8, B9, B10 C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 D1, D2, D3, D4, D5, D6, D7, D8, D9, D10
Certain spots on them can be reserved (not sure if I should make it just reserved / not reserved or function-based). Reserved places can be meetings and other events.
The sum of each row (for example, all A) should be approximately the same within 2%. i.e. the sum (from A1 to A10) should be about the same as (from B1 to B10), etc.
The number of rows can vary, so you, for example:
A1: 5 lines A2: 5 lines A3: 1 line, where this single line can, for example, be:
0 0 1 1 1 0 0 0 0 0 0 0 0 0 0
etc..
Subprogram *
I am very happy to solve only part of the problem. For example, the ability to enter:
1 1 2 3 4 2 2 3 4 2 2 3 3 2 3
And we get the corresponding array of sequences with 1 and 0, minimized by the number of lines following the above restrictions.