问题
I have numerous data points of items of which have a predetermined price-tag associated with them as well as a self calculated return value of each item. I'm looking to select 6 of the 100+ items in order to maximize the total return value while keeping the total price of the 6 items within a $50,000 constraint. I've tried different solutions using the solver tool but was unable to get the result I was looking for - however I am not very knowledgeable with solver.
回答1:
So, only used a small data set as you posted an image and I am not spending time typing all the data you put in the image.
Have a look at this:
So, two sumproducts and a sum do the work, binary and two constraints in the solver. You might be wanting to check out the effects of "=" or ">=" for the number of items chosen.
来源:https://stackoverflow.com/questions/62422215/select-6-items-while-maximizing-values-under-constraints