You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:使用Cypher创建逻辑门并查询各Sim中开启的门

使用Cypher模拟逻辑门并识别各场景中开启的门

我需要获取使用Cypher创建逻辑门的语法帮助,目标是识别各模拟场景(Sim)中哪些逻辑门处于开启状态。

具体逻辑规则

  • gate a:仅需event 1触发,在sim 1、2、3中开启
  • gate b:需event 1和event 2同时触发,在sim 2、3中开启
  • gate c:需event 1、2、3同时触发,仅在sim 3中开启

已创建数据的Cypher代码

CREATE 
(a:Gate {name: 'gate a'}),
(b:Gate {name: 'gate b'}),
(c:Gate {name: 'gate c'}),
(x1:X {name: 'sim 1'}),(x2:X {name: 'sim 2'}), (x3:X {name: 'sim 3'}),
(e1:E {name: 'event 1'}),(e2:E {name: 'event 2'}), (e3:E {name: 'event 3'}),
(e1)-[:AND]->(a),
(e1)-[:AND]->(b),
(e2)-[:AND]->(b),
(e1)-[:AND]->(c),
(e2)-[:AND]->(c),
(e3)-[:AND]->(c),
(x1)-[:HAS]->(e1),
(x2)-[:HAS]->(e1),
(x2)-[:HAS]->(e2),
(x3)-[:HAS]->(e2),
(x3)-[:HAS]->(e1),
(x3)-[:HAS]->(e3)

内容的提问来源于stack exchange,提问作者pybynumbers

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.17 18:43:14