I have a set of items. For each item, there is a list of buyers I can sell it to and a corresponding price they will pay me. For example:
item1: item2: item3: item4:
john: 17 john: 19 bob: 42 ...
bob: 23 mick: 22 mick: 44
sue: 19 liz: 24 sue: 38
liz: 20 joe: 45
I need to assign each item to one buyer so as to maximise the amount of money I make. If it were as simple as this, the assignments would go
item1: bob
item2: liz
item3: joe
...
However, I also need to try to meet quotas of items for the buyers.
So these quotas might be:
bob: 99
sue: 30
john: 45
...
i.e. I need to sell a total of 99 items to Bob, 30 to Sue etc.
The quotas will not cover all items, so it could be that of a total of 1000 items, only 800 are forced to follow the quotas and the remainder can go to whichever buyer pays the highest amount.
The problem then, is to assign the items in such a way as to maximise revenue while still filling the quotas.
In some cases it will not be possible to meet the quotas because not every item can be assigned to every buyer - for example, if there were only the 3 items above and Joe had a quota of 2, I wouldn't be able to meet it as only item3 can be sold to him. It seems to me two types of solution are available in this case, either of which I'm open to.
- Find a solution that minimises the number of unfilled quota positions and maximises revenue.
- Run a preliminary algorithm that checks if the quotas are fillable. If they aren't, simply fail at that point (under the assumption that some user will then manually tweak the quotas and run the process again). If they are, then find a solution that fills them and maximises revenue.
I've thought of a few strategies, but none that has the mathematical rigour I'd like.
Also, I'm not really sure what flavour of problem this is, so if anyone can suggest a better title for this question, feel free to edit :)
For context, this is a work-related requirement for an energy broker that wants to assign customers (the 'items' in my example) across its pool of energy suppliers.
Edit: If this can be thought of as a form of the Generalized Assignment Problem (as per @fade2black's) answer, it may be helpful to tweak things in this way: items that can't be sold to a particular buyer are assigned a revenue of 0 with respect to that buyer.
So in other words, every item can be sold to every buyer, but some have a revenue of 0. Presumably any optimisation algorithm will then tend to filter these 0-revenue combinations out.