比较多的价格选择众多客户算法 [英] Comparing multiple price options for many customers algorithmically
问题描述
我们有百万客户。货物为他们每个人的销售成本可以pssed为价格A或价B EX $ P $。
We have 1,000,000 customers. The cost of goods sold for each of them can be expressed as price A or price B.
价格A<<价B
Price A << Price B.
价格A和价B不是线性对方。在某些情况下,B是昂贵的2倍,在一些它是100倍。
Price A and Price B are not linear to each other. In some cases B is 2 times as expensive, in some it is 100 times.
所有的客户以成本为
分((SUM(A)/数(A)),100)*数量(A) 有效地,如果是小于100的所有客户的A上的平均成本将舍入为100
min( (sum(A)/count(A)) , 100 ) * count(A) Effectively, the average cost of all the customers on A will be rounded up to 100 if it is less than 100.
有没有这样的限制,基于B。
There is no such restriction on B.
我想花最少的钱,自己的商品。
I would like to spend the least amount of money on their goods.
我如何最大限度地
成本= MIN((SUM(A)/数(A)),100)*数量(A)+和(B) 我一直看到这是一个双背包问题的一种形式,但我不能得到它的权利......
cost=min( (sum(A)/count(A)) , 100 ) * count(A) + sum(B) I keep seeing this as a form of a dual knapsack problem, but I can't get it right ...
我会很可能解决这个Python中,最有可能的,但我怀疑,问题太多。
I'd be probably solving this in Python, most likely, although I doubt that matters much.
我通过分配分数基于该XYZ和过滤做人工分析,我想了解更多的计算解决方案。
I've done manual analyses by assigning scores to x y z and filtering based upon that, I'm interested in more of a computational solution.
任何方法来推荐?
推荐答案
重述在其他地方更简单的方法。
Restated in a much easier way elsewhere.
<一个href="http://stackoverflow.com/questions/19455985/searching-for-the-best-fit-price-for-multiple-customers">Searching为最合适的价格为多个客户
这篇关于比较多的价格选择众多客户算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!