Page 1 of 1

Feeder best practice question

Posted: Fri Jul 13, 2012 9:01 am
by kugors
Hi all,

I have a theoretical question about best practice to write feeders. Let's assume that i have three cubes with rules:

Cube A - filled manual
Cube B - some measures taked from A, some filled manual
Cube C - all taken from B

Now I can write fedders in to ways:

1. A => B, B => C
2. A => B;C, B => C

Is there a difference between this two ways, leaving asside over and underfeeding?

Re: Feeder best practice question

Posted: Fri Jul 13, 2012 9:10 am
by declanr
First of all to check if I understood your question:

Cube C is rule derived from values in Cube B which is rule derived from values in Cube A

You want to know if there is any difference in feeding Cube C from Cube A as opposed to feeding Cube C from Cube B?


If the above is correct (and you aren't interested in overfeeding/underfeeding) it doesn't matter where your feeder comes from, you could have a separate 2-d Cube with only 1 cell which is populated with a number and then feed everything from there if you did so desire.
TM1 doesn't check if where you are feeding from has any relevance to what you are feeding, all it checks is if where you feed from has a value in it.

HTH


Edit - If you are talking in true best practice terms however, make sure it is easier to follow (possibly with comments) so that anyone with a reasonable understanding could come in and see why things are being done the way they are.

Re: Feeder best practice question

Posted: Fri Jul 13, 2012 9:20 am
by kugors
Thank you,

That's want i wanted to know.

Re: Feeder best practice question

Posted: Wed Sep 10, 2014 11:26 am
by NV_tm1
I have same question but for a single cube. Suppose two of the dimension of a cube are A and B.
So, which one is a better technique or it doesn't matter?
1) [A1]=>[B1]; [B1]=>[B2];
2) [A1] => [{B1,B2}];

Thanks!

Re: Feeder best practice question

Posted: Wed Sep 10, 2014 1:03 pm
by lotsaram
NV_tm1 wrote:So, which one is a better technique or it doesn't matter?
1) [A1]=>[B1]; [B1]=>[B2];
2) [A1] => [{B1,B2}];
Note that your pseudo code is incorrect, you can't use {B1,B2} on the right-hand side of a feeder. The correct syntax is:
['A1'] => ['B1'],['B1'];

(You could also feed 'B' assuming B is a consolidation of B1 & B2.)

I would usually prefer to feed from the original source data, that is option 2, because this is more efficient. However sometimes including the intermediate calculation chain in the feeders is worthwhile as this can be more transparent to other developers and can cut down on overfeeding where an intermediate calculation is zero it shouldn't feed to further cells.

Re: Feeder best practice question

Posted: Wed Sep 10, 2014 5:01 pm
by Wim Gielis
lotsaram wrote:(You could also feed 'B' assuming B is a consolidation of B1 & B2.)
Watch out... I've seen too many people feeding towards consolidated cells in the past... ;-)

Re: Feeder best practice question

Posted: Wed Sep 10, 2014 6:57 pm
by jim wood
Wim Gielis wrote:Watch out... I've seen too many people feeding towards consolidated cells in the past... ;-)
Agreed. I've also seen feeding from consolidations in the past that can be avoided, although both the above and this case they can be needed.

As for the original question, I always try to feed with a physical value if possible. If you have a physical value cube A which is used in a calculation in cube B then as expected you'd feed with A->B. Then if you have a value in C calculated using the calculated value in B I alwasy try to feed with the value in A rather than the calculated value in B (so A->C). As you might expect this always the best way to go,

Jim.

Re: Feeder best practice question

Posted: Thu Sep 11, 2014 11:58 pm
by EvgenyT
I agree with Jim on feeding from the physical value rather than from the value which itself has been fed , otherwise it becomes a nightmare to trace and debug in models with heavy rules.

Just make sure to make clear notes in your rules for other developer to understand the chain of events ;)