I am working on an optimization problem.
Let's say we have a grid of bins where solid metal cubes could be placed. We have a number of colored metal cubes to be arranged in the bins.
Each of these cubes weighs
1kg. But the weight could change slightly over time due to natural phenomena like rusting and becomes
1kg + delta(x,y) where
y are the co-ordinates of the location of the cube. We are interested in making sure the ratio between the total weight of one color to another remains same over time. The total weight of a color is the sum of weights of all cubes of that color.
Observations from past experiments say that
delta(x,y) is not completely random. It can be thought of as
k0 + k1*x + k2*y + k3*x^2 + k4*y^2 + k5*x*y where the constants
k0 k1 k2 ... are unknown at the time of arranging the cubes. But in all cases
k0 > k1 > k3 > k5 and
k0 > k2 > k4 > k5 We can assume
cn > 1 for all n.
k2 are unrelated. Note that the constants k0, k1, k2 are same for all cubes.
This observation lets us cancel out certain terms in
delta(x, y) by arranging carefully. For example, if we arrange two red balls and two blue balls as
R B B R, we can expect the linear terms to cancel.
Take for example a grid of
3x3. Initially, we have the empty grid:
[ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]
and a number of metal cubes to be placed. As an example, let's say we are to arrange one red cube, two blue cubes, four green cubes and two dummy cubes.
Metal cubes to be placed:
1 x R 2 x B 3 x G 2 x *
One possible arrangement could be:
B * G G R G G * B
Given a set of values for c1, c2 etc, there is one arrangement that must be the best. I am trying to model a cost function which indicates the expected variation between the two colors. Then choose the arrangement that has minimum cost by iterating through all possible arrangement.
I am looking for some advice on how to model the expected variation between two colors.
Also, any advice on reducing the search space. Usually, the size of the grid is around 10x10 and can grow as big as 15x10 in some rare cases. There are, usually, about 3 to 10 colors of cubes (number of cubes 10x10 to 15x10) to be filled.