Skip to content

Commit

Permalink
Force evaluation of timed always at candidate pivot points
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaudeval committed Jan 6, 2021
1 parent 927d259 commit c53e490
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mtl/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ def _eval(x):
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})
Expand Down

0 comments on commit c53e490

Please sign in to comment.