travel_management.py contains a new xarray-simlab process for managing point-to-point travel data with daily resolution. It contains methods to slice travel data (in dataframe format) by date. The run_step() method in this class runs a Partition process on each daily slice.
The intended interface is through other xarray-simlab processes that manage the time-stepping through the simulation (by day) and can call the run_step() method with a date parameter (currently only a string formatted date "YYYY-MM-DD" is supported). Those processes can then access the partitioned contact matrix through the TravelManager.contact_xr class member without directly interfacing with any Partition objects.
Tests with toy data pass; no benchmarks for larger datasets yet.
travel_management.py
contains a new xarray-simlab process for managing point-to-point travel data with daily resolution. It contains methods to slice travel data (in dataframe format) by date. Therun_step()
method in this class runs aPartition
process on each daily slice.The intended interface is through other xarray-simlab processes that manage the time-stepping through the simulation (by day) and can call the
run_step()
method with adate
parameter (currently only a string formatted date "YYYY-MM-DD" is supported). Those processes can then access the partitioned contact matrix through theTravelManager.contact_xr
class member without directly interfacing with anyPartition
objects.Tests with toy data pass; no benchmarks for larger datasets yet.