Folding Recurring Temporal Networks: Horizon-Independent Consistency Checking for Calendars with Gaps

Many real scheduling problems contain events that happen over and over: a robot recharges every shift, a class meets every Tuesday except holidays, a maintenance window interrupts a job each night. Logicians call such an event non-convex, meaning it occupies a period of time with holes in it rather than one unbroken stretch. Checking whether a set of timing rules over such events can all be satisfied at once is called consistency verification. The usual practical recipe has two steps. First, copy every occurrence of every recurring event across the whole planning horizon. Second, hand the resulting constraint problem to a general solver. Its size grows linearly with the horizon, and its numeric constants (absolute timestamps) grow with the horizon as well. Theory says that second growth is exactly what is dangerous. Disjunctive temporal problems, where each constraint offers a choice between alternative time windows, can be solved efficiently when the constraint graph is tree-like and the numbers are small. They become hard even on very tree-like graphs once the numbers are large (Dabrowski et al. 2021).

We propose to avoid both kinds of growth by never unrolling the horizon. The observation is that in calendar-like problems, large numbers come from where in the horizon an occurrence sits, not from the constraints themselves. The constraints relate the $t$-th occurrence of one event to a nearby occurrence of another, using small offsets. Morris, Shoaff and Khatib's notion of correlation already captures this index pairing qualitatively (Path Consistency in a Network of Non-Convex Intervals). We add metric offsets and disjunctions to it. We then show that consistency over $H$ periods can be decided by composing a single per-period "transfer" step with itself. Repeated squaring of that step costs $O(\log H)$ compositions, and detecting when the sequence of composed steps repeats gives an answer for every horizon at once.

Core Claim

Take a recurring network: event types $A, B, \dots$, each occurring once per period $t = 1, \dots, H$, with constraints of the form

$$x_{A,t+d} - x_{B,t} \in [a_1,b_1] \cup \dots \cup [a_r,b_r],$$

Here $x_{A,t}$ is the start (or end) time of the $t$-th occurrence of $A$, the lag $d$ is bounded by a small constant $D$, and the window endpoints $a_i, b_i$ are bounded by a constant $K$ that does not depend on $H$. The claim has three parts.

First, consistency of the unrolled network is equivalent to non-emptiness of an $H$-fold composition of one transfer relation $T$. The relation $T$ maps the feasible configurations of the "interface" variables, meaning the occurrences in a sliding window of $D$ periods, to the next window. We represent interface configurations as finite unions of difference-bound regions over the interface variables, measured relative to the window start. This representation means $K$ enters as a bound on the region description, not as a count of integer states.

Second, because the shift-normalized region set is finite once constants are bounded, the sequence of reachable sets is eventually periodic. Consistency for all $H$, including unbounded recurrence, is therefore decidable by detecting the repeat.

Third, the cost of the method is governed by the interface width $w$, the number of variables in one window, and by $K$. It is independent of $H$. This replaces the $(nk)^{O(w)}$ dynamic program of Dabrowski et al. 2021, where $n$ and $k$ both scale with the horizon, by a cost exponential in $w$ and $\log K$ and only logarithmic in $H$.

The novelty is not that recurring structure can be compressed in general. Rolling durative actions in PATTY_T compress $p$ repeated executions of an action into one SMT transition. The novelty lies in an exact, horizon-independent consistency procedure for metric, disjunctive, non-convex networks. That procedure also lets each period make different disjunctive choices, so it does not force schedules to repeat identically.

Research Program

The work has a formal part and a systems part.

On the formal side, we define the language of recurring metric networks. It is a metric extension of the correlation-indexed non-convex relation networks of Morris et al. The four modal operators of that paper (holds for all sub-interval pairs, only for a given set, for some pair, or in one-to-one correspondence) become patterns over the lag $d$; their one-to-one operator corresponds to the $d=0$ correlation. We then prove the folding equivalence and the eventual-periodicity lemma, and give complexity bounds in $w$, $K$, $D$ and the number of disjuncts.

We work over integer time throughout. This choice is deliberate, not a convenience. Wałęga et al. 2021 and Wałęga et al. 2024 show that rich metric reasoning over dense time can be undecidable while discrete time restores decidability, and our periodicity argument relies on the same finiteness. We will also delimit the boundary honestly. When the window constants are themselves large, for example minute granularity across a week-long period, the bound on $K$ is large. We expect region representations to help here, but that is an empirical question. The W[1]-hardness result of Dabrowski et al. for treewidth also rules out any hope of fixed-parameter tractability in $w$. Folding removes the horizon, not the hardness inside a period.

On the systems side, we build a solver with three components. The first computes the transfer relation by enumerating disjunct choices within one period, using standard simple-temporal propagation per choice. The second composes region sets by squaring. The third detects repeats via canonical forms of the shift-normalized region sets. When a network is inconsistent, the solver returns the smallest failing horizon together with the period window responsible. This output is a natural starting point for gap-based repair, in which an occurrence is split around a conflicting event. Gap-based repair is the non-convex analogue of the interval-shrinking repairs of Bienvenu et al. 2025, and we treat it as a follow-up rather than a deliverable.

Baselines

The naive reference point is to unroll all $H$ periods and run a standard backtracking disjunctive solver that chooses one window per constraint and checks each partial choice with shortest-path propagation. This is the "decompose into convex pieces and use an off-the-shelf DTP solver" recipe that Ladkin 1986 and Morris et al. argue destroys the structure of recurring events. It tells us how bad the default is.

The strongest practical competitor is the same unrolled network encoded for an SMT solver in difference logic with incremental solving. This is the baseline that most threatens the proposal, because modern SMT engines are very good at difference constraints. Evidence from the file shows that compression can beat plain step-by-step encodings: PATTY_T solved 157 of 200 temporal numeric planning problems against 98 for ANMLSMT and needed bound 3.00 versus 11.33 on CUSHING (Cardellini and Giunchiglia 2025). That paper also reports that SMT slows when variable counts balloon, as in PAINTER. There is no reported result found on Lacuna for any solver on recurring metric non-convex networks, so the head-to-head numbers will be new.

The strongest structured competitor is the treewidth dynamic program of Dabrowski et al., run on a path decomposition of the unrolled network, which has the same width $w$ that folding uses. This baseline isolates the key ingredient. It does the same per-window work but walks the horizon linearly with absolute constants, so any gap between it and our solver is attributable to folding and shift normalization alone.

We add two further references. The first is Morris et al.'s qualitative path consistency, which ignores metric content; it shows what the purely qualitative tractable route misses. The second is a "periodic-only" ablation that forces every period to make the same disjunctive choices and checks just one lifted period. This mirrors the flexibility-for-speed trade of Boerkoel and Durfee 2013, whose decoupling kept roughly 20% of the original flexibility at coupling $p=1.0$.

All systems get identical instances, the same machine, a single shared timeout, and the same per-instance tuning budget for SMT configuration options. We count our solver as beating the strongest baseline if three things hold: runtime stays flat or grows logarithmically in $H$ while incremental SMT grows at least linearly; the solver solves strictly more instances within the timeout at horizons of 1,000 periods and above; and it matches SMT verdicts exactly wherever both finish.

Why not just…?

Why not just unroll and call an SMT solver? For short horizons this will probably win, and we will report that regime plainly. The case for folding is the long-horizon and many-query regime. A fleet operator asking "is this rota feasible for the next three years, and for all years?" cannot get the "all years" answer from any finite unrolling, and every finite unrolling re-pays linear cost on each edit. The decisive experiment sweeps $H$ over four orders of magnitude at fixed $w$ and $K$. If SMT stays competitive at $H = 10^4$ on dense-disjunction instances, the practical claim fails and the contribution shrinks to the "every horizon" decision.

Why not just look for a schedule that repeats every period? Such a schedule is easy to find and is sound when it exists, but it is incomplete. Consistent networks can require, for example, alternating disjunctive choices across periods, such as a robot recharging before a task on odd days and after it on even days. The periodic-only ablation measures how often this happens and how much schedule flexibility it discards. The Boerkoel and Durfee experience with decoupling, where most flexibility is lost under tight coupling, suggests the loss will not be negligible.

Why not just use Morris et al.'s path consistency, which is already polynomial? It is qualitative and incomplete. It cannot express "recharge at least 40 minutes before the next shift", and it can accept networks that have no actual solution. We will measure how often it accepts metric-inconsistent instances once the metric labels are stripped. These false-acceptance counts quantify what the metric extension adds.

Proposed Experiments

No existing benchmark in the file contains recurring metric non-convex networks. We will build a generator by extending the random multiagent disjunctive generator of Boerkoel and Durfee (agent counts 2–64, coupling 0.0–1.0) with a period structure, a lag bound $D$, and holiday masks that delete chosen occurrences. Holiday masks break pure shift-invariance and test the solver's handling of exceptions; we handle them as a finite set of exceptional windows composed into the product. We will also derive recurring instances from the multi-robot temporal allocation setting surveyed by Gini 2017, adding interrupted shifts and recharging gaps, which that survey names as unmet needs. A third set will come from cyclic versions of the CUSHING and BOTTLES domains used for PATTY_T.

We will report runtime versus $H$, versus $w$, and versus $K$ (by changing granularity). We will also report solved-instance counts, exact verdict agreement with SMT on all instances both finish, and preserved flexibility for the periodic-only ablation, measured as the fraction of per-occurrence time-window width retained.

Three checks are decisive. Verdicts must agree with SMT on every small instance, which tests the folding equivalence. Runtime must be insensitive to $H$ at fixed $w$, which tests the central claim. The crossover point in $K$ where per-period region blow-up erases the advantage must be located and reported, because that boundary tells practitioners when folding is the right tool.