Construct version 5.4.4
An agent based modeling framework
Multiplatform_Manager Struct Reference

Expands the Social Media Moderation Model to allow users to prefer other platforms when moderated. More...

Inheritance diagram for Multiplatform_Manager:
Collaboration diagram for Multiplatform_Manager:

Public Member Functions

 Multiplatform_Manager (const dynet::ParameterMap &parameters, Construct &construct)
 Requires the model parameters model_parameters::platform_switching_preference and model_parameters::platform_switching_probability and that these parameters be a comma seperated list with the same size of the parameter model_parameters::platforms.
 
void initialize () override
 Replaces each Social_Media_no_followers::agent_active networks in the moderated platforms with an agent active network unique to that platform. More...
 
void moderation_response (unsigned int user_index, Social_Media_no_followers *platform) override
 Modifies the moderated platform's active network and distributes the activity to other platforms. More...
 
- Public Member Functions inherited from Social_Media_Moderation
 Social_Media_Moderation (const dynet::ParameterMap &parameters, Construct &construct)
 Requires the parameters "platform model names", "ban thresholds", and "moderation thresholds".
 
void initialize () override
 Populates moderated_platforms::platform once all models have been loaded. More...
 
virtual void moderation_response (unsigned int user_index, Social_Media_no_followers *platform)
 Called during should_moderate_user and allows inherieted models to perform operations in resonse to that moderation. More...
 
bool intercept (InteractionItem &item, unsigned int sender, unsigned int receiver, const CommunicationMedium *medium) override
 Prevents banned agents on the specified platforms from creating content. More...
 
virtual bool should_moderate_user (InteractionItem &item, unsigned int sender, Social_Media_no_followers *platform, float moderation_threshold)
 Evaluates whether a user should be moderated. More...
 
- Public Member Functions inherited from Model
 Model (Construct &_construct)
 Constructor for all models in Construct. More...
 
virtual ~Model (void)
 Virtual Deconstructor. More...
 
virtual void initialize (void)
 Function called once before any simulation cycles begin. More...
 
virtual void think (void)
 First function called in a simulation cycle. More...
 
virtual void update (void)
 Function called after the think functions in a simulation cycle. More...
 
virtual bool intercept (InteractionItem &item, unsigned int sender, unsigned int receiver, const CommunicationMedium *medium)
 Allows for models to effect change to items created by other models. More...
 
virtual void communicate (const InteractionMessage &msg)
 Function called after the update functions in a simulation cycle. More...
 
virtual void cleanup (void)
 Function called after the Model::communicate functions in a simulation cycle. More...
 
void add_base_model_to_model_manager (const std::string &base_model_name)
 Adds a derived model under the name of the base model and disables the model manager from calling its functions.
 

Public Attributes

std::vector< float > platform_preference_weights
 
std::vector< Graph< bool > * > platform_active_networks
 
std::vector< float > platform_switch_probabilities
 
- Public Attributes inherited from Social_Media_Moderation
const Nodesetknowledge = ns_manager.get_nodeset(nodeset_names::knowledge)
 
std::vector< std::string > platform_names
 
std::vector< Platformmoderated_platforms
 
- Public Attributes inherited from Model
Constructconstruct
 
GraphManagergraph_manager
 
NodesetManagerns_manager
 
Randomrandom
 
bool valid
 If member is false, the model's functions are not called.
 

Detailed Description

Expands the Social Media Moderation Model to allow users to prefer other platforms when moderated.

Member Function Documentation

◆ initialize()

void Multiplatform_Manager::initialize ( void  )
overridevirtual

Replaces each Social_Media_no_followers::agent_active networks in the moderated platforms with an agent active network unique to that platform.

Reimplemented from Social_Media_Moderation.

Here is the call graph for this function:

◆ moderation_response()

void Multiplatform_Manager::moderation_response ( unsigned int  user_index,
Social_Media_no_followers platform 
)
overridevirtual

Modifies the moderated platform's active network and distributes the activity to other platforms.

Only elements after the current time step are affected and each timestep is affected with probability from Multiplatform_Manager::platform_switch_probability of that moderated platform. The activity is transferred to a different platform based on Multiplatform_Manager::platform_preference_weights after dropping the moderated platform's weight.

Reimplemented from Social_Media_Moderation.

Here is the call graph for this function: