Product transfer

Product transfer. Return the paths representing product transfer between two S.D. vehicles that occurred after a given time instant.

T-Cypher query:

RIGHT_SLICE 2019-01-01T08:00:00Z

MATCH (SDvehicle)-[SEQUENTIAL (p:transfer*4) MAX_DELTA 2 MIN]-> (vf:SDvehicle)

RETURN vf, p, DURATION(p@T)


Cypher query:

MATCH (SDvehicle)-[r0:`transfer`]->(n0)-[r1:`transfer`]->(n1)-[r2:`transfer`]->(n2)-[r3:`transfer`]->(vf:`SDvehicle`)

WHERE (SDvehicle.tEnd >= 1546329600000 AND vf.tEnd >= 1546329600000 AND n0.tEnd >= 1546329600000 AND n1.tEnd >= 1546329600000 AND n2.tEnd >= 1546329600000 AND r0.tEnd >= 1546329600000 AND r1.tEnd >= 1546329600000 AND r2.tEnd >= 1546329600000 AND r3.tEnd >= 1546329600000 AND r0.tEnd <= r1.tStart AND r1.tEnd <= r2.tStart AND r2.tEnd <= r3.tStart AND (r1.tStart – r0.tEnd <= 120000) AND (r2.tStart – r1.tEnd <= 120000) AND (r3.tStart – r2.tEnd <= 120000))

RETURN vf, [r0, n0, r1, n1, r2, n2, r3] AS p, myFunctions.duration([myFunctions.min([r0.tStart, r1.tStart, r2.tStart, r3.tStart]), myFunctions.max([r0.tEnd, r1.tEnd, r2.tEnd, r3.tEnd])]) AS `duration(p@T)`


Interpretation:

As mentioned in the dataset description, S.D. vehicles can transfer products to and from machines. A temporary relationship is created to represent the transferring action with a time interval to indicate when the tranfer actually occurred. In this query, the path representing the a product transfer (of length = 4) is returned.

The type of the temporal path is sequential to indicate the sequentiality of the transfer actions. Now, the ‘MAX DELTA 2min’ indicates that the maximum duration between receiving an object and re-transfering it is at most equal to 2 minutes.

In the translated T-Cypher query, an intermediate relationship is created for each relationship of the path. Then, the temporal constraint indicating that consecutive relationships should be chronologically sequential is added in the WHERE sub-clause. The path composed of the traversed relationships and nodes is returned. Finally, the duration of the path is computed as the intersection between the time intervals of its intermediate relationships.

Comments are closed.