用MATLAB做供应链Stackelberg博弈模型数值分析
1
斯塔克尔伯格模型
在古诺模型和伯特兰德模型里,竞争厂商在市场上的地位是平等的,因而它们的行为是相似的。而且,它们的决策是同时的。当企业甲在作决策时,它并不知道企业乙的决策。但事实上,在有些市场,竞争厂商之间的地位并不是对称的,市场地位的不对称引起了决策次序的不对称,通常,小企业先观察到大企业的行为,再决定自己的对策。德国经济学家斯塔克尔伯格建立的模型就反映了这种不对称的竞争。
在斯塔克尔伯格的寡头理论中,提出了将寡头厂商的角色定位为领导者与追随者的分析范式。一般来说,古诺模型中互为追随者的两个厂商势均力敌。而斯塔克尔伯格的寡头厂商模型中,一个是实力雄厚的领导者,一个是实力相对较弱的追随者。
该模型的基本假定条件是,在一个寡头行业中有两个厂商,他们生产相同的产品,其中,一个寡头厂商是处于支配地位的领导者,另一个是寡头厂商的追随者;另外,与古诺模型一样,每个厂商的决策变量都是产量,即每个厂商都会选择自己的最优产量来实现利润最大化。
IntheCournotmodelandBertrandmodel,thestatusofcompetitorsinthemarketisequal,sotheirbehaviorissimilar。Moreover,theirdecisionsaresimultaneous。WhenenterpriseAismakingadecision,itdoesnotknowthedecisionofenterpriseB。Butinfact,insomemarkets,thepositionsofcompetingmanufacturersarenotsymmetrical。Theasymmetryofmarketpositioncausesasymmetryinthedecisionmakingsequence。Usually,smallcompaniesfirstobservethebehavioroflargecompaniesbeforedecidingtheirowncountermeasures。ThemodelbuiltbytheGermaneconomistStackelbergreflectsthisasymmetriccompetition。
InStackelbergsoligarchictheory,ananalyticalparadigmthatpositionsoligarchsasleadersandfollowersisproposed。Generallyspeaking,thetwovendorsthatarefollowersofeachotherintheCournotmodelareevenlymatched。InStackelbergsmodelofoligarchs,oneisastrongleaderandtheotherisarelativelyweakfollower。
Thebasicassumptionofthemodelisthattherearetwomanufacturersinanoligopolyindustry,andtheyproducethesameproduct。Amongthem,oneoligarchLiketheNobelmodel,eachfirm’sdecisionvariableisoutput,thatis,eachfirmwillchooseitsownoptimaloutputtomaximizeprofits。
1
MATLAB。数值分析
前提假设:该供应链为制造商领导的供应链,以后悔敏感系数为例,探究其变化对批发价格的影响。
Prerequisite:Thesupplychainisamanufacturerledsupplychain。Takethesensitivitycoefficientofregretasanexampletoexploretheimpactofitschangesonwholesaleprices。
MATLAB代码分析
symsrkag
syms在matlab中的作用是定义符号变量,意思为创建符号变量r、k、a、g
Theroleofsymsinmatlabistodefinesymbolicvariables,meaningtocreatesymbolicvariablesr,k,a,g
k0。667;a0。7;g1。7;
输入给变量的赋值
Inputtovariableassignment
d0:0。01:1;
假设图形每隔0。01单位取一个点、可根据自己的需要设置
Assumingthatthegraphtakesonepointevery0。01unit,youcansetitaccordingtoyourneeds
Wml3〔〕;
设定一个空集合
Setanemptycollection
Wml4〔〕;
再设定一个空集合,因为后面画两个函数的图形,所以设定两个空集合,拿来装运行后每个函数的值
Setanemptysetagain,becausethegraphsoftwofunctionsaredrawnlater,sosettwoemptysetstoloadandrunthevalueofeachfunction
forr0:0。01:1
套用一个for循环函数,这里求r为自变量,r变化带给函数的变化趋势,所以假设r每隔0。01取一次值
Applyaforloopfunction,whereristheindependentvariable,andthechangeofrbringsthechangetrendofthefunction,sosupposertakesavalueevery0。01
Wml10。5((kr(ag1)1)(aak(g1)1)kr);
输入函数1
Inputfunction1
Wml20。5(aak(g1)kr(ag1)(aak(g1)1)kr);
输入函数2
Inputfunction2
Wml3〔Wml3Wml1〕;
将求得的函数1的值,装入刚刚设定的空集合Wml3
Puttheobtainedvalueoffunction1intotheemptysetWml3justset
Wml4〔Wml4Wml2〕;
将求得的函数2的值,装入刚刚设定的空集合Wml4
Puttheobtainedvalueoffunction2intotheemptysetWml4justset
end
循环结束
Endofloop
figure()
建立图形
Creategraphics
plot(d,Wml3,bx,d,Wml4,r)
用plot函数绘制两个二维图形,plot(X,Y,LineSpec)
Usetheplotfunctiontodrawtwotwodimensionalgraphics,plot(X,Y,LineSpec)
图形样式格式设置如下
Thegraphicstyleformatissetasfollows
xlabel(lambda);
给x轴命名
Namethexaxis
alpha,beta,gamma,delta,lambda,phi就是实现希腊字母输出的
alpha,beta,gamma,delta,lambda,phiistheoutputofGreekletters
ylabel(w);
给y轴命名
Nametheyaxis
legend(w1{ML},w2{ML})
插入图例,图形1叫什么,图形2叫什么
Insertalegend,whatisfigure1called,andwhatisfigure2called
上下标的输入
Inputofsubscriptsandsubscripts
Matlab中上标用(指数),下标用(下划线)
Matlabuses(index)forsuperscriptsand(underscore)forsubscripts
调用方式为:{任意字符},{任意字符}
Thecallingmethodis:{anycharacter},{anycharacter}
gtext({w1{ML};w2{ML}})
可以看到图像窗口中将出现一条十字准线。在需要标注的地方点击鼠标,即可在图片上标记要标记的内容
Youcanseethatacrosshairwillappearintheimagewindow。Clickthemouseontheplacethatneedstobemarked,youcanmarkthecontenttobemarkedonthepicture
gtext(ysinx,FontSize,14)可以更改字体大小
gtext(ysinx,FontSize,14)Thefontsizecanbechanged
holdoff
hoolon和holdoff的差别
holdon在当前坐标系中画了一幅图,再画另一幅图时,原来的图还在,与新图都能被看到
holdondrawsapictureinthecurrentcoordinatesystem,andthendrawsanotherpicture,theoriginalpictureisstillthere,andthenewpicturecanbeseen
holdoff在当前坐标系中画了一幅图,再画另一幅图时,原来的图就看不到了,在轴上绘制的是新图
holdoffdrawapictureinthecurrentcoordinatesystem,andthendrawanotherpicture,theoriginalpictureisnotvisible,andthenewpictureisdrawnontheaxis
pause
程序暂停
完整输入的代码如下图所示:
运行结果如下图所示:
参考资料:谷歌翻译
本文由LearningYard学苑原创,如有侵权,请联系删除。