LocationDesigner
The LocationDesigner class is an interface to design specific network structures using the Creator.
- class pop2net.LocationDesigner(model)[source]
Helper class to create locations from inside the Creator.
- bridge(agent)[source]
Create locations with one agent for each unique value returned.
Cannot be used in combination with melt().
- melt()[source]
Allows to assign agents with different attribute values to the same location.
Merges the agents assigned to the instances of the returned location classes into one instance of this location class.
- mutate()[source]
Creates new versions of this location designer with different attributes.
- Returns:
A dictionary that specifies the values for each mutation.
- Return type:
- nest()[source]
Nests this location class into another location class.
Ensures that the agents assigned to the same instance of this location class are also assigned to the same instance of the returned location class.
- setup()[source]
Use this method to set instance attributes, for instance.
This method is called automatically by the creator after creating an instance.
- Return type: