Model description: we model the communication network using a complete graph composed by 100 nodes, where each node represents either a sender, a forwarder or an exit. To do so, we use a 10x10 grid structure, with the movement function allowing to move to any another grid cell in one step. The sender S_i introduces a message M_i in the network. Through the action of the forwarders, the message moves performing a random walk on the graph, until it reaches an exit (X) and leaves the network.
The forwarders can be either honest (H) or corrupt (C). Corrupt forwarders aim to determine the
sender of the messages they obtain. As initial condition, we have 5 senders S_i, each of them with
the same number of messages that can be sent. We use the index i to distinguish among the senders
and their generated messages. We have 5 exits X and 5 corrupted nodes C. All the remaining nodes are honest forwarders.
#Space: TwoD(10,10)
#Parameters
i_0 = 1.0;
i_1 = 1.0;
i_2 = 1.0;
i_3 = 1.0;
i_4 = 1.0;
m_0 = 1.0;
pm_0 = 1.0;
m_1 = 1.0;
pm_1 = 1.0;
m_2 = 1.0;
pm_2 = 1.0;
m_3 = 1.0;
pm_3 = 1.0;
m_4 = 1.0;
pm_4 = 1.0;
mC_0 = 1.0;
pmC_0 = 1.0;
mC_1 = 1.0;
pmC_1 = 1.0;
mC_2 = 1.0;
pmC_2 = 1.0;
mC_3 = 1.0;
pmC_3 = 1.0;
mC_4 = 1.0;
pmC_4 = 1.0;
e_0 = 1.0;
pe_0 = 1.0;
e_1 = 1.0;
pe_1 = 1.0;
e_2 = 1.0;
pe_2 = 1.0;
e_3 = 1.0;
pe_3 = 1.0;
e_4 = 1.0;
pe_4 = 1.0;
#Agents
S_0(l):= (input_0,i_0).M_0(l);
S_1(l):= (input_1,i_1).M_1(l);
S_2(l):= (input_2,i_2).M_2(l);
S_3(l):= (input_3,i_3).M_3(l);
S_4(l):= (input_4,i_4).M_4(l);
M_0(l):= <-(move_0,pm_0)|>M_0(newl) + <-(moveC_0,pmC_0)|>M_0(newl) + <-(exit_0,pe_0)«M_0(l);
M_1(l):= <-(move_1,pm_1)|>M_1(newl) + <-(moveC_1,pmC_1)|>M_1(newl) + <-(exit_1,pe_1)«M_1(l);
M_2(l):= <-(move_2,pm_2)|>M_2(newl) + <-(moveC_2,pmC_2)|>M_2(newl) + <-(exit_2,pe_2)«M_2(l);
M_3(l):= <-(move_3,pm_3)|>M_3(newl) + <-(moveC_3,pmC_3)|>M_3(newl) + <-(exit_3,pe_3)«M_3(l);
M_4(l):= <-(move_4,pm_4)|>M_4(newl) + <-(moveC_4,pmC_4)|>M_4(newl) + <-(exit_4,pe_4)«M_4(l);
H(l):= ->{l}(move_0,m_0).H(l) + ->{l}(move_1,m_1).H(l) + ->{l}(move_2,m_2).H(l) + ->{l}(move_3,m_3).H(l) + ->{l}(move_4,m_4).H(l);
C(l):= ->{l}(moveC_0,mC_0).C(l) + ->{l}(moveC_1,mC_1).C(l) + ->{l}(moveC_2,mC_2).C(l) + ->{l}(moveC_3,mC_3).C(l) + ->{l}(moveC_4,mC_4).C(l);
X(l):= ->{l}(exit_0,e_0).X(l) + ->{l}(exit_1,e_1).X(l) + ->{l}(exit_2,e_2).X(l) + ->{l}(exit_3,e_3).X(l) + ->{l}(exit_4,e_4).X(l);
#Initial conditions
S_0(1,1)[10]||S_1(2,6)[10]||S_2(5,4)[10]||S_3(6,8)[10]||S_4(8,2)[10]||H(0,0)[1]||H(0,1)[1]||H(0,2)[1]||H(0,3)[1]||C(0,4)[1]||H(0,5)[1]||H(0,6)[1]||H(0,7)[1]||H(0,8)[1]||H(0,9)[1]||H(1,0)[1]||H(1,1)[1]||H(1,2)[1]||H(1,3)[1]||H(1,4)[1]||H(1,5)[1]||H(1,6)[1]||H(1,7)[1]||H(1,9)[1]||H(2,0)[1]||H(2,1)[1]||H(2,2)[1]||H(2,4)[1]||H(2,5)[1]||H(2,6)[1]||H(2,7)[1]||H(2,8)[1]||H(2,9)[1]||H(3,0)[1]||H(3,1)[1]||H(3,2)[1]||H(3,3)[1]||H(3,4)[1]||H(3,5)[1]||H(3,6)[1]||H(3,7)[1]||H(3,8)[1]||H(3,9)[1]||H(4,1)[1]||C(4,2)[1]||H(4,3)[1]||H(4,4)[1]||H(4,5)[1]||H(4,6)[1]||H(4,7)[1]||C(4,8)[1]||H(4,9)[1]||H(5,0)[1]||H(5,1)[1]||H(5,2)[1]||H(5,3)[1]||H(5,4)[1]||H(5,5)[1]||H(5,6)[1]||H(5,7)[1]||H(5,8)[1]||H(5,9)[1]||H(6,0)[1]||H(6,1)[1]||H(6,2)[1]||H(6,3)[1]||H(6,4)[1]||H(6,5)[1]||H(6,6)[1]||H(6,7)[1]||H(6,8)[1]||H(6,9)[1]||C(7,0)[1]||H(7,1)[1]||H(7,2)[1]||H(7,3)[1]||H(7,4)[1]||H(7,5)[1]||H(7,6)[1]||H(7,7)[1]||H(7,8)[1]||H(8,0)[1]||H(8,1)[1]||H(8,2)[1]||H(8,3)[1]||H(8,5)[1]||C(8,6)[1]||H(8,7)[1]||H(8,8)[1]||H(8,9)[1]||H(9,0)[1]||H(9,1)[1]||H(9,2)[1]||H(9,3)[1]||H(9,4)[1]||H(9,5)[1]||H(9,6)[1]||H(9,7)[1]||H(9,8)[1]||H(9,9)[1]||X(1,8)[1]||X(2,3)[1]||X(4,0)[1]||X(7,9)[1]||X(8,4)[1]