版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
TheSimplexMethodIntroductionTheSimplexMethodageneralprocedureforsolvinglinearprogrammingproblemsOriginsofthesimplexmethod1947Dantzigprovedtobearemarkablyefficientmethodthatisusedroutinelytosolvehugeproblemsontoday’scomputersWhydowestudythesimplexmethod?GraphicalmethodcanonlysolvetoyproblemsComputingprincipleofsoftwares.TheEssenceoftheSimplexMethodThesimplexmethodisanalgebraicprocedure.However,itsunderlyingconceptsaregeometric.Wefirstfindacorner-pointfeasiblesolution(CPFsolution).ExaminewhethertheCPFsolutionisoptimal.Ifthesolutionisnotoptimal,findabetterCPFsolution,whichisusuallyadjacenttothelastsolution.Iteratetheabovetwostepsuntilanoptimalsolutionisfoundoritisindicatedtheproblemhasnooptimalsolution.TheEssenceoftheSimplexMethod602424x1x2(6,0)(4,6)(4,3)(2,6)(0,9)(0,6)(0,0)(4,0)TheEssenceoftheSimplexMethodInitialization:Choose(0,0)astheinitialCPFsolutiontoexamine.(ThisisaconvenientchoicebecausenocalculationarerequiredtoidentifythisCPFsolution.)OptimalityTest:Concludethat(0,0)isnotanoptimalsolution.(AdjacentCPFsolutionsarebetter.)602424x1x2(6,0)(4,6)(4,3)(2,6)(0,9)(0,6)(0,0)(4,0)TheEssenceoftheSimplexMethodIteration1:MovetoabetteradjacentCPFsolution,(0,6),byperformingthefollowingthreesteps.602424x1x2(6,0)(4,6)(4,3)(2,6)(0,9)(0,6)(0,0)(4,0)Betweenthetwoedgesofthefeasibleregionthatemanatefrom(0,0),choosetomovealongtheedgethatleadsupthex2axis.Stopatthefirstnewconstraintboundary:2x2=12.Solvefortheintersectionofthenewsetofconstraintboundaries:(0,6).TheEssenceoftheSimplexMethodIteration1:MovetoabetteradjacentCPFsolution,(0,6),byperformingthefollowingthreesteps.602424x1x2(6,0)(4,6)(4,3)(2,6)(0,9)(0,6)(0,0)(4,0)OptimalityTest:Concludethat(0,6)isnotanoptimalsolution.(AnadjacentCPFsolutionisbetter.)TheEssenceoftheSimplexMethodIteration2:MovetoabetteradjacentCPFsolution,(2,6),byperformingthefollowingthreesteps.602424x1x2(6,0)(4,6)(4,3)(2,6)(0,9)(0,6)(0,0)(4,0)Betweenthetwoedgesofthefeasibleregionthatemanatefrom(0,6),choosetomovealongtheedgethatleadstotheright.Stopatthefirstnewconstraintboundaryencounteredwhenmovinginthatdirection:3x1+2x2=12.Solvefortheintersectionofthenewsetofconstraintboundaries:(2,6).TheEssenceoftheSimplexMethodIteration2:MovetoabetteradjacentCPFsolution,(2,6),byperformingthefollowingthreesteps.602424x1x2(6,0)(4,6)(4,3)(2,6)(0,9)(0,6)(0,0)(4,0)OptimalityTest:Concludethat(2,6)isanoptimalsolution,sostop.(NoneoftheadjacentCPFsolutionsarebetter.)TheEssenceoftheSimplexMethodThesimplexmethodfocusessolelyonCPFsolutions.Foranyproblemwithatleastoneoptimalsolution,findingonerequiresonlyfindingabestCPFsolution.Thesimplexmethodisaniterativealgorithm(asystematicsolutionprocedurethatkeepsrepeatingafixedseriesofsteps,calledaniteration,untiladesiredresulthasbeenobtained).TheEssenceoftheSimplexMethodWheneverpossible,theinitializationofthesimplexmethodchoosestheorigin(alldecisionvariablesequaltozero)tobetheinitialCPFsolution.GivenaCPFsolution,itismuchquickercomputationallytogatherinformationaboutitsadjacentCPFsolutionsthanaboutotherCPFsolutions.Therefore,eachtimethesimplexmethodperformsaniterationtomovefromthecurrentCPFsolutiontoabetterone,italwayschoosesaCPFsolutionthatisadjacenttothecurrentone.TheEssenceoftheSimplexMethodWecanidentifytherateoftheimprovementinZthatwouldbeobtainedbymovingalongeachedge.AmongtheedgeswithapositiverateofimprovementinZ,itthenchoosestomovealongtheonewiththelargestrateofimprovementinZ.TheEssenceoftheSimplexMethodApositiverateofimprovementinZimpliesthattheadjacentCPFsolutionisbetterthanthecurrentCPFsolution(sinceweareassumingmaximization),whereasanegativerateofimprovementinZimpliesthattheadjacentCPFsolutionisworse.Therefore,theoptimalitytestconsistssimplyofcheckingwhetheranyoftheedgesgiveapositiverateofimprovementinZ.Ifnonedo,thecurrentCPFsolutionisoptimal.AnExamplemaxz=50x1+100x2s.t.x1+x2≤300 2x1+x2≤400
x2≤250 x1,x2≥0maxz=50x1+100x2s.t.x1+x2+s1=300 2x1+x2+s2=400
x2+s3=250 x1,x2,s1,s2,s3≥0CoefficientMatrixThefeasibleregionisgivenasanumberoflinearequations:
x1+x2+s1=300 2x1+x2+s2=400 x2+s3=250Coefficientmatrixpj
isthejthcolumnvectorofcoefficientmatrixA.TherankofAis3,whichissmallerthan5,thenumberofvariables.ConceptsBasis:letAbeanm×n
coefficientmatrix,whoserankism.IfBisanon-singularm×msub-matrix,thenBisabasisoftheLPmodel.BasicVector:eachcolumninBiscalledabasicvector,andtherearembasicvectorsinB.Non-basicVector:eachcolumnoutsideBisanon-basicvector.BasicVariable:thevariablexicorrespondingtothebasicvectorpiiscalledabasicvariable,andtherearem
basicvariables.Non-basicVariable:thevariablexicorrespondingtothenon-basicvectorpiiscalledanon-basicvariable,andtherearen-m
non-basicvariables.
BasicSolutionBasicSolution:
foragivenbasis,weletthevaluesofthenon-basicvariablesbe0,thenwecansolvethemequationstogetauniquesolution.Inthissolution,thevaluesofbasicvariablesaredeterminedbysolvingtheequations,whilethevaluesofnon-basicvariablesare0.Assumewesettherightsub-matrixtobethebasis
Weletthevaluesofthenon-basicvariablesx1ands2be0,thenwehavethefollowingequations:
x2+s1=300
x2=400
x2+s3=250
ThenwegetasolutiontotheLPproblem:
x1=0,x2=400,s1=-100,s2=0,s3=-150InitialBasicFeasibleSolutionBasicFeasibleSolution(BFS):abasicsolutionthatisafeasiblesolution.FeasibleBasis:thebasiscorrespondingtoaBFS.HowtofindaninitialBFS?Itiseasyifthefollowingconditionshold:Everybjisnon-negative.Thereisanidentitysub-matrixinA,andletitbetheinitialbasis.OptimalityTestTotestwhetheraBFSisoptimal.TestnumberσjRepresentbasicvariablesintermsofnon-basicvariablesRepresentobjectivefunctionintermsofnon-basicvariablesThenthecoefficientofeachvariableintheobjectivefunctionisnowthetestnumberofthevariable.Denoteσiasthetestnumberofvariablexi.Inourexample,ifwetaketheidentitymatrixasthebasis,wehaveσ1=50,σ2=100,σ3=0,σ4=0,σ5=0.OptimalityTestAssumethattheobjectiverepresentedintermsofnon-basicvariablesisasfollows:Ifforsomebasis,wehaveallσj≤0,thenTomaximizethevalueofz,thevalueofshouldbe0.Inaddition,themaximumvalueofzequalsz0.Ontheotherhand,theBFScorrespondingtothecurrentbasisistheoptimalsolution,asthevaluesofthenon-basicvariablesxjareall0,whichmakesthevalueof0.
Foramaximizingproblem,theoptimalityconditionisσj≤0.Foraminimizingproblem,theoptimalityconditionisσj≥0.BasisTransformationActually,ourtaskistofindabasiswhosecorrespondingtestnumbersarenon-positive(formaximizingproblems);ifso,theassociatedBFSistheoptimalsolution.WhenthecurrentBFSisnotoptimal(atleastonetestnumberispositive),weshouldfindanewfeasiblebasissuchthatthecorrespondingBFSimprovesthevalueofobjectivefunction.BasistransformationDeterminethe“enteringvariable”Determinethe“l(fā)eavingvariable”DeterminetheEnteringVariableAccordingtothedefinitionofthetestnumbers,weknowthatσi=0foreverybasicvariable.Ifthereexistsonetestnumberσj>0,thensettingnon-basicvariablexj
asabasicvariablemayincreaseitsvalueandthusthevalueofobjectivefunction.Letthenon-basicvariablewiththelargestvalueofσj
astheenteringvariableandsetitasabasicvariable.Inourexample,σ2=100isthemaximumtestnumber,thuswesetx2
astheenteringvariable.DeterminetheLeavingVariableTheprincipleofdeterminingtheleavingvariableistomakethenewbasicsolutionfeasible(thatis,aBFS)Inourexample:Wehaveknownthattheenteringvariableisx2,thusforthethreeequationswecanfindthreeupperboundsforx2,whichareDeterminetheLeavingVariableTherefore,themaximumvalueofx2thatensuresthenewbasicsolutionisaBFSis250.Thismakesthevalueofs30.Thuswelets3betheleavingvariable.Now,wehaveanewBFS:x1=0,x2=250,s1=50,s2=150,s3=0.Andthevalueofobjectivefunctionis25000,whichisbetterthan0.DeterminetheLeavingVariableDeterminetheleavingvariable----theminimumratiotestForeachequationwherethecoefficientoftheenteringvariableisstrictlypositive
(>0),wecalculatetheratio
oftheright-handsidetothecoefficientoftheenteringvariable.Thebasicvariableintheequationwiththeminimumratioissetastheleavingvariable.TheSimplexMethodInitializationFindtheinitialbasisandBFSOptimalitytestWhetherthetestnumbersareallnon-positive(formaximizingproblems)IftheBFSisnotoptimal,do“basistransformation”andgetanewBFS,gobacktolaststep;otherwise,thealgorithmisterminated.ComputationofTestNumberσjIneachiterationofbasistransformation,byre-rankingdecisionvariablesandtransforminglinearequations,wecanhavethefollowingmodel,inwhichthefeasiblebasisisanidentitymatrixoforderm:DenotebasicvariablesasDenotenon-basicvariablesasComputationofTestNumberσjFirstwedenoteeachbasicvariableinxitermsofnon-basicvariables:Theobjectivefunctioncanbewrittenas:where
TheSimplexMethodinTabularFormThetabularformofthesimplexmethodrecordsonlytheessentialinformation,namely,thecoefficientsofthevariables,theconstantsontheright-handsidesoftheequations,andthebasicvariableappearingineachequation.Thissaveswritingthesymbolsforthevariablesineachoftheequations,butwhatisevenmoreimportantisthefactthatitpermitshighlightingthenumbersinvolvedinarithmeticcalculationsandrecordingthecomputationscompactly.TheSimplexMethodinTabularFormmaxz=50x1+100x2+0s1+0s2+0s3s.t. x1+x2+s1 =300 2x1+x2 +s2=400
x2 +s3=250 x1,x2,s1,s2,s3≥0TheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000000s1s2s3000
111002101001001300400250300/1400/1250/1zjσj=cj-zj
0000050100000z=0The0thIteration(findinitialBFS)TheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000000s1s2s3000
111002101001001300400250300/1400/1250/1zjσj=cj-zj
0000050100000z=0Alldecisionvariables(includingslackvariables)TheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000000s1s2s3000
111002101001001300400250300/1400/1250/1zjσj=cj-zj
0000050100000z=0CoefficientscorrespondingtothevariablesTheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000000s1s2s3000
111002101001001300400250300/1400/1250/1zjσj=cj-zj
0000050100000z=0CoefficientMatrixoftheconstraintsTheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000000s1s2s3000
111002101001001300400250300/1400/1250/1zjσj=cj-zj
0000050100000z=0Theconstantsontheright-handsidesoftheequationsTheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000000s1s2s3000
111002101001001300400250300/1400/1250/1zjσj=cj-zj
0000050100000z=0Identitymatrix,whichistheinitialfeasiblebasisTheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000000s1s2s3000
111002101001001300400250300/1400/1250/1zjσj=cj-zj
0000050100000z=0Basicvariables,eachappearinginoneequationTheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000000s1s2s3000
111002101001001300400250300/1400/1250/1zjσj=cj-zj
0000050100000z=0CoefficientofeachbasicvariableTheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000000s1s2s3000
111002101001001300400250300/1400/1250/1zjσj=cj-zj
0000050100000z=0zjisthevalueofforcolumnj.WefirstleteachelementincolumnjmultiplyitscorrespondingelementincolumncB,thenaddthemup.TheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000000s1s2s3000
111002101001001300400250300/1400/1250/1zjσj=cj-zj
0000050100000z=0Thetestnumberσj,whichiscj-zj.TheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000000s1s2s3000
111002101001001300400250300/1400/1250/1zjσj=cj-zj
0000050100000z=0z
isthevalueoftheobjectivefunctionforthecurrentBFS.Wefirstleteachelementincolumnb
multiplythecorrespondingelementincolumncB,andthenaddthemup.TheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000000s1s2s3000
111002101001001300400250300/1400/1250/1zjσj=cj-zj
0000050100000z=0Asσ1andσ2
arepositiveandσ1<σ2,theinitialBFSisnotoptimalandx2
istheenteringvariable.TheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000000s1s2s3000
111002101001001300400250300/1400/1250/1zjσj=cj-zj
0000050100000z=0FindtheleavingvariableFindthepositivecoefficientsoftheenteringvariables.Findtheconstantsontheright-handsidesoftheequationsthatcorrespondtotheenteringvariables.Divideeachofthesecoefficientsintotherightsideconstantsforthesamerow.PivotElement:theintersectionofthecolumncorrespondingtotheenteringvariableandtherowcorrespondingtotheleavingvariable.TheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000001s1s2x200100
1010-12001-1010015015025050/1150/2—zjσj=cj-zj
01000010050000-100z=25000ThefirstiterationThroughrowtransformation,wesetthepivotelementas1andtheothercoefficientsinthecolumncorrespondingtotheenteringvariableas0.Notethattheelementsincolumnbarealsotransformed.Inourexample,afteriteration0,thepivotelementa32
isalready1,thuswekeepthe3rdrowunchanged.Thenweletthe3rdrowmultiply-1andaddittothe1strowandthe2ndrow,respectively,tomakethecoefficientsofx2be0.
TheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000001s1s2x200100
1010-12001-1010015015025050/1150/2—zjσj=cj-zj
01000010050000-100z=25000Afteriteration1,thevalueofzisimprovedobviously.Next,wecanfindthattheenteringvariableandtheleavingvariablearex1ands1,respectively.Thepivotelementisa11.TheSimplexMethodinTabularFormIterationBasicVariablescBx1x2
s1
s2
s3bRatiobi/aij
501000002x1s2x2500100
1010-100-211010015050250zjσj=cj-zj
501005005000-500-50z=27500Aftertheseconditeration,wefindthatalltestnumbersarenon-positive,thusthecurrentBFSisoptimal,andthemostfavorablevalueisz=27500.PracticeAnotherProblem
minf=2x1+3x2
s.t.x1+x2≥350
x1≥125 2x1+x2≤600
x1,x2≥0Letz=-f
maxz=–2x1–3x2
s.t.x1+x2–s1=350
x1–s2=125 2x1+x2+s3=600
x1,x2,s1,s2,s3≥0BigMMethodForsomeproblems,itisdifficulttofindaninitialBFS,becauseitisdifficulttofindaninitialfeasiblebasis.Anidentitymatrixofordermisanidealfeasiblebasis.Constructanartificialproblembyaddingartificialvariables maxz=-2x1-3x2-M
a1-M
a2 s.t.x1+x2–s1+a1=350
x1–s2+a2=125 2x1+x2+s3=600
x1,x2,s1,s2,s3,a1,a2≥0BigMMethodDifferencebetweenartificialvariablesandslackvariablesThevaluesofslackvariablescanbeeither0orpositive.Thevaluesofartificialvariablesintheoptimalsolutioncanonlybe0;otherwise,thesolutionisnotafeasibleonefortheoriginalmodel.BigMMethodInordertomakethevaluesofartificialvariablesbe0inthesolutionwefinallyget,weletthecoefficientsoftheartificialvariablesbe-M,whereM
ishugepositivenumber.Thisactuallyassignsanoverwhelmingpenaltytohavingpositiveartificialvariables.Iftheoriginalproblemhasfeasiblesolutions,thesimplexmethodwillfinallysetartificialvariablestobenon-basicvariables;otherwise,theoriginalproblemhasnofeasiblesolutions.BigMMethodIterationBasicvariablescB
x1
x2
s1
s2
s3
a1
a2bRatio
-2-3000-M-M0a1a2s3-M-M0
11-10010100-10012100100350125600350/1125/1600/2zj-2M-M
M
M0-M-M-2+2M-3+M-M-M000-475M1a1x1s3-M-20
01-1101-1100-1001010210-2225125350225-----350/2
zj
-2-M
M-M+20-M
M-20-3+M-M
M-2002-2M-225M-250BigMMethodIterationBasicvariablescB
x1
x2
s1
s2
s3
a1
a2bRatio
-2-3000-M-M2a1x1s2-M-20
01/2-10-1/21011/2001/20001/20110.5300/0.5175/0.5zj
-2-1/2M-1M01/2M-1-M001/2M-2-M0-1/2M+10-M-50M-6003
x2
x1
s2
-3-20
01-20-12010101-1000111-1-1
100250125
zj
-2-3401-4000-40-1-M+4-M
-800TheTwo-PhaseMethodWeaddartificialvariablesanddividetheprocessofsolvinganLPproblemintotwophases.Phase1:tofindaBFSfortherealproblem maxz=-a1
-a2
s.t.x1+x2–s1+a1
=350
x1–s2+a2
=125 2x1+x2+s3=600
x1,x2,s1,s2,s3,
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度建筑工程安全生產(chǎn)環(huán)保驗收合同3篇
- 全國人教版初中信息技術七年級上冊第四單元第13課七、《插入更新日期》說課稿
- 山東省泰安市肥城市2024-2025學年六年級上學期末考試道德與法治試題(含答案)
- 200萬套基于AI大模型的新能源汽車熱泵空調(diào)部件柔性制造智能工廠項目可行性研究報告寫作模板-申批備案
- Unit6 Meet my family B Lets talk Lets learn(說課稿)-2024-2025學年人教PEP版英語四年級上冊
- 河南省信陽市浉河區(qū)2024-2025學年三年級上學期期末學業(yè)質(zhì)量監(jiān)測數(shù)學試題參考答案
- 湖南省婁底市(2024年-2025年小學六年級語文)部編版階段練習(上學期)試卷及答案
- 貴州盛華職業(yè)學院《建筑設備(暖通空調(diào))》2023-2024學年第一學期期末試卷
- 貴州輕工職業(yè)技術學院《醫(yī)療診斷前沿技術與創(chuàng)新應用》2023-2024學年第一學期期末試卷
- Unit 2 Lesson 4 Fun with letters(說課稿)-2024-2025學年冀教版(三起)(2024)英語三年級上冊
- 零碳智慧園區(qū)解決方案
- 2025年林權抵押合同范本
- 2024年北師大版四年級數(shù)學上學期學業(yè)水平測試 期末卷(含答案)
- 2024年高考物理一輪復習講義(新人教版):第七章動量守恒定律
- 浙江省寧波市慈溪市2023-2024學年高三上學期語文期末測試試卷
- 草學類專業(yè)生涯發(fā)展展示
- 法理學課件馬工程
- 《玉米種植技術》課件
- 第47屆世界技能大賽江蘇省選拔賽計算機軟件測試項目技術工作文件
- 2023年湖北省公務員錄用考試《行測》答案解析
- M200a電路分析(電源、藍牙、FM)
評論
0/150
提交評論