Skip to content

Commit 701c2b3

Browse files
committed
feat: make Presence use result_for_not_applicable=NEGATIVE
1 parent 1d30db7 commit 701c2b3

File tree

3 files changed

+215
-180
lines changed

3 files changed

+215
-180
lines changed

execution_engine/util/logic.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ def __new__(
802802
end_time: time | None = None,
803803
interval_type: TimeIntervalType | None = None,
804804
interval_criterion: BaseExpr | None = None,
805+
result_for_not_applicable: IntervalType = IntervalType.NOT_APPLICABLE,
805806
**kwargs: Any,
806807
) -> "TemporalMinCount":
807808
"""
@@ -818,6 +819,7 @@ def __new__(
818819
end_time=end_time,
819820
interval_type=interval_type,
820821
interval_criterion=interval_criterion,
822+
result_for_not_applicable=result_for_not_applicable,
821823
),
822824
)
823825
return self
@@ -844,6 +846,7 @@ def __new__(
844846
end_time: time | None = None,
845847
interval_type: TimeIntervalType | None = None,
846848
interval_criterion: BaseExpr | None = None,
849+
result_for_not_applicable: IntervalType = IntervalType.NOT_APPLICABLE,
847850
**kwargs: Any,
848851
) -> "TemporalMaxCount":
849852
"""
@@ -860,6 +863,7 @@ def __new__(
860863
end_time=end_time,
861864
interval_type=interval_type,
862865
interval_criterion=interval_criterion,
866+
result_for_not_applicable=result_for_not_applicable,
863867
),
864868
)
865869
return self
@@ -886,6 +890,7 @@ def __new__(
886890
end_time: time | None = None,
887891
interval_type: TimeIntervalType | None = None,
888892
interval_criterion: BaseExpr | None = None,
893+
result_for_not_applicable: IntervalType = IntervalType.NOT_APPLICABLE,
889894
**kwargs: Any,
890895
) -> "TemporalExactCount":
891896
"""
@@ -902,6 +907,7 @@ def __new__(
902907
end_time=end_time,
903908
interval_type=interval_type,
904909
interval_criterion=interval_criterion,
910+
result_for_not_applicable=result_for_not_applicable,
905911
),
906912
)
907913
return self

execution_engine/util/temporal_logic_util.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from execution_engine.util import logic
44
from execution_engine.util.enum import TimeIntervalType
5+
from execution_engine.util.interval import IntervalType
56

67

78
def Presence(
@@ -22,6 +23,7 @@ def Presence(
2223
start_time=start_time,
2324
end_time=end_time,
2425
interval_criterion=interval_criterion,
26+
result_for_not_applicable=IntervalType.NEGATIVE,
2527
)
2628

2729

0 commit comments

Comments
 (0)