Class SocialNetworkSampler


  • public class SocialNetworkSampler
    extends Object

    Class that contains the general logic for generating a social network, using a heuristic approach that was shown empirically to perform well and fast on large scale networks.

    It implements the appraoch described in chapter 5 of this dissertation. Please refer to it for details.

    Author:
    thibautd
    • Constructor Detail

      • SocialNetworkSampler

        @Inject
        public SocialNetworkSampler​(org.matsim.api.core.v01.population.Population population,
                                    EgoCharacteristicsDistribution degreeDistribution,
                                    CliquesFiller cliquesFiller,
                                    EgoLocator egoLocator,
                                    SpatialCollectionUtils.Metric<double[]> metric)
        Parameters:
        population - the population for which a social network will be generated
        degreeDistribution - defines the rules to sample the CliqueStubs for each agent
        cliquesFiller - defines the rules to match CliqueStubs to close the network
        egoLocator - translates ego sociodemographics into a point in a cartesian space, used for closest-point matching
        metric - defines the metric used to find the "closest" Ego to a point in the space of sociodemographics.
    • Method Detail

      • addCliqueListener

        public void addCliqueListener​(Consumer<Set<Ego>> l)
      • sampleSocialNetwork

        public org.matsim.contrib.socnetsim.framework.population.SocialNetwork sampleSocialNetwork()