R
Rasmus Rasmussen
How do I create a formula like this:
∑ iεM ∑ jεM ∑ kεN ∑ lεN (bij x akl x Uik x Ujl)
I have a symmetric matrix of size M of distances b(ij)
between different areas, and another symmetric matrix of
size N of interaction between different services a(kl).
I have made a small spreadsheet where both matrixes are
of size 4.
The matrix U of size MxN consists binary entries, which
allocates the services to the areas.
The formula in the top is the cost function.
A B C D E F
1 Distances (b)
2 Area a b c d
3 a 0 1 2 4
4 b 1 0 1 3
5 c 2 1 0 2
6 d 4 3 2 0
7
8
9 Interaction (a)
10 Service 1 2 3 4
11 1 0 7 8 4
12 2 7 0 7 0
13 3 8 7 0 5
14 4 4 0 5 0
15
16
17 Allocation (U)
18 1 2 3 4
19 a 1
20 b 1
21 c 1
22 d 1
Can I make the formula directly, or do I have to create
one or more cost matrixes to add up the total costs?
Regards,
Rasmus Rasmussen
∑ iεM ∑ jεM ∑ kεN ∑ lεN (bij x akl x Uik x Ujl)
I have a symmetric matrix of size M of distances b(ij)
between different areas, and another symmetric matrix of
size N of interaction between different services a(kl).
I have made a small spreadsheet where both matrixes are
of size 4.
The matrix U of size MxN consists binary entries, which
allocates the services to the areas.
The formula in the top is the cost function.
A B C D E F
1 Distances (b)
2 Area a b c d
3 a 0 1 2 4
4 b 1 0 1 3
5 c 2 1 0 2
6 d 4 3 2 0
7
8
9 Interaction (a)
10 Service 1 2 3 4
11 1 0 7 8 4
12 2 7 0 7 0
13 3 8 7 0 5
14 4 4 0 5 0
15
16
17 Allocation (U)
18 1 2 3 4
19 a 1
20 b 1
21 c 1
22 d 1
Can I make the formula directly, or do I have to create
one or more cost matrixes to add up the total costs?
Regards,
Rasmus Rasmussen