(1)文献:
https://linkinghub.elsevier.com/retrieve/pii/S1366554521001174.
(2)MATLAB代码:
clear;clc
syms a theta pr ps w c Dr Ds Enc Eprice; %0<=theta<1
Enc=0; %0表示不侵占;1表示侵占
U=Ds-(Ds^2)/2+Dr-(Dr^2)/2-theta*Ds*Dr-ps*Ds-pr*Dr; %消费者效用函数
if Enc==1
U=Ds-(Ds^2)/2+Dr-(Dr^2)/2-theta*Ds*Dr-ps*Ds-pr*Dr;
[Dsx Drx]=solve([diff(U,Ds,1)==0 diff(U,Dr,1)==0],[Ds Dr]);
else
Ds=0;ps=0;
U=Ds-(Ds^2)/2+Dr-(Dr^2)/2-theta*Ds*Dr-ps*Ds-pr*Dr;
Drx=solve(diff(U,Dr,1)==0,Dr);
Dsx=0;
end
%% 求解上述优化问题得到需求函数如下
if Enc==1
Dsx =(ps + theta - pr*theta - 1)/(theta^2 - 1);
Drx =(pr + theta - ps*theta - 1)/(theta^2 - 1);
else
Drx=1 - pr;
Dsx=0;
end
%% 集中模型
pi=pr*Drx+(ps-c)*Dsx;
if Enc==1
[psx prx]=solve([diff(pi,ps,1)==0 diff(pi,pr,1)==0],[ps pr]) %CE
else
prx=solve(diff(pi,pr,1)==0,pr) %CN
end
%% 分散模型--等价策略和不等价策略
pir=(pr-w)*Drx;
pim=w*Drx+(ps-c)*Dsx;
Eprice=0 %0表示不采用等价策略
if Enc==1
if Eprice==1 %EP
pir=(pr-w)*(pr + theta - pr*theta - 1)/(theta^2 - 1);
prx1=solve(diff(pir,pr,1)==0,pr)
psx1=prx1
else
[prx1 psx1]=solve([diff(pir,pr,1)==0 diff(pim,ps,1)==0],[pr ps]) %NEP
end
pimx1=simplify(subs(pim,[ps pr],[psx1 prx1]))
wx=simplify(solve(diff(pimx1,w,1)==0,w))
prx=simplify(subs(prx1,w,wx))
psx=simplify(subs(psx1,w,wx))
else
prx1=solve(diff(pir,pr,1)==0,pr) %N
pimx1=simplify(subs(pim,pr,prx1))
wx=simplify(solve(diff(pimx1,w,1)==0,w))
prx=simplify(subs(prx1,w,wx))
end
%% 直销成本的阈值
% Dsx =subs((ps + theta - pr*theta - 1)/(theta^2 - 1),[pr ps],[prx psx])
% solve(Dsx==0,c)