Construct version 5.4.4
An agent based modeling framework
|
Implements the virtual functions in Social_Media_with_followers::media_user. More...
Public Member Functions | |
default_media_user (Social_Media_no_followers *media, const Node &node) | |
Constructor that takes the media pointer this user is apart of and the iterator containing all the required node attributes. More... | |
Social_Media_with_followers & | media () |
void | enrich_event (media_event *_event) override |
Uses default_media_user::add_mentions to add mentions to all non-reposts and calls the base function. More... | |
virtual void | add_mentions (media_event *post) |
Mentions are added to the event by randomly selecting a followee. More... | |
bool | follow_user (unsigned int alter_agent_index) override |
Returns true if this user decides to follow an agent when called. More... | |
bool | unfollow_user (unsigned int alter_agent_index) override |
Returns true if this user decides to unfollow an agent when called. More... | |
bool | respond_to_follow (unsigned int alter_agent_index) override |
Returns the value of default_media_user::auto_follow. More... | |
unsigned int | consider_recommendations (void) override |
Draws a poisson number with mean value of default_media_user::pdaf. More... | |
float | get_charisma () override |
Returns default_media_user::charisma. More... | |
Public Member Functions inherited from Social_Media_no_followers::default_media_user | |
default_media_user (Social_Media_no_followers *reddit, const Node &node) | |
Constructor that takes the media pointer this user is apart of and the iterator containing all the required node attributes. More... | |
Social_Media_no_followers & | media () |
void | parse (media_event *_event) |
The parsed event is checked to ensure it contains knowledge More... | |
void | reply (media_event *_event) |
With proabability default_media_user::pr creates a reply to the event. More... | |
void | quote (media_event *_event) |
With proabability default_media_user::pqu creates a quote to the event. More... | |
void | repost (media_event *_event) |
With proabability default_media_user::prp creates a quote to the event. More... | |
void | generate_post_events (void) |
The user adds a number of post events based on default_media_user::pdp. More... | |
unsigned int | get_read_count (void) |
The user reads a number of events based on default_media_user::pdread. More... | |
virtual void | enrich_event (media_event *_event) |
Enirches the event with information. More... | |
virtual unsigned int | get_knowledge_selection (void) |
Called during media_user::generate_post_events to choose which piece of knowledge to add to a media_event. More... | |
std::set< media_event * > | read (media_event *read_event) |
Collects all events an agent will parse when reading an event. More... | |
Public Member Functions inherited from Social_Media_no_followers::media_user | |
Random & | random () |
media_user (Social_Media_no_followers *media) | |
virtual | ~media_user () |
virtual void | parse (media_event *read_event)=0 |
Called during Social_Media_no_followers::communicate when an agent parses an event. This function is called once for every message. More... | |
virtual void | reply (media_event *read_event)=0 |
Called after media_user::parse only if this agent posseses the knowledge in the read event. This function should create a reply based on the implementation's conditions. More... | |
virtual void | quote (media_event *read_event)=0 |
Called after media_user::parse only if this agent posseses the knowledge in the read event. This function should create a quote based on the implementation's conditions. More... | |
virtual void | repost (media_event *read_event)=0 |
Called after media_user::parse only if this agent posseses the knowledge in the read event and read_event::type equals media_event::event_types::post. This function should create a repost based on the implementation's conditions. More... | |
virtual void | generate_post_events (void)=0 |
Called during Social_Media_no_followers::think. Function should generate post events using Social_Media_no_followers::create_post. More... | |
virtual unsigned int | get_read_count (void)=0 |
Called during Social_Media_no_followers::think to determine how many events to read in a user's feed. More... | |
virtual std::set< media_event * > | read (media_event *read_event)=0 |
Called during Social_Media_no_followers::think to determine which other events should be added to an InteractionMessage in addition to the read event. More... | |
virtual bool | follow_user (unsigned int alter_agent_index)=0 |
Returns true if this user decides to follow an agent More... | |
virtual bool | unfollow_user (unsigned int alter_agent_index)=0 |
Returns true if this user decides to unfollow an agent More... | |
virtual bool | respond_to_follow (unsigned int alter_agent_index)=0 |
An alter has decided to follow this user and can decide to reciprocate that following. More... | |
virtual unsigned int | consider_recommendations (void)=0 |
Returns how many agents should be considered to be followed in Social_Media_with_followers::add_followees More... | |
virtual float | get_charisma ()=0 |
Returns the user's charisma or how likable the user is independent of other user attributes. More... | |
Public Attributes | |
float | pdaf |
The probability density for how many agents will be recommended to an agent to follow each time step. More... | |
float | rf |
The scale factor to determine number of removed followees. | |
float | charisma |
This determines how likable someone's event is going to be. | |
bool | auto_follow |
If true, this user, when added as a followee by another user, will automatically reciprocate followings | |
Public Attributes inherited from Social_Media_no_followers::default_media_user | |
unsigned int | id |
This user's agent index. | |
float | pdp |
The probability density to post pdtw * dt = average number of events in a time period. | |
float | pr |
The probability to reply when an event is read. | |
float | prp |
The probability to repost when a post is read. | |
float | pqu |
The probability to quote when an event is read. | |
float | pdread |
The probability density to read events (time in hours) pdread * dt = average number of read messages in a time period. | |
Public Attributes inherited from Social_Media_no_followers::media_user | |
Social_Media_no_followers * | media_ptr |
Implements the virtual functions in Social_Media_with_followers::media_user.
summary>
Social_Media_with_followers::default_media_user::default_media_user | ( | Social_Media_no_followers * | media, |
const Node & | node | ||
) |
Constructor that takes the media pointer this user is apart of and the iterator containing all the required node attributes.
Some required node attribute names depend on Social_Media_with_followers::media_name. Thus the following attributes are required in addition to the attributes required by Social_Media_no_followers::default_media_user:
|
virtual |
Mentions are added to the event by randomly selecting a followee.
This function is called during default_media_user::enrich_event.
Reimplemented in SM_wf_emotions::default_media_user.
|
overridevirtual |
Draws a poisson number with mean value of default_media_user::pdaf.
Implements Social_Media_with_followers::media_user.
|
overridevirtual |
Uses default_media_user::add_mentions to add mentions to all non-reposts and calls the base function.
Reimplemented from Social_Media_no_followers::default_media_user.
|
overridevirtual |
Returns true if this user decides to follow an agent when called.
Uses a Euclidian distance between the ego agent's knowledge trust and the ego agent's transactive memory for the alter agent. The greater the distance the less likely the ego agent is to follow the alter agent. Finally the probability is multiplied by the alter agent's charisma.
Implements Social_Media_with_followers::media_user.
|
overridevirtual |
Returns default_media_user::charisma.
Implements Social_Media_with_followers::media_user.
|
overridevirtual |
Returns the value of default_media_user::auto_follow.
Implements Social_Media_with_followers::media_user.
|
overridevirtual |
Returns true if this user decides to unfollow an agent when called.
Three factors currently contribute to unfollowing an agent, whether a following relationship is bidirectional or unidirectional, receiving responses to your events, and the jacard similarity of the alter agent's followers and the ego agent's followers. More information on the impact of these factors can be seen in Kwak et al. More of a Receiver Than a Giver: Why Do People Unfollow in Social_Media_with_followers? AAAI (2012). The resulting probability is multiplied by Social_Media_with_followers::dt to ensure a similar number of agents are unfollowed regardless of the time between time periods. The probability is also divided by media_user::rf to allow for tuning of the removing of followers.
Implements Social_Media_with_followers::media_user.
float Social_Media_with_followers::default_media_user::pdaf |
The probability density for how many agents will be recommended to an agent to follow each time step.
The average number of agents recommended in a time period is pdaf * dt and is sampled from a poisson distribution. Each agent this is recommended a follower is asked via media_user::follow_user and is only added as a follower if the function returns true.