- class vivarium.engine.framework.resource.resource.ResourceId(resource_type, name)[source]
A string representing the unique identifier for a resource, including its type.
- Parameters:
- Return type:
- class vivarium.engine.framework.resource.resource.Resource(name, component, required_resources=())[source]
A generic resource representing a node in the dependency graph.
- Parameters:
- RESOURCE_TYPE = 'generic_resource'
The type of the resource. Should be overridden by subclasses.
- name
The name of the resource.
-
on_dependencies_changed:
Callable[[],None] |None Optional callback invoked when this resource’s dependencies change. Set by the ResourceManager when the resource is registered.
- notify_dependencies_changed()[source]
Notify the resource manager that this resource’s dependencies have changed.
- Return type:
- property resource_id: ResourceId
The long name of the resource, including the type.
- property required_resources: list[ResourceId]
The long names (including type) of required resources for this group.
- class vivarium.engine.framework.resource.resource.Initializer(index, component, initializer, required_resources)[source]
A resource representing a method for initializing simulant state.
- Parameters:
- initializer
The initializer method that this resource represents.
- RESOURCE_TYPE = 'initializer'
The type of the resource.