OT Math question iteration formula?

kellian

Member
Join Date
May 2002
Location
Capella
Posts
155
🤷
I have a small cattle herd and am trying to create a feed estimate calculator.
Each beast will eat about 3% of its body weight each day. I need to work out how much feed it will consume over xDays if it has a daily gain of y kilograms per day.
Input variables are Start weight, Gain per day, %intake, Number of days.
I suspect this is an iteration formula where number of days = the number of iterations.
I can brute force it in a spreedsheet. But am sure it can be done better.

This is as far as I have got with formula

Total Intake =(Weight+Gain)*Intake% + (Weight+2*Gain)*Intake% + (Weight+3*Gain)*Intake% + (Weight+4*Gain)*Intake%

Any thought on how I can break this down further.
 
Compounding interest doesn't really help as the gain is not part of the result. It is a constant that needs to be added each day. (a bit like having a periodical deposit as well as a % increase)
I have started to look at progression formulas.

Math isn't my strong point after 30 years out of school. :(
 
Just rearranging a little bit gets this. Never had to do a SUM in a PLC.
THe SUM should be easy, if n is 5, its just 1+2+3+4+5.


Total Intake = n*Weight*Intake% + Gain*Intake%*SUM (1,n of N)

Total Intake = Intake%* (n*Weight + Gain*SUM (1,n of N))
 
This seems to work based on my brute force exel

Total Intake=Days/2*(2*Weight*Intake%+Intake%*(Days-1)*Gain)

Will try your solution now Tim2.

not being used in a PLC just doing some forward estimates to determine if it is worth feeding grain or just leave them on grass pasture until I sell them.
 

Similar Topics

... I followed a link dealing with Permutations and Combinations, and learnt a (to me) startling fact ! 0 * 0 = 0 agreed ? 0 * 0 * 0 = 0 agreed...
Replies
12
Views
3,512
See attached pic Why is R02451 reading 0 before the Real_to_Int conversion? It is reading 23 after, which is what it should read.
Replies
8
Views
1,671
Im using Wonderware Intouch machine edition v8.0. Question: How does the Math Worksheet/Task scripting work? I have the following expression...
Replies
3
Views
2,261
Hi Group, I'm the new owner of an AB MicroLogix 1400 processor and have been trying to decide the best way to de-pressurize a compressed air tank...
Replies
8
Views
1,965
Have a question that is at the moment just not able to figure out. Lets say in a allen Bradley micrologix 14 you have a value in a floating point...
Replies
6
Views
2,957
Back
Top Bottom