Dynamic badwidth control

has any body ever managed to limit the SM bandwidth depending on the number of bytes dowloaded in the last (for example) 15 minutes? it would be an efficent way of limiting downloading of p2p users!
We were thinking to write an external program that reads every 10’ from the Prizm db the downloaded and up loaded bytes of each sm, then by following a specific algorithm, the program defines the new limits to write to the Prizm scheduler that will then update the sm
Does any body knows how to do this automatically in Prizm ?

Thank you