Let $(M,g)$ be a smooth, compact Riemannian manifold of dimension $n \geq 2$. Define a time-periodic constraint field $\Phi: M \times \mathbb{R} \to \{0,1\}$ with period $T > 0$, where $\Phi(x,t) = 1$ indicates that movement through point $x \in M$ is allowed at time $t$, and $\Phi(x,t) = 0$ indicates that movement is prohibited.
For fixed points $p,q \in M$, let $\mathcal{C}(p,q)$ be the space of piecewise smooth curves $\gamma: [0,1] \to M$ with $\gamma(0) = p$ and $\gamma(1) = q$. Define the travel time functional $\tau: \mathcal{C}(p,q) \to \mathbb{R}^+ \cup \{\infty\}$ as:
$\tau(\gamma) = \inf\{T \geq 0 : \exists \text{ a reparametrization } \tilde{\gamma}: [0,T] \to M \text{ of } \gamma \text{ such that } \forall t \in [0,T], \Phi(\tilde{\gamma}(t),t) = 1 \text{ and } \|\tilde{\gamma}'(t)\|_g \leq 1\}$
where $\|\cdot\|_g$ denotes the norm induced by the Riemannian metric $g$.
Can Morse theory be extended to the functional $\tau$ on $\mathcal{C}(p,q)$, and if so, how does the Morse complex of $\tau$ relate to the topology of $M$ and the structure of $\Phi$? In particular, consider the case where $M$ is diffeomorphic to a torus.