Feeding with consolidations

Post Reply
User avatar
TheMichael
Posts: 12
Joined: Tue Aug 19, 2008 12:08 pm
Location: Johannesburg, South Africa

Feeding with consolidations

Post by TheMichael »

Hi,

I'm struggling to figure out what the feeder should look like for the following rule:

['Site - 1','Account A',Attribute5:'Allocation'] =N:
ROUNDP(['Sales Sites','EXPENSES','All Attributes (2)','All Attributes (5)']*
['Allocated Site','Turnover %','Allocation2','Allocation3','Allocation4','Allocation5','Allocation6' ],2) ;

- "EXPENSES" is a consolidation of elements. (About 400 leaf elements)
- The last line: ['Allocated Site','Turnover %','Allocation2','Allocation3','Allocation4','Allocation5','Allocation6' ] points to a single cell. (A percentage)

The feeder I've written looks as follows:

['Sales Sites','All Attributes (2)']=>
['Site - 1','Account A','All Attributes (2)',Attribute5:'Allocation'];

I know it's not the most effective way to write a feeder (Feeding with consolidations), but it's the only way I've been able to get the rule to work. The problem is that it ends up taking a lot of memory and saving the rules each time I make a change takes up to an hour to do.

Any advice would be appreciated.

Michael
Herman Moller
Posts: 70
Joined: Thu May 22, 2008 3:38 pm

Re: Feeding with consolidations

Post by Herman Moller »

Michael,

Have you tried the following feeder:

['Allocated Site','Turnover %','Allocation2','Allocation3','Allocation4','Allocation5','Allocation6' ]=>['Site - 1','Account A',Attribute5:'Allocation'];

['Allocated Site','Turnover %','Allocation2','Allocation3','Allocation4','Allocation5','Allocation6' ] as you stated is only a percentage for one specific cell. This would make the feeders smaller.

If you have the following : ['A'] = ['B'] * ['C];

You can either have the feeder:

['B']=> ['A'];

or

['C']=> ['A'];

Just use the value with the least cells being fed.


HTH

Herman
lotsaram
MVP
Posts: 3654
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Feeding with consolidations

Post by lotsaram »

Your feeder as you have written it is incorrect also!

['Sales Sites','All Attributes (2)'] => ['Site - 1','Account A','All Attributes (2)',Attribute5:'Allocation'];

By feeding from the consolidation 'All Attributes (2)' to 'All Attributes (2)' what you are doing is if any descendant of the consolidation contains a real value then all leaf cells under the consolidation will be fed. Feeding from and to the same element is pointless as these cells already contain values, al this will do is overfeed unnecessarily which will consume more memory and make calculation slower by impairing the sparse consolidation algorithm.

The correct version of your original feeder should be.
['Sales Sites','EXPENSES','All Attributes (2)','All Attributes (5)'] => ['Site - 1','Account A',Attribute5:'Allocation'];

The other suggestion is also worth a try. Which part (or both parts) of a multiplication that you feed from will depend on which should be the driver of the rule calculation. (eg.sales $ = unit price x units, feed from units not price)
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
User avatar
TheMichael
Posts: 12
Joined: Tue Aug 19, 2008 12:08 pm
Location: Johannesburg, South Africa

Re: Feeding with consolidations

Post by TheMichael »

Thanks for replying guys.

Herman,
That's actually the first way I tried to feed it. Did not work. I didn't get any values.

lotsaram,
I think I did actually try it that way at some point but it didn't really make a difference. Still used up a lot of memory. I'll try it again as soon as I get a chance just to be sure.
User avatar
TheMichael
Posts: 12
Joined: Tue Aug 19, 2008 12:08 pm
Location: Johannesburg, South Africa

Re: Feeding with consolidations

Post by TheMichael »

Okay. I've spent some time with the problem trying all sorts of ways of feeding the calculation. But basically the only way I can get it to work is by feeding it as I did in the beginning.

Now my question is this:
Are there situations within TM1 where you're feeders end up consuming a lot of memory and there is no way around it ? Does this happen ?

Thanks again for the help!
belair22
Posts: 68
Joined: Wed Feb 25, 2009 2:26 am
OLAP Product: TM1, Cognos Express
Version: 9.5 9.4 9.1 9.0 8.4
Excel Version: 2007 2003

Re: Feeding with consolidations

Post by belair22 »

There certainly are scenarios where Feeders consume quite a bit of memory - in these scenarios you might try using conditional feeders to help trim down memory usage.
David Usherwood
Site Admin
Posts: 1454
Joined: Wed May 28, 2008 9:09 am

Re: Feeding with consolidations

Post by David Usherwood »

Your rule is an allocation rule ie output = large total * driver (I normally divide by the total of the drivers but you've done that in the %.) (and the frequent use of the a-word is a dead giveaway too :) )

I've done a _lot_ of these over the years. My take is that you can feed from input (large total) or from driver. I used to think that driver was normally the best, but in _practice_, and testing both, I tended to find that feeding from input is best, the business logic being that if there isn't anything to allocate, don't bother. What then helped was to populate the feeders at both detailed and total level by using a <blank> rule ie no N: or C:, and then not feeding them - since the total was there there was no need.

Try both (input and driver) as feeder sources, bounce the server and see what you get - but if you feed from input, try to avoid feeding the drivers themselves, as described above.
lotsaram
MVP
Posts: 3654
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Feeding with consolidations

Post by lotsaram »

Hi Michael,

The answer to your last question is "yes and no."

To take what David said a little further and make it more explicit, the necessity of over-feeding (and excessive memory consumption and slow calculation, etc) in a large rule driven allocation model is sometimes unavoidable. Whenever you have a calculation that is basically total * alloc % = result and you have no way of knowing in advance what the allocation % will be (or perhaps it is calculated elsewhere in the model dynamically) then you also have no way of knowing in advance whether the result of the calculation will be a zero or a valid value thus there is no alternative but to overfeed.

This can be a problem for TM1 allocation models and it is a relatively common one. For this reason it would often be considered best practice to do the allocations via TI. There is a trade-off between the immediacy or "real timeness" that is required of the allocations, versus calculation time and total memory consumption. For large models using TI for allocations is often the way to go (so long as a batch process to do the allocation is OK from a process perspective.)

HTH
David Usherwood
Site Admin
Posts: 1454
Joined: Wed May 28, 2008 9:09 am

Re: Feeding with consolidations

Post by David Usherwood »

Don't agree. (At last, some controversy!)
You aren't 'overfeeding' a model if you need feeders to make it work - remember Einstein - 'make it as simple as possible, but no simpler'. If you use TI then you are probably burying the calculation in the TI script and your users will have no clear idea of what they do. There's a lot can be done to manage feeder memory with conditionals - and if you aren't on 64 bit now, move over.
lotsaram
MVP
Posts: 3654
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Feeding with consolidations

Post by lotsaram »

David, we will have to respectfully agree to disagree. I used to share your opinion and favour rules for performing allocations by default but I have seen a few very large models where doing the allocation via TI was definitely the way to go from a performance perspective. Don't get me wrong, in the majority of instances I would still use a rule to do an allocation but there does come a point where it can be better to go the TI route due to the calculation intensity and feeder overhead of some allocation rules (in both the 32 bit and 64 bit worlds.)

The overfeeding question depends on how you define overfeeding. If the result of the calculation is zero but the cell is fed, then technically I see that as overfeeding (although it may be both necessary and unavoidable.) On the other hand if a cell is fed but no rule applies, then that is prima facie overfeeding and flat out bad mojo IMO.

If you want more controversy I would also say that conditional feeders on the whole should be avoided due to the reduced dynamism and complexity that they can add to a model if used extensively (let's face it most people struggle to understand feeders, let alone conditional feeders ...)
User avatar
Steve Rowe
Site Admin
Posts: 2416
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: Feeding with consolidations

Post by Steve Rowe »

I think it's the use of the dreaded Best Practice that's the issue lotsaram, your probably right in the your circumstances that TI may be a better approach.

I think the term "Best Practice" is horribly over-used anyway and leads to people applying things without working through and solving the problem from scratch (that's the point of a BP I know). This means that they don't really understand their issue and if the "Best Practice" applies. It should be banned!

As ever with using TI instead of rules there is a balance between response time and the functionality users want and your ability to deliver it with the hardware grunt you have available to you. I don't think it's possible to have Best Practice to solve the above, as every implementation will vary and different sets of users will have different expectations of what response and performance they should have.

Got to go "Total Wipeout USA" is on, more fun than this!
Cheers,
Technical Director
www.infocat.co.uk
Post Reply