简体   繁体   English

Arangodb 找到条件最短路径

[英]Arangodb find conditional shortest paths

I need to calculate shortest paths with conditions (conditions may be very hard).我需要计算有条件的最短路径(条件可能非常困难)。 I've tried next sample query but it takes me a lot of time我已经尝试了下一个示例查询,但它花费了我很多时间

FOR p IN ANY K_SHORTEST_PATHS
'graph_vertices/1' TO 'graph_vertices/2'
graph_edges
OPTIONS {
    weightAttribute: 'weight',
    defaultWeight: 1
}
FILTER p.edges[*]._key NONE IN ['736023', '659112', '695090', '731912', '680907', '699903'] 
LIMIT 3
RETURN {name: CONCAT_SEPARATOR(' -> ', p.edges[*]._key), weight: sum(p.edges[*].weight)}

Is there any way to make pre filtration?有没有办法进行预过滤? I mean filter edges collection and then start finding shortest path.我的意思是过滤边缘收集,然后开始寻找最短路径。 May be some other tips which can help me?可能是其他一些可以帮助我的提示吗?

ps I can't use traversal because I don't know about length of path and also I need shortest paths according to weights. ps我不能使用遍历,因为我不知道路径的长度,而且我需要根据权重的最短路径。

在 slack 中讨论,arangodb 团队确认目前不支持,在https://github.com/arangodb/arangodb/issues/10957 中创建功能请求

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM