Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
367 lines (337 sloc) 12.3 KB
#################################################################
# >> analysis:
#
# Attributes for controlling the duration and type of analysis.
# initial_agents:
# The initial agent amount to create.
# max_agents:
# The maximum amount of agents for which to allocate. Once the network
# has grown to this amount, the agent add rate will artifically drop to 0.
# max_time:
# The maximum simulation-time for the simulation. Once it has elapsed, the simulation halts.
# Interacting with the simulation does not alter the simulation-time.
# In simulated minutes.
# max_analysis_steps:
# The maximum number of steps to be made in the KMC loop. For superior results, set this value to 'unlimited'.
# max_real_time:
# The maximum real-time for the simulation. Once it has elapsed, the simulation halts.
# Note that interacting with the simulation DOES detract from this time.
# In minutes.
# enable_interactive_mode:
# Whether interactive mode should be triggered by Ctrl+c or ./scripts/stop.sh (triggers SIGUSR1).
# enable_lua_hooks:
# Whether to use runtime Lua functions that can react to events. **Slow!**
# Hooks are availble for running on every tweet, retweet, follow, etc.
# lua_script:
# Script to use to define the behaviour of interactive mode as well as lua hooks.
# use_barabasi:
# If true, agents will make a certain number of connections set by barabasi_connections.
# barabasi_exponent:
# The value of the exponent assigned to each agent's cumulative-degree.
# use_random_time_increment:
# If true, simulation time will be incremented at a non-constant rate. Increments by 1/sum(rates) on average
# use_followback:
# Whether to enable follow-back in the simulation.
# use_follow_via_retweets:
# Whether to enable following via retweets in the simulation.
# follow_model:
# Accepted models: 'random', 'twitter_suggest', 'agent', 'preferential_agent', 'hashtag', 'twitter'
# model_weights:
# The normalized probability of calling each follow model for the 'twitter' follow model.
# stage1_unfollow:
# Whether to have an unfollow model assuming constant 'chattiness', compares the chattiness of an agent wrt to the following set.
# unfollow_tweet_rate:
# Tweets per simulated minute. Chattiness for which to be considered for unfollow.
# use_hashtag_probability:
# The probability that tweets will contain a hashtag.
#################################################################
analysis:
initial_agents:
10
max_agents:
1000
max_time:
1000
max_analysis_steps:
unlimited
max_real_time:
1
enable_interactive_mode:
false
enable_lua_hooks: # Defined in same file as interactive_mode. Can slow down simulation considerably.
false
lua_script: # Defines behaviour of interactive mode & lua hooks
INTERACT.lua
use_barabasi:
false
barabasi_connections: # number of connections we want to make when use_barabasi == true
2
barabasi_exponent:
1
use_random_time_increment:
true
use_followback:
false # from literature, it makes sense for a realistic system to have followback enabled
use_follow_via_retweets:
false
follow_model: # See notes above
twitter
# model weights ONLY necessary for follow method 'twitter'
model_weights: {random: 1.0, twitter_suggest: 1.0, agent: 1.0, preferential_agent: 1.0, hashtag: 1.0}
stage1_unfollow:
false
unfollow_tweet_rate:
10000
use_hashtag_probability:
0.5
#################################################################
# >> rates:
#
# The rate function for adding agents to the network.
#################################################################
rates:
add: {function: constant, value: 1.0}
#################################################################
# >> output:
#
# Various options for the output of the simulation, both while it
# runs and for post-analysis.
#################################################################
output:
save_network_on_timeout:
true
load_network_on_startup:
true
ignore_load_config_check: # Whether to allow loading configuration with mismatching configuration (generally OK)
true
save_file: # File to save to, and load from
network_state.dat
stdout_basic:
true
stdout_summary:
true
summary_output_rate:
1
visualize:
true
agent_stats:
true
degree_distributions:
true
tweet_analysis:
true
retweet_visualization:
true
main_statistics:
true
degree_distribution_by_follow_model:
true
region_connection_matrix:
true
categories_distro:
true
most_popular_tweet_content:
true
#################################################################
# >> *_ranks:
# Options for the categorization based on various attributes.
#################################################################
tweet_ranks:
thresholds: {bin_spacing: linear, min: 10, max: 500, increment: 10}
retweet_ranks:
thresholds: {bin_spacing: linear, min: 10, max: 500, increment: 10}
follow_ranks:
# MUST be adjusted for max_agents for simulations which implement the twitter_suggest and/or preferential_agent follow models
thresholds: {bin_spacing: linear, min: 0, max: 10000, increment: 1}
weights: {bin_spacing: linear, min: 1, max: 10001, increment: 1}
#################################################################
# >> tweet_observation:
#
# An observation probability density function that gives
# the probability that a tweet is observed at a certain time by an 'ideal observer'.
# An 'ideal observer' is one which always sees a tweet, eventually.'
# The observation PDF is used for both retweeting and follow-from-tweet.
# We combine this with a relevance factor, r, where 0.0 <= r <= 1.0. We in turn
# determine the probability that a given agent will act on a given tweet, with enough time.
#
# density_function:
# Probability 'density' function to sample logarithmatically.
# Provided as if a Python function of 'x'. It is integrated, and after integration,
# the function will be normalized for you.
# Note: technically not a true PDF because one does NOT need to have an integral range that sums to 1.0.
#
# x_start:
# In arbitrary units. The beginning x-value to integrate from.
# x_end:
# In arbitrary units. The end x-value to integrate to.
#
# initial_resolution:
# In arbitrary units. The initial binning resolution.
# That is, the x-step with which to begin binning. The binning resolution is decreased from there on.
# resolution_growth_factor:
# How quickly the resolution grows from one bin to the next.
# Quicker is more efficient, but with less precise rates in later bins.
# time_span:
# In simulated minutes. The time over which the function is defined.
# After this, tweets will 'disappear'.
#################################################################
tweet_observation:
density_function:
2.45 / (x)**1.1
x_start:
1
x_end:
600
initial_resolution:
1.0
resolution_growth_factor:
1.05
time_span:
8*hour
#################################################################
# >> ideologies:
# Abstract categorizations of similar beliefs.
# The amount of ideologies MUST be less than or equal to the value
# set for N_BIN_IDEOLOGIES in config_static.h!
#################################################################
ideologies:
- name: Red
- name: Blue
- name: Green
- name: Orange
#################################################################
# >> regions:
#
# Locations, such as countries, can be represented abstractly.
# Note that the number of regions must match the value set for N_BIN_REGIONS
# in config_static.h EXACTLY!
#
# add_weight:
# Required for each region. The weight with which
# this region is chosen.
#
# preference_class_weights:
# Normalized probability that an agent has a particular 'preference_class'
# idealogy_weights:
# Normalized probability that an agent has a particular 'ideology'
# languages_weights:
# Normalized probability that an agent speaks a particular 'language'
#################################################################
regions:
- name: Ontario
add_weight: 5
preference_class_weights: {NoRetweetPref: 100}
ideology_weights: {Red: 100, Blue: 100, Green: 100, Orange: 100}
language_weights: {English: 100, French: 0, Spanish: 0, French+English: 0}
- name: Quebec
add_weight: 0
preference_class_weights: {NoRetweetPref: 100}
ideology_weights: {Red: 100, Blue: 100, Green: 100, Orange: 100}
language_weights: {English: 0, French: 100, Spanish: 0, French+English: 0}
- name: Mexico
add_weight: 0
preference_class_weights: {NoRetweetPref: 100}
ideology_weights: {Red: 100, Blue: 100, Green: 100, Orange: 100}
language_weights: {English: 0, French: 0, Spanish: 100, French+English: 0}
#################################################################
# >> preference_classes:
# The different preference stereotypes that users in the network can have.
#
# tweet_transmission:
# The transmission probability for tweets made by agents of a particular agent type
# given tweet content and the tweet observation PDF. Effectively, this determines
# the proportion (on average) of tweets made by this agent type that will be retweeted.
#
# Can be provided for an agent type, or the keys 'else' or 'all'.
# Both 'else' and 'all' have the functionality of defining the transmission probability
# function for all otherwise unspecified agent types.
#
# Transmission probability functions are automatically converted into the necessary tables
# using Python. The strings provided can be any valid Python.
#################################################################
preference_classes:
- name: StandardPref
tweet_transmission:
plain: # Also applies to musical tweets
Standard: 0.01
Celebrity: 0.01
else: 0.01
different_ideology: # generally no retweeting of tweets with different ideological content
Standard: 0.00
Celebrity: 0.00
else: 0.00
same_ideology:
Standard: 0.01
Celebrity: 0.01
else: 0.01
humorous:
Standard: 0.02
Celebrity: 0.02
else: 0.02
- name: NoRetweetPref
tweet_transmission:
plain: # Also applies to musical tweets
Standard: 0
Celebrity: 0
else: 0
different_ideology:
Standard: 0
Celebrity: 0
else: 0
same_ideology:
Standard: 0
Celebrity: 0
else: 0
humorous:
Standard: 0
Celebrity: 0
else: 0
#################################################################
# >> agents:
#
# The different types of agents in the network, and their
# associated rates.
#################################################################
agents:
- name: Standard
weights:
# Weight with which this agent is created
add: 100.0
# Weight with which this agent is followed in agent follow
follow: 10.0
tweet_type:
ideological: 1.0
plain: 1.0
musical: 1.0
humorous: 1.0
# Probability that following this agent results in a follow-back
followback_probability: 0
hashtag_follow_options:
care_about_region: false # does the agent care about where the agent they will follow is from?
care_about_ideology: true # does the agent care about the ideology of the agent they will follow?
rates:
# Rate for follows from this agent:
follow: {function: constant, value: 0.01}
# Rate for tweets from this agent:
tweet: {function: constant, value: 0.01}
- name: Celebrity
weights:
# Weight with which this agent is created
add: 100.0
# Weight with which this agent is followed in agent follow
follow: 90.0
tweet_type:
ideological: 1.0
plain: 1.0
musical: 1.0
humorous: 1.0
# Probability that following this agent results in a follow-back
followback_probability: 0
hashtag_follow_options:
care_about_region: false # does the agent care about where the agent they will follow is from?
care_about_ideology: false # does the agent care about the ideology of the agent they will follow?
rates:
# Rate for follows from this agent:
follow: {function: constant, value: 0.01}
# Rate for tweets from this agent:
tweet: {function: constant, value: 0.01}