Skip to content

Instantly share code, notes, and snippets.

@peterneubauer
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save peterneubauer/8913320 to your computer and use it in GitHub Desktop.
Save peterneubauer/8913320 to your computer and use it in GitHub Desktop.

Analytics on throughput and Oil well optimizations

The setup

CREATE (t11:Throttle{name:'throttle11'})
CREATE (t12:Throttle{name:'throttle12'})
CREATE (well1:Wellhead{name:'well1'})
CREATE (well2:Wellhead{name:'well2'})
CREATE (s1:Separator{name:'Separator1'})
CREATE (s2:Separator{name:'Separator2'})
CREATE (t11)-[:CONNECTS{percentage:1.0}]->(well1)
CREATE (t12)-[:CONNECTS{percentage:0.5}]->(well1)
CREATE (well1)-[:CONNECTS{flow:10}]->(s1)
CREATE (well1)-[:CONNECTS{flow:40}]->(s2)
CREATE (well2)-[:CONNECTS]->(s2)

Find some possible connection path

MATCH p = (t:Throttle)-[r0:CONNECTS]->(w:Wellhead)-[r1:CONNECTS]->(s:Separator)
WHERE w.name='well1'
RETURN p, r1.flow * r0.percentage as flow
ORDER BY flow DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment