Currently, IdStores reside within Network, Population and Garage. This makes it necessary to pass those around a lot. It is time to move the stores into a global cache, where they are accessible from the entire process. We will use thread_local!(static id_stores: Ids) for this.
The IdStores would have to be wrapped into a RecCell to ensure that each part of the program can create ids. Most of the time, the stores are accessed to read ids after ids are created while reading input files.
Currently,
IdStore
s reside withinNetwork
,Population
andGarage
. This makes it necessary to pass those around a lot. It is time to move the stores into a global cache, where they are accessible from the entire process. We will usethread_local!(static id_stores: Ids)
for this.The IdStores would have to be wrapped into a
RecCell
to ensure that each part of the program can create ids. Most of the time, the stores are accessed to read ids after ids are created while reading input files.