Random letters simulation

Agents

class scicom.randomletters.agents.LetterAgent(unique_id, model, pos, topicVec, updateTopic, moveRange, letterRange, minSep, threshold)

An agent with fixed initial start position.

Each agent has a personal topic vector representing the shares the agent has of topics 1 to 10 with values between 0 and 1. Each agent has two different ranges, moveRange for deciding to move to another agents position, and letterRange to find potential correspondence partners. In addition a threshold value determines the necessary similarity between topic vectors to send a letter or not.

Received and send letters are kept track of with two additional internal variables.

move(neighbors)

The agent can randomly move to neighboring positions.

sendLetter(neighbors)

Sending a letter based on an urn model.

step()

A single step of the agent.

class scicom.randomletters.agents.LetterNode(unique_id, model, topicVec)

An agent representing the network node.

Only necessary for visualization purposes.

Model

class scicom.randomletters.model.LetterSpace(*args: Any, **kwargs: Any)

Letter sending model class. Handles agent creation, placement and scheduling.

Each agent has a personal topic vector representing the shares the agent has of topics 1 to 3 with values between 0 and 1. Each agent has two different ranges, moveRange for deciding to move to another agents position, and letterRange to find potential correspondence partners. In addition a threshold value determines the necessary similarity between topic vectors to send a letter or not.

Received and send letters are kept track of with two additional internal variables.

make_agents()

Create self.population agents, with random positions and starting headings.

run(n)

Run the model for n steps.

step()

A single step. Fill in here.

Server

scicom.randomletters.server.letter_draw(agent)
scicom.randomletters.server.node_draw(G)