Suppose i am running an Ad thru an Ad exchange A, and i have a set of campaigns running on it. I have
The spend of the campaign.
The budget allocated to it.
The number of hours it took to exhaust it's budget.
Total installs.
Total Revenue.
I want to write an algorithm to divide the total budget x to n campaigns, allocating higher budgets to a campaign delivering higher revenue.