HeterogeneousNetwork
experimental.network_dynamics.HeterogeneousNetwork(
graph,
groups,
routes=None,
history=None,
)Compose different dynamics groups on one shared square graph.
Args: graph: Shared dense or sparse graph. Its node order is canonical for all group assignments and signal routes. groups: Mapping from unique names to NodeGroup instances. Groups must form an exhaustive, non-overlapping partition of graph nodes. routes: Optional mapping from unique names to SignalRoute instances. history: Optional HeterogeneousSolution used to warm-start every group’s integrated state and delayed route signal history.
Attributes: graph: Shared graph instance. groups: Normalized group dictionary. routes: Normalized route dictionary. group_names: Canonically sorted group names. route_names: Canonically sorted route names. group_nodes: Normalized node-index tuples by group. n_nodes: Number of nodes in the shared graph.
Notes: Group membership and sparse topology are static after prepare(). Group/route parameters, graph values, delays within prepared capacity, noise, external inputs, initial states, and route histories remain live.
Methods
| Name | Description |
|---|---|
| initial_state_for | Return the group-local initial state, including an active warm start. |
| update_history | Use a heterogeneous result to warm-start state and route history. |
initial_state_for
experimental.network_dynamics.HeterogeneousNetwork.initial_state_for(name)Return the group-local initial state, including an active warm start.
update_history
experimental.network_dynamics.HeterogeneousNetwork.update_history(solution)Use a heterogeneous result to warm-start state and route history.
All integrated state variables must be present. This mirrors Network.update_history: variables-of-interest may be reordered, but auxiliary-only or reduced results cannot initialize a continuation.