Page 1 of 1

Double Feeding

Posted: Thu Aug 19, 2010 9:33 am
by mce
Hi,

If I have a rule formula for slice A of a cube, which is dependant of slice B and C of the same cube or another cube.

1 - If I write feeders to feed from slice B to slice A, is it enough or do I have to write the feeders from slice C to slice A as well?
2 - If it is enough to write only one feeder to slice A, but if I write both of the feeders to feed slice A, does it make any extra expense in terms of memory and processing or does not it matter?
3 - If it is enough to write only one feeder to slice A, does it matter which source slice to choose as the feeder? Is there any guidance or general rule of tumb for the feeding slice to be chosen?

Thanks in advance for replies.

Regards,

Re: Double Feeding

Posted: Thu Aug 19, 2010 11:18 am
by Jeroen Eynikel
It depends on the exact relationship between your A, B and C.

Suppose it is:

A=B*C.

In this case either B or C will be sufficient as a feeder

A=B+C

Then you will need both as feeders.

Basically you are trying to make sure that if A is not zero it will be fed. (and you try to avoid feeding it when it is zero)

So in case of a multiplication you have the following situation.

1 indicates there is a non null value, 0 means it is zero

B C A
0 0 0
0 1 0
1 0 0
1 1 1

You only need to feed the cases where A <> 0. Ergo in this case either B or C as a feeder is sufficient. (You will be overfeeding - but there is no way around that)

In case of the addition

B C A
0 0 0
1 0 1
0 1 1
1 1 1

As is obvious from the sample above in this case you need to use both B and C as feeders.

Re: Double Feeding

Posted: Thu Aug 19, 2010 11:33 am
by mce
Thanks for the clarification. One more:
If slice B is feeding slice A, will the calculatation of a cell in A be triggered when the relevant cell in B becomes non-zero (or becomes zero) or when relevant cell in B changes?

Re: Double Feeding

Posted: Thu Aug 19, 2010 12:14 pm
by Jeroen Eynikel
mce wrote:Thanks for the clarification. One more:
If slice B is feeding slice A, will the calculatation of a cell in A be triggered when the relevant cell in B becomes non-zero (or becomes zero) or when relevant cell in B changes?
Feeders will be set in these cases:

- on starting the server
- when (re)compiling the rules for the cube containing your feeder
- when issueing the cubeprocessfeeders command in TI
- For a numeric feeder: whenever the value changes from zero to something else
- For a string feeder: whenever the string changes

One more thing to note.

Feeders are not RESET automatically. So if your feeder changes from a value to zero TM1 will not reset the feeder.
Therefore, if you are modifying feeders and you want to verify whether everything is OK it is advisable to restart the service after your modifications in order to test.