Calculation using anemone component(Outputs the sum once every 5 times)

I am trying to create a loop calculation program using anemone component.
This is my first time using the anemone component.

・Perform the first half of the calculation 20 times.
・Once every 5 times, add the calculation results of the past 5 times.
・Output the added result.
I created a program like the one attached to perform the above calculations, but it doesn’t output the results I want.

test_cl.gh (10.0 KB

I think the program after the attached red part is wrong, but I don’t know how to fix it.
If you have any good ideas, I would appreciate it if you could let me know.

Eventually, I would like to create a program that adds up all the hourly calculations every 24 hours and outputs the results for one year (365 days).

Thank you in advance.

not clear if each time you sum up together only the last 5 values, or the whole calculation with the last 5 values, but I don’t think you need a Loop for that:


test_cl_Re.gh (14.3 KB)

in that case you can just partition you list of 24*365 values in chunks of 24 values and mass addition them?


test_cl_Re_Re.gh (11.7 KB)

1 Like

Sorry for the late reply.
Thank you for your answer.
So it will be helpful.