Equation-Free Methods

Urban models often exist only as microscopic simulations (agent-based, cellular automata) with no closed-form macroscopic equations. The equation-free framework of Kevrekidis and collaborators enables macroscopic analysis—bifurcation diagrams, stability, projective integration—using only short bursts of the microscopic simulator as a “black box.”

1. The Lift-Evolve-Restrict Framework

The central idea is to bridge micro and macro scales through three operators:

  1. Lift \(\mathcal{L}\): Create a microscopic state consistent with a given macroscopic observable. For an urban CA, given a target density profile \(\mathbf{U}\), generate a CA configuration whose coarse-grained density matches \(\mathbf{U}\).
  2. Evolve \(\Psi^{\delta t}\): Run the microscopic simulator for a short time \(\delta t\). This is a “black box”—we do not need to know the equations, just the code.
  3. Restrict \(\mathcal{M}\): Extract the macroscopic observable from the evolved microscopic state. For example, compute the density profile by averaging over CA cells in each coarse bin.

Together, these define a coarse timestepper:

$$\mathbf{U}^{n+1} = \mathcal{M}\circ\Psi^{\delta t}\circ\mathcal{L}(\mathbf{U}^n)$$

This gives us access to the macroscopic time derivative without knowing the macroscopic equation. The numerical derivative is:

$$\frac{d\mathbf{U}}{dt} \approx \frac{\mathcal{M}\circ\Psi^{\delta t}\circ\mathcal{L}(\mathbf{U}) - \mathbf{U}}{\delta t}$$

2. Coarse Projective Euler

The key speedup comes from projective integration: use a short microscopic burst to estimate the macroscopic time derivative, then take a large macroscopic Euler step:

$$\mathbf{U}^{n+1} = \mathbf{U}^n + \Delta T \cdot \frac{\mathcal{M}\circ\Psi^{\delta t}\circ\mathcal{L}(\mathbf{U}^n) - \mathbf{U}^n}{\delta t}$$

where:

  • \(\delta t\) = micro step (short burst of CA simulation, e.g., 3 steps)
  • \(\Delta T\) = macro step (projective leap, e.g., 30 steps)
  • Speedup factor: \(\Delta T / \delta t\) (e.g., 10x)

The method is valid when the microscopic dynamics have a spectral gap: fast microscopic modes decay quickly during \(\delta t\), leaving only the slow macroscopic evolution that we project forward.

When Does It Work?

The method succeeds when there is a separation of timescales. For urban CA models, the fast modes are local neighbourhood fluctuations (which equilibrate in a few steps), while the slow modes are large-scale density waves (which evolve over hundreds or thousands of steps). The ratio of these timescales determines the maximum speedup.

3. Stability and Accuracy

The projective Euler method has amplification factor:

$$G(\lambda) = 1 + \frac{\Delta T}{\delta t}\bigl(e^{\lambda\,\delta t} - 1\bigr)$$

where \(\lambda\) is the eigenvalue of the macroscopic linear operator. For stability, we need \(|G(\lambda)| \leq 1\). The key insight: fast modes (large negative \(\lambda\)) must have \(e^{\lambda\,\delta t} \approx 0\), so \(G \approx 1 - \Delta T/\delta t\). For stability:

$$\left|1 - \frac{\Delta T}{\delta t}\right| \leq 1 \qquad \Longrightarrow \qquad \Delta T \leq 2\,\delta t$$

This seems restrictive, but it applies only to fast modes. If we ensure these modes are sufficiently damped (\(|\lambda_{\text{fast}}| \cdot \delta t \gg 1\)), the stability constraint on the slow modes is simply:

$$\Delta T \leq \frac{2}{|\lambda_{\text{slow}}|}$$

which is exactly the CFL condition for the macroscopic equation we never wrote down. The accuracy is first-order in \(\Delta T\) (Euler method), but can be improved to higher order using Runge-Kutta variants of the projective integrator.

4. Speedup Example

Consider an urban CA with:

  • Micro step: \(\delta t = 3\) CA iterations (enough for local equilibration)
  • Macro step: \(\Delta T = 30\) effective CA iterations
  • Total simulation: 3000 CA-equivalent time steps

Full simulation: 3000 micro steps. Equation-free: 100 macro steps, each requiring 3 micro steps = 300 micro steps total. Speedup: \(10\times\).

For more expensive microscopic models (e.g., agent-based models with complex interactions), the speedup can be even more dramatic—each micro step is expensive, so reducing their count by an order of magnitude provides substantial wall-clock savings.

5. Implementation: Lift-Evolve-Restrict for Urban CA

We implement the full equation-free framework for a 1D diffusion CA. The code compares coarse projective integration with full microscopic simulation, measuring both speedup and accuracy.

Equation-Free Coarse Projective Integration for Urban CA

Python
script.py168 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server

6. Beyond Projective Integration

The equation-free framework enables several powerful macroscopic analyses:

  • Coarse Newton-GMRES: Find steady states of the macroscopic equation by using the coarse timestepper inside a Newton iteration with GMRES as the linear solver. This finds urban equilibria without ever writing down the PDE.
  • Coarse bifurcation analysis: Track how steady states change as parameters (e.g., growth rate, planning stringency) vary. Detect tipping points and phase transitions in urban dynamics.
  • Coarse stability analysis: Compute leading eigenvalues of the Jacobian via matrix-free methods (Arnoldi iteration using the coarse timestepper). Determine whether an urban steady state is stable or unstable.
  • Projective Runge-Kutta: Higher-order projective integrators for improved accuracy at the same speedup cost.

Key Insight

The equation-free framework is the ultimate multi-scale tool: it lets us performmacroscopic mathematical analysis (stability, bifurcation, optimization) on models that exist only as microscopic simulators. For urban science, where agent-based models and CA simulators are often the most natural representation, this bridges the gap between simulation and mathematical understanding—without requiring the modeler to derive the macroscopic equations by hand.