Next: What is Written to
Up: File-Based Cache
Previous: File-Based Cache
Index
The UrbanSim simulations run on top of a file-based cache. The initial reason
for the cache was to improve performance, and has turned out to be very useful for
many features:
- The cache is much faster to access than the MySQL database, at least,
so using the cache dramatically speeds up our processing.
- In many cases, a simulation will require more data than can fit in RAM.
The simulation cache provides a place to store computed
or non-computed values so that we only need to keep in memory just enough
data for the computation at hand.
- Lag variables use the baseyear cache and simulation
cache to quickly get data from prior years, often
without having to re-compute it.
- When preparing for a simulation, UrbanSim uses the data from lag tables
(see 4.4.1) in the baseyear to create historical data in the
baseyear cache for years before the base year. This
allows the simulation to run without any distinction between historical and
predicted data.
- Lag variables on gridcell data need gridcell information from prior
years. UrbanSim can use the information in the
development_event_history table to create gridcell data for before the
baseyear by ``unrolling'' the development events from before the base year.
- When looking for a primary attribute for a given dataset, Opus
looks first in the current year. If the data is not in that year's cache,
Opus automatically looks backward thru prior years until it finds it. This
allows Opus to only store to cache primary attributes in the years in
which they are modified, while still getting the performance and memory
improvements by using the cache.
- The information in the simulation cache includes all
of the intermediate variable values produced for every year. This allows us
to inspect inspect this data for diagnostic purposes.
- Our indicator framework mines the cache data to produces charts, tables
and maps that help to diagnose runs as well as providing input to policy
decisions.
Next: What is Written to
Up: File-Based Cache
Previous: File-Based Cache
Index
info (at) urbansim.org