描述
我在我的大学里有一个项目学习的问题。下面是一个简单的例子:
Dest. X
),因为它是优先的。如果来源的项目太少,则完成此目的地的最小数量比其他目的地的最小数量更重要。你知道吗问题/方法
我已经开始用python脚本来处理这个问题。它用随机数量的项创建sources
和destinations
。但是我不知道如何分配所有的项目,包括mininum amounts
、maximum_amounts
、优先级排序,当然还有一个事实,不是所有的源都连接到所有的目的地。你知道吗
欢迎使用任何方法,最好使用几行代码:)
提前谢谢
我的方法是:
有时X不会被填充,尽管一个值是500,因为d没有连接到X(有时d可以是500)
对不起,如果我错了!我的数学不太好,我花了一段时间才(希望)明白OP想要什么。 希望我至少在某些方面有所帮助。(必须使用大量的代数)
相关问题 更多 >
编程相关推荐