Simulation involves doing what? 1. Loading the network description from a file, and parsing it. 2. Placing any input objects in their places, and connecting any external files/sockets to the appropriate nodes. 3. Initialising the timeout priority queue. 4. Initialising the each processor by running its initialiser with the stored parameters - timeouts may be set. 5. Create a queue containing all the objects that were marked as active 6. For each node that has content, activating a processor: this happens in response to some stimulus, i.e. a signal on one of its nodes changing state (which may be an object arriving or leaving) class proc { proc_class *class; node *nodes; } proc; typedef struct { int n_procs; proc *procs; } net; typedef struct { proc_class *class; node *nodes; group *groups; void *data; } proc; typedef struct { proc *peer; int peer_nd; } node; typedef struct { } group; typedef struct { int n_nodes; int n_groups; char **node_names; char **group_names; char **text_forms; // TODO index by which node & order? void (*push)(int nd, void *data); void (*pull)(int nd, void *data); void (*push_in_group)(int gd, int i, void *data); void (*pull_in_group)(int gd, int i, void *data); } proc_class;