版權說明:本文檔由用戶提供并上傳,收益歸屬內(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. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 數(shù)據(jù)分析面試考核要點及評分標準
- 家裝設計師應聘面試題集
- 2025年資陽市婦女聯(lián)合會公開招聘社會化工作者的備考題庫及答案詳解1套
- 面試成功模具工藝師面試題集
- 數(shù)據(jù)治理技能考試題庫
- 售后服務代表的面試題庫及答案解析
- 2025年廣東省退役軍人服務中心公開招聘編外聘用工作人員備考題庫及參考答案詳解一套
- 2025年貴陽市農(nóng)業(yè)農(nóng)墾投資發(fā)展集團有限公司控股子公司招聘備考題庫完整參考答案詳解
- 飛機牽引員培訓教材與考核大綱含答案
- 2025年中國能建陜西院智能配網(wǎng)公司招聘備考題庫帶答案詳解
- 平津戰(zhàn)役講解課件
- 私人司機合同范本
- 農(nóng)村房屋安全排查培訓
- 2025年河北體育學院競爭性選調(diào)工作人員14名(第三批)考試模擬卷附答案解析
- 《資源與運營管理》期末機考資料
- 股權抵押分紅協(xié)議書
- 《數(shù)字化測圖》實訓指導書
- 電影監(jiān)制的合同范本
- 2025年高級農(nóng)藝工考試題及答案
- 鐵路工務安全管理存在的問題及對策
- 2025廣東茂名市高州市市屬國有企業(yè)招聘企業(yè)人員總及筆試歷年參考題庫附帶答案詳解
評論
0/150
提交評論