Data storage#
The policyengine_core.data_storage
module contains two classes that are used to handle the storage of data in simulations.
InMemoryStorage#
- class policyengine_core.data_storage.in_memory_storage.InMemoryStorage(is_eternal: bool)[source]#
Bases:
object
Low-level class responsible for storing and retrieving calculated vectors in memory
- clone() InMemoryStorage [source]#
- get(period: Period, branch_name: str = 'default') Union[Buffer, _SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]] [source]#
- is_eternal: bool#
OnDiskStorage#
- class policyengine_core.data_storage.on_disk_storage.OnDiskStorage(storage_dir: str, is_eternal: bool = False, preserve_storage_dir: bool = False)[source]#
Bases:
object
Low-level class responsible for storing and retrieving calculated vectors on disk
- get(period: Period, branch_name: str = 'default') Union[Buffer, _SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]] [source]#