Lookup Table Manager

Simulations tend to require a large quantity of data to run. vivarium.engine provides the Lookup Table abstraction to ensure that accurate data can be retrieved when it’s needed. It’s a callable object that takes in a population index and returns data specific to the individuals represented by that index. See the lookup concept note for more.

class vivarium.engine.framework.lookup.manager.LookupTableManager[source]

Manages complex data in the simulation.

Notes

Client code should never access this class directly. Use lookup on the builder during setup to get references to LookupTable objects.

CONFIGURATION_DEFAULTS: dict[str, Any] = {'interpolation': {'extrapolate': True, 'order': 0, 'validate': True}}

A dictionary containing the defaults for any configurations managed by this manager. An empty dictionary indicates no managed configurations.

property name: str
setup(builder)[source]

Defines custom actions this manager needs to run during the setup lifecycle phase.

This method is intended to be overridden by subclasses to perform any necessary setup operations specific to the manager. By default, it does nothing.

Return type:

None

Parameters:

builder (Builder) – The builder object used to set up the manager.

on_post_setup(event)[source]
Return type:

None

Parameters:

event (Event)

build_table(data, name, value_columns)[source]

Construct a lookup table from input data.

Parameters:
Return type:

LookupTable[pd.Series[Any]] | LookupTable[pd.DataFrame]