通过有向图以最少的成本发送N个座席

时间:2018-10-21 15:11:37

标签: algorithm optimization graph-algorithm reinforcement-learning directed-graph

我遇到了将N个代理从有向图的源顶点'src'发送到有向图的目标顶点'dst'的问题,这些边的权重正在增加n的线性函数(n是已经通过该边缘的特工)。

图形图像:

graph image

例如:

scenario 1
Agent1 , src->A->dst , cost = 1+(-1) = 0 
Agent2 , src->A->dst , cost = 2+2 = 4
Agent3 , src->A->dst , cost = 3+5 = 8
overall cost = 0 + 4 + 8 =12

scenario 2
Agent1 , src->A->B->C->A->dst , cost = 1+0+0.5+(-2)+(-1) = -1.5
Agent2 , src->A->dst , cost = 2+2 = 4
Agent3 , src->A->dst , cost = 3+5 = 8
overall cost = -1.5 + 4 + 8 = 10.5

如何找到每个代理商的路径以最大程度地降低总成本?

0 个答案:

没有答案