I have a problem statement where I am trying to do some allocation basis rank traversal
there is fixed quantity Q= 900 which i have to distribute amongst vendors .
e.g if i allocate 100 to V1 basis some logic, then I am calculating remaining quantity for allocation to other vendors V2 where I calculating remaining quantity = Q- cumulate of allocated till now. Here I am facing issue of circular reference. I need to stop traversing whenever remaining for allocation is zero or cumulate of allocated till now equals the fixed quantity Q which we had to distribute.
Many thanks for any suggestions that I may get