tnetwork.ComScenario.ASSIGN¶
-
ComScenario.
ASSIGN
(comsBefore: [<class 'tnetwork.DCD.community.Community'>], comsAfter: [<class 'str'>], splittingOut: [{<class 'str'>}], **kwargs)[source]¶ Define a custom event
Migrate nodes from a set of snapshot_affiliations to another set of snapshot_affiliations. Can be used to move a set of nodes from a community to another or any other more complex scenario.
Parameters: - comBefore – Ccommunities in input
- comsAfter – label(s) to give to the resulting communities
- splittingOut – How to distribute nodes in output. It is a list of same lenght than comsAfter, and each element of the list is a set of names of nodes. Note that if some nodes present in input does not appear in output, they are considered “killed”
Returns: the communities resulting from the operation (list)