PKsMLp
codemeta.json{"@context": ["https://doi.org/doi:10.5063/schema/codemeta-2.0", "http://schema.org"], "@type": "SoftwareSourceCode", "provider": {"url": "https://www.comses.net", "@type": "Organization", "name": "CoMSES Network (CoMSES)", "@id": "https://www.comses.net"}}PKsMLhzz docs/Product_Diffusion_Model.doc> #%"g R(bjbjVV22r<r<
228$E$::::nnn|~~~~~~$:]nnnnn::4n^::|n|:ҝ~jh0E6RnnnnnnnnnnEnnnnnnnnnnnnn2,^: Product Diffusion Model (SIRB)
In order to study the popular of Black Death in London and plague in Mumbai, Kermack and Mckendrick put forward the SIR model. In the SIR model, populations of individuals have three states (i.e., Susceptible, Infected, and Removed), and two state transitions (S!I, I!R). In accordance with recent literature, this study extends the infectious disease model within an individual's personal network because people primarily care about the behaviors of those who are close to them. This concept is adopted in this research to represent individual opinions on online products. The consumers in the S state (Susceptible, Product information susceptible) may transform into I state if their neighbor node is in I state. The consumers in I state (Infected) are product information owners; they may passinformationthrough a social network to a neighbor node, and they may transform into the R state. The consumers in the R state (Removed, Product information Remover) dont to receive and transmit product information; therefore, they would never influence others or buy any product.
However, information owners dontmean they are the product buyers, SIR are Threshold model are limited in define of this state. We retained major features as the three basic states of our model and added Buy as the fourth state. Therefore, SIRB can provide four classifications of individuals: Susceptible, Infected, Removed, and Buy. SIRB has three state transitions: S!I, I!R, and I!B.
Based on the SIR model and the discussion above, we can obtain the differential equations (1).Consumers in I state will transform into B state (Buy, Product buyer) as they buy the products (first and fourth lines in differential equations (1)). The product buyer can passinformationthrough his or her social network to the neighbor nodes (second line in differential equations (1)). However, the B state cannot become the S state.
EMBED Equation.DSMT4 (1)
Firms provide sample products to k consumers, and k consumers become testers. Testers can determine the productattributes by using the product and decide whether to diffuse the information in their online social network. The probability of the individual in the social network receiving product information (S!I) is ; the probability of the individual who owns the product information not accepting and diffusing the product (I!R) is . the probability of an individual in the social network purchasing the product after they received the product information (I!B) is . In time t, the proportion of four states are s(t),i(t),r(t),b(t). Transmission probability and Purchase probability are two important variables in product diffusion, !6<@LOaek
"
89bcx
z
!$X~!">BDH4679ԶԶh2nOJQJaJo(h;-ph3LaJo(h;-ph3LaJh;-ph3LOJQJaJo(h;-ph3LOJQJaJh,Hh3L5CJOJQJaJH2T$$%,%R%~%%.&f&&&*'$$If`a$gd$$Ifa$gd$XD2a$gd3LXD2YD2gd%$a$gd3LXD2YD2gd3L
@&XD2YD2gd3LRT |"$$$ɽɞُفti\UHh6h3LOJQJaJ
h3LaJo(h:h3LOJQJaJh3LOJQJaJo(h20h3LOJQJaJh3LB*OJQJo(phUh2nCJOJQJaJo(h3LCJOJQJaJ%jI
h3LEHOJQJUVaJh3LEHOJQJaJjh3LEHOJQJUaJh;-ph3LOJQJaJh;-ph3LOJQJaJo(h2nOJQJaJo(which will be discussed in the following.
The pseudo-code for the diffusion dynamics is presented in Table 1. All agents are set as S states in the beginning, and then, agents whose degrees are highest in the network are set as I states. While an I state agent exists, the loop for each agent with corresponding probability must be performed. Run these four differential equations with a giving an initial status of the population, we can get how the proportion of these four groups changes with time, and then calculates the profits earned in this advance selling process. Each combination was run 100 times. In each simulation, individual-level data on whether and during which simulation period the individual decides to buy product were gathered. Aggregate-level data on the global individual state rates were collected as well.
Table 1. The pseudo-code for product diffusion
set product category
set T, h, ,
for each event do
generate BA network
set all agents as inactive(S)
choose one agent (with highest degree) as testers (I)
while there exist I agent
for each I agent do
if neighborhood node is S
neighborhood node become I with probability
end if
I agent become R with probability
I agent become B with probability
end for
end while
calculate n
calculate profit at different T, h, ,
end for
$$$%%%%% %"%&%(%,%P%R%|%~%%%%%%&,&.&X&Z&d&f&x&z&&&&&&&&&&''&'('*':'<''''''''źźźŪźŕźŕźŕŕŇźŇŇhch3L6CJ_HaJ)hch3LCJ_HaJfHq
hch3L6CJ_HaJo(hch3LCJaJhch3LCJ_HaJhch3LCJOJQJaJhch3LCJOJQJaJo(hch3LCJ_HaJo(5*'<'''''(f(v(x(z(k^XD2YD2gd3Lekd$$IfT&044
laytT$$Ifa$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y^X7{2%uHx+af6]>f#sm*qqDHehK)@?71oggo`:fղekp£2ǋ8ǰD CB?81e>nEeU}H]dm1iQ6褣֧
2 $'(*'z((
:@ @H 0(
0(
B
S ?lsx7C
3332rXA P-Q?/R62#<?B_^OPERGO[@bgf5h.Ghw8j_)m,JotrvQtPvx4n2n_&}7SV_uqN7d/
dqi.3Lu6F%B7@8888X$$
@
@$@UnknownG* Times New Roman5Symbol3.* Arial7@Cambria;[SOSimSun7.@ CalibriA$BCambria Math qh)U;Gb|CG\y
\y
?!%),.:;>?]} & 0 2 3 : !6"000 00
0000006:>@DZ\^ =@\]^$([{ 0
0000000Y[];[2 KQHP ?,Jo2!xxuseruserPKsML֩Ob!!
code/BA_net.mfunction A=BA_net(N);
m0=0.9*N;
m=0.3*N;
pp=3;
if m>m0
disp('mϷ');
return;
end
x=100*rand(1,m0);
y=100*rand(1,m0);
switch pp
case 1
A=zeros(m0);
case 2
A=ones(m0);
for i=1:m0
A(i,i)=0;
end
case 3
for i=1:m0
for j=i+1:m0
p1=rand(1,1);
if p1>0.5
A(i,j)=1;A(j,i)=0;
end
end
end
otherwise
disp('ppϷ');
return;
end
for k=m0+1:N
M=size(A,1);
p=zeros(1,M);
x0=100*rand(1,1);y0=100*rand(1,1);
x(k)=x0;y(k)=y0;
if length(find(A==1))==0
p(:)=1/M;
else
for i=1:M
p(i)=length(find(A(i,:)==1))/length(find(A==1));
end
end
pp=cumsum(p);
for i=1:m
random_data=rand(1,1);
aa=find(pp>=random_data);jj=aa(1);
A(k,jj)=1;A(jj,k)=1;
end
end
plot(x,y,'ro','MarkerEdgeColor','g','MarkerFaceColor','r','markersize',8);
hold on;
for i=1:N
for j=i+1:N
if A(i,j)~=0
plot([x(i),x(j)],[y(i),y(j)],'linewidth',1.2);
hold on;
end
end
end
axis equal;
hold off
PKsML$$
code/SIR_m2.mfunction [R_rate, I_peak, T_break, B_peak] = SIR_m2(Graph, State_list, beta,T,mu,Y)
M = length(Graph);
t = 0;
I_sum = 1; I_SUM = 1;
R_SUM = 0;
B_SUM = 0;
S_sum = 0;
State_list = [State_list, 1e99*ones(size(State_list,1), 1)];
State_list( State_list(:,2) == 1, 3) = 0;
I_ID = find(State_list(:,2) == 1);
while ( t < 2 )
t = t + 1;
for i = 1:length(I_ID);
I_i = I_ID(i);
neighbor_ID = Graph(I_i,:) == 1;
neighbor_State = State_list(neighbor_ID,:);
S_ID = neighbor_State((neighbor_State(:,2) == 0),1);
for ii = 1:length(S_ID)
S_i = S_ID(ii);
if State_list(S_i,4)~=1
if (rand < beta)
State_list(S_i,2) = 5;
end
end
end
if State_list(I_i,4)~=1
F=(1-2.718^(-0.4*T))*2.718^(-mu*2.718^(-0.4*T));
if (rand<= 0.1)
State_list(I_i,2) = 2;
else if ((1-F)>=rand)
State_list(I_i,4) = 1;
end
end
end
end
State_list(State_list(:,2) == 5,3) = t;
State_list(State_list(:,2) == 5,2) = 1;
idx = State_list(:,2) == 1;
I_ID = State_list(idx,1);
I_sum = length(I_ID);
I_SUM = [I_SUM;I_sum];
sdx = State_list(:,2) == 0;
S_ID = State_list(sdx,1);
S_sum = length(S_ID);
bdx = State_list(:,4) == 1;
B_ID = State_list(bdx,1);
B_sum = length(B_ID);
B_SUM = [B_SUM;B_sum];
rdx = State_list(:,2) == 2;
R_ID = [State_list(rdx,1), State_list(rdx,3)];
R_sum = size(R_ID,1);
R_SUM = [R_SUM;R_sum];
end
R_rate = 100*max(R_SUM)/M;
I_peak = 100*max(I_SUM)/M;
T_break = t;
B_peak = 100*max(B_SUM)/M;
PKsMLU
code/main.m
N=input('network size N ');
Y=rand(N,1);
G=BA_net(N);
repeat_num = 100;
a=0.7;
mu=10;
EL=6;
Graph=G;
LG = length(Graph);
degree=sum(Graph,2);
for T=1:10
beta =1- (1-a)^EL;
State_list= [1:LG;zeros(4, LG)]';
List_temp = State_list;
List_temp(:,2) = 1e99*ones(LG,1);
List_temp_org = List_temp;
ID_R_all = [];
State_list_Init = State_list;
[kb,kin]=sort(degree,'descend');
kd=kin(1:1,:);
nodei=kd;
State_list_Init(nodei,2) = 1;
R_rate_R=zeros(repeat_num,1);
I_peak_I=zeros(repeat_num,1);
B_peak_B=zeros(repeat_num,1);
for j = 1:repeat_num
List_temp = List_temp_org;
[R_rate, I_peak, T_break, B_peak] = SIR_m2(Graph, State_list_Init, beta,T,mu,Y);
R_rate_R(j,1)=R_rate;
I_peak_I(j,1)=I_peak;
B_peak_B(j,1)=B_peak;
end
R_rate_m(T,1)=mean(R_rate_R);
I_peak_m(T,1)=mean(I_peak_I);
B_peak_m(T,1)=mean(B_peak_B);
end
disp('well done')
PKsMLp
codemeta.jsonPKsMLhzz ,docs/Product_Diffusion_Model.docPKsML֩Ob!!
j{code/BA_net.mPKsML$$
code/SIR_m2.mPKsMLU
code/main.mPK8̌