def checkRealtion7FinishedBy(epsilon, maxGap): rh = RelationHandler(RelationHandler.RELATION_ALLEN_7) logger.debug('Testing FINISH_BY in 7 relations, epsilon: ' + str(epsilon) + ', max gap: ' + str(maxGap)) sti1 = SymbolicTimeInterval(1, 5, 'A', 345) sti2 = SymbolicTimeInterval(3, 5, 'B', 567) checkRelation(rh, sti1, sti2, epsilon, maxGap, AllenSevenRelationEngine.FINISHBY)
def checkRealtion7Overlaps(epsilon, maxGap): rh = RelationHandler(RelationHandler.RELATION_ALLEN_7) logger.debug('Testing OVERLAPS in 7 relations, epsilon: ' + str(epsilon) + ', max gap: ' + str(maxGap)) sti1 = SymbolicTimeInterval(1, 3, 'A', 345) sti2 = SymbolicTimeInterval(2, 6, 'B', 567) checkRelation(rh, sti1, sti2, epsilon, maxGap, AllenSevenRelationEngine.OVERLAP)
def checkRealtion7Contains(epsilon, maxGap): rh = RelationHandler(RelationHandler.RELATION_ALLEN_7) logger.debug('Testing CONTAINS in 7 relations, epsilon: ' + str(epsilon) + ', max gap: ' + str(maxGap)) sti1 = SymbolicTimeInterval(1, 5, 'A', 345) sti2 = SymbolicTimeInterval(2, 4, 'B', 567) checkRelation(rh, sti1, sti2, epsilon, maxGap, AllenSevenRelationEngine.CONTAIN)
def checkNotInGap(epsilon, maxGap): rh = RelationHandler(RelationHandler.RELATION_ALLEN_7) logger.debug('Testing Not in gap, epsilon: ' + str(epsilon) + ', max gap: ' + str(maxGap)) sti1 = SymbolicTimeInterval(1, 3, 'A', 345) sti2 = SymbolicTimeInterval(3 + maxGap + 1, 3 + maxGap + 8, 'B', 567) checkRelation(rh, sti1, sti2, epsilon, maxGap, AllenSevenRelationEngine.NOT_DEFINED)