R最小成本流量 [英] Min Cost Flow in R
问题描述
是否有一个在R中实现最小成本流算法的包?
igraph
包似乎只是(通过 graph.maxflow()
函数),并且在这里或者在 rseek.org 看起来很有帮助。
具有可重现的最小费用流问题的问题 here
一>。尽管我没有收到社区的明确答复,但我确实发布了我最终实施的方法。它包含 data.frame
的边缘
,其中 $ cost
和一个 $容量
属性,然后我用它为 lpSolve
优化生成适当的约束。看看它,希望它有帮助! Is there a package which implements a min cost flow algorithm in R?
The igraph
package seems only to have max flows (via the graph.maxflow()
function), and nothing else here or on rseek.org looks helpful.
I was struggling with this as well and posted a question with a reproducible min-cost-flow problem here. While I did not receive a definite answer from the community, I did post the approach that I ended up implementing. It involved a data.frame
of edges
with a $cost
and a $capacity
property, which I then used to generate appropriate constraints for an lpSolve
optimisation. Check it out, hope it helps!
这篇关于R最小成本流量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!