From c53e490f80f14cde853e8a33c346fe5e474d30a9 Mon Sep 17 00:00:00 2001 From: Gaudeval Date: Wed, 6 Jan 2021 14:37:05 +0000 Subject: [PATCH] Force evaluation of timed always at candidate pivot points --- mtl/evaluator.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mtl/evaluator.py b/mtl/evaluator.py index cc3ada1..2af8cc4 100644 --- a/mtl/evaluator.py +++ b/mtl/evaluator.py @@ -135,6 +135,12 @@ def eval_mtl_g(phi, dt): tmp = f(x) assert b >= a if b > a: + # Force valuation at pivot points + if a < b < OO: + ts = fn.map( + lambda t: interp_all(tmp, t - b - a + dt, tmp.end), + tmp.times()) + tmp = reduce(op.__or__, ts, tmp)[tmp.start:tmp.end] return tmp.rolling(a, b).map(_min, tag=phi) return tmp.retag({phi.arg: phi})