Hello!
Long time I didn't post here!
I have a file in which shops declared a quantity of products which can be different from the quantity really received. Some shops have an excess, some have a deficit.
What I would like to do, is use the quantity in excess and allocate to the shops in deficit.
The allocation should be:
1) allocate a quantity to the shop(s) with smallest % reimbursement untill it reaches the % reimbursement of the 2nd shop with smallest reimbursement
2) allocate the remaining qty to these 2 shops until the % reimbursement reaches the % reimbursement of the 3rd shop, etc...
3) Repeat until there is no excess qty to allocate
I was thinking to use a solver to do but I am not sure how to declare the constraints....
Any help would me more than welcome!
Long time I didn't post here!
I have a file in which shops declared a quantity of products which can be different from the quantity really received. Some shops have an excess, some have a deficit.
What I would like to do, is use the quantity in excess and allocate to the shops in deficit.
The allocation should be:
1) allocate a quantity to the shop(s) with smallest % reimbursement untill it reaches the % reimbursement of the 2nd shop with smallest reimbursement
2) allocate the remaining qty to these 2 shops until the % reimbursement reaches the % reimbursement of the 3rd shop, etc...
3) Repeat until there is no excess qty to allocate
I was thinking to use a solver to do but I am not sure how to declare the constraints....
Any help would me more than welcome!