law fixed_rate_catch_up

bend-kit-scheduler@0.4.1.0 · recurrence_laws.bend:27

import bend-kit-scheduler@0.4.1.0/recurrence_laws.bend as RecurrenceLaws
import Base
import bend-kit-scheduler@0.4.1.0/recurrence.bend as R

27law fixed_rate_catch_up:
28  for +previous: Nat
29  for +completion: Nat
30  for +p: Nat
31  for +bound: Nat
32  {R.plan(previous, completion, 1n+p, R.FixedRate{R.CatchUp{bound}}) ==
33    Some{R.Planned{R.ticks(Nat.min(bound, Nat.div(Nat.sub(completion, previous), 1n+p)),
34      previous, 1n+p), Nat.add(previous,
35      Nat.mul(1n+Nat.div(Nat.sub(completion, previous), 1n+p), 1n+p))}}
36    : Maybe<&2, R.Plan>}

Uses (12)

Used by (0)

No other definition uses this definition.