Optimizations and programming: linear, non-linear, dynamic, stochastic and applications with matlab

Page 1


OptimizationsandProgramming:Linear,Non-linear, Dynamic,StochasticandApplicationswithMatlab AbdelkhalakElHami

https://ebookmass.com/product/optimizations-and-programminglinear-non-linear-dynamic-stochastic-and-applications-withmatlab-abdelkhalak-el-hami/

Instant digital products (PDF, ePub, MOBI) ready for you

Download now and discover formats that fit your needs...

Reliability of High-Power Mechatronic Systems 2: Aerospace and Automotive Applications Issues,Testing and Analysis

Abdelkhalak El Hami (Editor)

https://ebookmass.com/product/reliability-of-high-power-mechatronicsystems-2-aerospace-and-automotive-applications-issuestesting-andanalysis-abdelkhalak-el-hami-editor/ ebookmass.com

Linear Algebra and Its Applications, Global Edition Lay

https://ebookmass.com/product/linear-algebra-and-its-applicationsglobal-edition-lay/

ebookmass.com

Reliability Of High Power Mechatronics Systems 1 Abdelkhalak El Hami (Editor)

https://ebookmass.com/product/reliability-of-high-power-mechatronicssystems-1-abdelkhalak-el-hami-editor/ ebookmass.com

Pediatric Primary Care 6th Edition Catherine E. Burns (Editor)

https://ebookmass.com/product/pediatric-primary-care-6th-editioncatherine-e-burns-editor/

ebookmass.com

The Child Psychotherapy Progress Notes Planner (PracticePlanners) 5th Edition – Ebook PDF Version

https://ebookmass.com/product/the-child-psychotherapy-progress-notesplanner-practiceplanners-5th-edition-ebook-pdf-version/

ebookmass.com

The War Nurse Tracey Enerson Wood

https://ebookmass.com/product/the-war-nurse-tracey-enerson-wood/

ebookmass.com

(eTextbook PDF) for Starting Out with Java: From Control Structures through Objects, 7th Edition

https://ebookmass.com/product/etextbook-pdf-for-starting-out-withjava-from-control-structures-through-objects-7th-edition/

ebookmass.com

A Line in the Sand Teri Wilson

https://ebookmass.com/product/a-line-in-the-sand-teri-wilson-2/

ebookmass.com

Titanium for Consumer Applications: Real-World Use of Titanium Francis Froes

https://ebookmass.com/product/titanium-for-consumer-applications-realworld-use-of-titanium-francis-froes/

ebookmass.com

Developmental Mathematics: Prealgebra, Beginning Algebra, & Intermediate Algebra 2nd Edition Julie Miller

https://ebookmass.com/product/developmental-mathematics-prealgebrabeginning-algebra-intermediate-algebra-2nd-edition-julie-miller-2/

ebookmass.com

Optimizations and Programming

Linear, Nonlinear, Dynamic, Stochastic and Applications with Matlab

Abdelkhalak El Hami
Bouchaib Radi

First published 2021 in Great Britain and the United States by ISTE Ltd and John Wiley & Sons, Inc.

Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced, stored or transmitted, in any form or by any means, with the prior permission in writing of the publishers, or in the case of reprographic reproduction in accordance with the terms and licenses issued by the CLA. Enquiries concerning reproduction outside these terms should be sent to the publishers at the undermentioned address:

ISTE Ltd

27-37 St George’s Road

John Wiley & Sons, Inc.

111 River Street London SW19 4EU Hoboken, NJ 07030

UK USA

www.iste.co.uk

www.wiley.com

© ISTE Ltd 2021

The rights of Abdelkhalak El Hami and Bouchaib Radi to be identified as the authors of this work have been asserted by them in accordance with the Copyright, Designs and Patents Act 1988.

Library of Congress Control Number: 2020948478

British Library Cataloguing-in-Publication Data

A CIP record for this book is available from the British Library

ISBN 978-1-84821-953-3

Chapter1.LinearProgramming ........................3

1.1.Introduction.................................3

1.2.Definitions..................................3

1.3.Geometryofthelinearprogram......................5

1.3.1.Polyhedra.................................5

1.3.2.Extremepointsandvertices......................6

1.4.Graphicalsolvingofalinearprogram...................6

1.5.Simplexalgorithm..............................9

1.5.1.Basicsolutionsandbasicfeasiblesolutions..............9

1.5.2.Simplextableau.............................10

1.5.3.Changeoffeasiblebasis........................11

1.5.4.Existenceanduniquenessofanoptimalsolution...........14

1.6.Initializationofthesimplexalgorithm...................15

1.6.1.Big M method..............................15

1.6.2.AuxiliaryprogramorPhaseI......................17

1.6.3.Degeneracyandcycling.........................20

1.6.4.Geometricstructureofrealizablesolutions..............21

1.7.Interior-pointalgorithm...........................22

1.8.Duality....................................23

1.8.1.Dualitytheorem.............................25 1.9.Relaxation..................................27

1.9.1.Lagrangianrelaxation..........................27

1.10.Postoptimalanalysis............................29

1.10.1.Effectofmodifying

1.10.2.Effectofmodifying

1.11.Applicationtoaninventoryproblem...................34

1.11.1.Optimalsolution............................34

1.11.2.Sensitivitytovariationinstock....................35

1.11.3.Dualproblemofthecompetitor...................36 1.12.UsingMatlab................................36

Chapter2.IntegerProgramming

2.1.Introduction.................................41

2.2.Solvingmethods...............................41

2.2.1.Branch-and-boundmethod.......................42

2.2.2.Thebranch-and-cutmethod......................44

2.3.Binaryprogramming............................49

2.3.1.Knapsackproblem............................49

2.3.2.Investmentproblem...........................50

2.4.Decompositionprinciple..........................57

2.4.1.Bendersdecomposition.........................58 2.5.UsingMatlab.................................62

Chapter3.DynamicProgramming

3.1.Introduction.................................65

3.3.1.Bellman’sequationandtheprincipleofoptimality.........68

3.3.2.Approachofthemethod........................70

3.3.3.AfewexamplesofDP.........................70

3.3.4.SolvinganLP..............................73

3.3.5.Shortestpathproblem..........................74

3.3.6.Knapsackproblem............................79

3.3.7.Stockmanagementproblem......................81

3.4.ContinuousDP................................83

3.4.1.Hamilton–Jacobiequation.......................84

3.4.2.Applicationtoaconsumption-savingsmodel.............84

3.5.StochasticDP................................85

3.5.1.Decision-chanceprocess........................85

3.5.2.Solvingmethod.............................86

3.5.3.Applicationtoacontractproblem...................86

3.5.4.Optimalbinarysearchtree.......................87

3.6.UsingMatlab.................................91

Chapter4.StochasticProgramming

4.1.Introduction.................................93

4.2.Presentationoftheproblem.........................94

4.3.Optimalfeedbackinanopenloop.....................94

4.4.Stochasticlinearprogramming.......................95

4.4.1.Modelswithprobabilitythresholdsontheconstraints........96

4.5.Stochasticlinearprogramswithrecourse.................96

4.5.1.L-shapedmethod............................97

4.5.2.MulticutL-shapedmethod.......................99

4.5.3.Interiorlinearizationmethod......................100

4.6.Nonlinearstochasticprogramming.....................100

4.6.1.Approachestotwo-stepproblemswithrecourse...........100

4.6.2.Regularizeddecompositionmethod..................101

4.6.3.MethodsbasedontheLagrangian...................101

4.6.4.Frank–Wolfemethodforproblemswithsimplerecourse......103

4.6.5.Approximationbysamplingaverage:MonteCarlomethod.....105

4.6.6.Stochasticgradientmethod.......................106

4.7.Stochasticdynamicprogramming.....................107

4.7.1.Markovdecisionprocess........................108

4.7.2.Scenariotree...............................109

4.8.Applicationtothereliabilityofmechanicalsystems...........111

4.8.1.Positionandmodelingofthereliabilityproblem...........113

4.9.UsingMatlab.................................121

5.1.Introduction.................................129

5.2.SymmetricTSP...............................131

5.2.1.Historicaloverview...........................132

5.2.2.Solvingmethods.............................134

5.3.Asymmetrictravelingsalesmanproblem.................140

5.3.1.VariantsoftheATSP..........................140

5.3.2.Mathematicalformulations.......................142

5.3.3.MethodsforsolvingtheATSP.....................144

5.4.Vehicleroutingproblem...........................148

5.4.1.Definition.................................148

5.4.2.Fieldsofapplication...........................149

5.4.3.ParametersoftheVRP.........................150

5.4.4.VariantsoftheVRP...........................151

5.4.5.MathematicalformulationoftheVRP.................153

5.4.6.Algorithmiccomplexity.........................155

5.5.Selectiveroutingproblem..........................156

5.5.1.ProblemssimilartotheVRP......................157

5.5.2.Mathematicalformulation.......................157

5.6.UsingMatlab.................................158

Chapter6.UnconstrainedNonlinearProgramming

6.1.Introduction.................................

6.2.Mathematicalformulation.........................

6.2.1.Existenceanduniquenessresults....................

6.3.Optimalityconditions............................

6.4.Quadraticproblems.............................

6.4.1.Gradientmethodwithoptimalstepsize................

6.4.2.Conjugategradientmethod.......................

6.5.Newton’salgorithm.............................

6.6.Methodsofdescentandlinearsearch...................

6.6.1.Presentationofmethodsofdescent..................

6.6.2.Methodofgreatestslope........................

6.6.3.Acceptablestepsize...........................

6.6.4.Linearsearch...............................

6.6.5.Newton’smethodwithlinearsearch..................

6.7.Quasi-Newtonmethods...........................

6.7.1.DFPandBFGSmethods........................

6.8.Relaxationmethod..............................

6.9.Gradientmethod...............................

6.10.Leastsquaresproblem...........................

6.10.1.Gauss–Newtonmethod........................

6.10.2.Levenberg–Marquardtalgorithm...................

6.12.Applicationtoanidentificationproblem.................

6.13.1.The fminsearch

6.13.2.The fminunc

Chapter7.ConstrainedNonlinearOptimization

7.1.Introduction.................................

7.2.Mathematicalformulation.........................

7.3.Lagrangemultipliers............................

7.4.Optimizationwithinequalityconstraints.................

7.4.1.First-orderconditionsofoptimality..................

7.4.2.Presentationofsaddlepoints......................

7.4.3.Saddlepointandoptimization.....................

7.4.4.Convexcase...............................

7.5.Constrainedminimizationalgorithms...................

7.5.1.Relaxationmethod............................

7.5.2.Projectionmethod............................202

7.5.3.Exteriorpenaltymethod........................204

7.5.4.Uzawa’salgorithm............................205

7.6.Newtonalgorithms:SQPmethod.....................206

7.6.1.Equalityconstraints...........................207

7.6.2.Inequalityconstraints..........................209

7.7.Applicationtostructureoptimization...................210

7.8.UsingMatlab.................................217

7.8.1.The fmincon

7.8.2.The fminbnd

7.8.3.Penaltymethod.............................221

Appendix2.Remindersaboutfunctionsfrom

Appendix3.OptimizationToolbox

Optimizationisthedomainofmathematicsthatstudieshowtominimize(or maximize)acertainobjective,forexample,aneconomicparameterorsometypeof energy.Thisisbothanancienttopic,withtheearliestoptimizationproblemsgoing backtoEuclid,andarelativelynewtopic,withtherecentdevelopmentofnumerical methodssuchaslinearprogramming,whichonlytrulybegantoflourishinthe secondhalfofthe20thcentury.Asanillustration,imaginetheproblemofsearching forapaththatjoinstwopointsonamapintheshortesttime.Someparametersofthe problemmightbeuncertain;forexample,wemightencounteratrafficjamonthe road.Optimizationseekstofindthebestcompromisebetweenthevariouspossible risks.

Inthepresenceofuncertainty,theoptimizer(ordecider)willoftentakeadvantage ofinformationaboutthesystemthatbecomesavailabledynamically,i.e.gradually overtime.Forexample,wewillgraduallydiscoverwhichroadsaremostsusceptible totrafficjamsovertime,aswetrythemout.Thedifficultyofanoptimizationproblem iscloselylinkedtotheamountofinformationneededtomakeanoptimaldecision. Aproblemissaidtobelargeifthisquantityofinformationistoobigforclassical solvingtechniquestobeappliedbybruteforce.

Thisbookisdividedintotwoparts:programming(Part1)andoptimization (Part2).Intheprogrammingpart,wepresentacollectionoftoolsforoperations research,includinglinearprogramming,integerprogramming,binaryprogramming, dynamicprogrammingandstochasticprogramming.Operationsresearchfirstarose intheUnitedKingdomduringtheSecondWorldWar,whenscientificmethodswere usedtostudyvariousaspectsofmilitaryoperations.Sincethen,ithasbecomeakey elementofdecision-makingprocessesinvariouscommercial,industrialand governmentalcontexts,offeringasystematicwaytoapprehendtheeverincreasing complexityofthemanagementproblemsfacedbyboththeprivateandpublicsectors.

FollowingitssuccessinmilitarymattersduringtheSecondWorldWar, operationsresearchwasappliedtooperationalproblemsintheindustryandprivate sectorformanyyears.Inthelastdecadeorso,itsapplicationshavebeenextendedto otherdomains,suchaseconomics,finance,marketingandcorporateplanning.More recently,operationsresearchhasbeenusedtomanagehealthcareandeducation systems,solveenvironmentalproblemsandinotherareasofpublicinterest.Its principalusersaremanufacturing,distributionandretailcompaniesinthemining, energy,transportationandconstructionsectors,aswellasservicecompaniessuchas banks,andvariousgovernmentbodies.Noteworthyexamplesofrecentapplications ofoperationsresearchincludelogisticalstudies,railwaysafety,packagingdesign, strategicworkforceplanning,aerialtransportation,forestryoperations,nuclearfuel optimization,productionplanning,andsoon.

Theoptimizationpartofthisbookisdividedintothreechapters:combinatorial optimization,nonlinearoptimizationwithoutconstraintsandnonlinearoptimization withconstraints.Itisentirelydedicatedtonumericaloptimizationalgorithms,their theoreticalfoundationsandconvergenceproperties,theirimplementationand application,andotherpracticalaspects.Theobjectiveistofamiliarizereaderswith thesenumericalalgorithmsinordertounderstandhowtheybehaveinpractice,how toproperlytakeadvantageof Matlab asatool,howtodesignandadequately implementsuchalgorithmsandhowtocorrectlydiagnoseanydifficultiesthatmight arise.

Eachchapterstartswithafewremindersofkeyresults,butreadersshouldnot hesitatetoconsultthereferenceslistedattheendofthebook.Thisbookisorganized accordingtoastrictlylinearapproach.Asageneralrule,theconceptsareillustrated withexamples.Eachchapterendswithanexamplein Matlab.

Acknowledgments

Wewouldliketothankeveryonewhocontributed,directlyorindirectly,tothe writingofthisbookandespecially,theengineeringandPhDstudentsofINSARouen whomwehavehadthepleasureofsupervisingoverthepastfewyears.

PART 1 Programmation

1.1.Introduction

Linearprogrammingcanbedefinedasamathematicaltechniqueforsolving managementproblems.Forexample,supposethatamanagerfacedwithvarious optionswishestodeterminetheoptimalwaytousetheresourcesofacompanyto achieveaspecificobjective,suchasmaximizingtheutilityorminimizingthecost. Thecompany’sproblemscanusuallybemodeledasalinearprogram(LP)consisting ofacertainnumberofresources[HIL90].Forinstance,thelabor,rawmaterials andcapitalareallresourcesavailableinlimitedquantitiesthatmustbedistributed optimallyovervariousmanufacturingprocesses.Theapproachtosolvingthistypeof problemisdividedintotwokeysteps:

–modeltheproblemwithlinearequationsorinequalitiesthatallowustoproperly identifyandstructuretheconstraintssatisfiedbythevariablesofthemodel.The contributionofeachvariabletothecompany’soverarchingobjectivemustalsobe definedasafunctionthatwillbeoptimized;

–findthemathematicaloptimumusingspecificlinearprogrammingtechniques. Wewillstudythreemethodsforsolvingthevarioustypesoflinearprogramming problems.Thefirstisbasedongraphicalsolvingandisthereforelimitedtotwoor threevariables.Thesecondmethodismorealgebraic;itmotivatesthethirdmethod presentedinthischapter,whichisknownasthesimplexmethod(oralgorithm).

1.2.Definitions

D EFINITION 1.1.– AnLPisincanonicalformifitisexpressedasfollows:

A

∈Mp,n (R),b ∈ Rp , and x ∈ Rn Wewrite x =(x1 ,...,xn )T ≥ 0 if x1 ,...,xn ≥ 0

AnLPisinstandardformifitisexpressedasfollows:

max cT x s.t. Ax = b x ≥ 0

Everylinearproblemcanbeexpressedincanonicalform: min cT x = max cT x.

T HEOREM 1.1.–EveryLPinstandardformcanbeexpressedincanonicalformand viceversa.

Terminology

–Thefunction cT x isthe objectivefunction, costfunction or lossfunction.

–Thecomponentsofthevector x arecalled decisionvariables.

–Ifthevector x satisfiesallconstraints,then x isan admissiblesolution.

–Thesetofalladmissiblesolutionsisthe admissibleset or admissibleregion.

–Anadmissiblesolution x∗ thatmaximizesthelossfunction(i.e. cT x∗ ≥ cT x for everyadmissible x)iscalledan optimaladmissiblesolution or optimalsolution.

E XAMPLE 1.1.–Afactorymanufacturestwoproducts P1 and P2 whileconsuming certainresources:equipment,laborandrawmaterials.Theneedsarelistedinthe followingtable.Eachresourceisavailableinlimitedquantities. P1 P2 Availability Equipment 3 9 81 Labor 4 5 55 Rawmaterials 2 1 20

Thetwoproducts P1 and P2 yieldeffectiveprofitsof6dhsand4dhsperunit. Thegoalistodeterminewhich(possiblynon-integer)quantitiesoftheproducts P1 and P2 thefactoryshouldproducetomaximizethetotalprofitfromsellingthesetwo products,subjecttotheavailabilityoftheresources.

Let x1 and x2 bethequantitiesoftheproducts P1 and P2 ,respectively.

TheLPmaybeexpressedasfollows:maximize z (x1 ,x2 )=6x1 +4x2 subjectto:

–availabilityofresources:

3x1 +9x2 ≤ 81

4x1 +5x2 ≤ 55

2x1 + x2 ≤ 20

–positivityofvariables: x1 ,x2 ≥ 0

1.3.Geometryofthelinearprogram

1.3.1. Polyhedra

D EFINITION 1.2.– Apolyhedronisasetthatcanbedescribedas

P = {x ∈ Rn | Ax ≤ b}, where A isan m × n matrixand b isavectorin Rm Notethattheadmissiblesetof anLPisapolyhedron.

D EFINITION 1.3.– Apolyhedron P issaidtobeboundedifthereexistsaconstant c suchthat x ≤ c forevery x ∈ P.

Figure1.1. Boundedpolyhedron(left)andunboundedpolyhedron (right).Foracolorversionofthisfigure,see www.iste.co.uk/radi/optimizations.zip

D EFINITION 1.4.– Let a beanon-zerovectorof Rn ,andlet b beascalar.

–Theset {x ∈ Rn |aT x = b} issaidtobeahyperplane.

–Theset {x ∈ Rn |aT x ≥ b} issaidtobeahalf-space.

Notethatahyperplaneistheboundaryofthecorrespondinghalf-spaceandthe vector a isperpendiculartothehyperplanethatitdefines[TEG12].

1.3.2. Extremepointsandvertices

Let P beapolyhedronand x∗ ∈ P. Thepoint x∗ isanextremepointifandonlyif x∗ isavertexand x∗ isabasicadmissiblesolution.

D EFINITION 1.5.– Let P beapolyhedron.Avector x ∈ P isanextremepointof P if itcannotbeexpressedasaconvexcombinationoftwootherpointsof P.

D EFINITION 1.6.– Let P beapolyhedron.Avector x ∈ P isavertexof P ifthere exists c suchthat

c T x<cT y forevery y in P notequalto x.

T HEOREM 1.2.–Inlinearprogramming,iftheadmissibledomainisneitheremptynor thewholeof Rn ,itisaconvexpolytopewithfinitelymanyverticesthatcaneitherbe boundedorunbounded.Ifanextremepointexists,itisattainedatoneofthevertices ofthepolytope.Apointintheinteriorofthedomainisneveranextremepointif f =0.Ifthepolytopeisbounded, f attainsbothaminimumandamaximumonit.

Thistheoremgivesusagraphicalsolvingmethod.

1.4.Graphicalsolvingofalinearprogram

Thegraphicalmethodworksbyplottinglinesandsearchingforasolutionas follows:

–identifytheadmissibledomain;

–identifythecontours;

–contoursperpendiculartothevector c,andthereforemutuallyparallel;

–eachvalueof z isassociatedwithacontour;

–thevalueof z increasesinthedirectionof c

E XAMPLE 1.2.–Consider,again,theexamplefromearlier.Itsmathematicalmodelis definedbythefollowinglinearprogram:

max (x1 ,x2 )∈R2 6x1 +4x2 s.t. 3x1 +9x2 ≤ 81 4x1 +5x2 ≤ 55

2x1 + x2 ≤ 20 x1 ,x2 ≥ 0

Theintersectionofthehalf-planesdeterminedbythelinescorrespondingtoeach constraintrepresentsthesetofsolutionsthatsatisfytheconstraints(shadedarea).The directionofthecostfunctionisgivenby

z (x1 ,x2 )=6x1 +10x2 = constant

Thisgivesustheoptimalsolution x = 15 2 , 5 byslidingthelinewiththis directionupwards,whilekeepingitparallel,untilitsintersectionwiththey-axisis maximal.Graphicalsolutionsareofcourseonlyapplicablewithprogramsof,at most,threevariables(seeFigure1.2).

Figure1.2. Graphicalsolution.Foracolorversionofthis figure,seewww.iste.co.uk/radi/optimizations.zip

E XAMPLE 1.3.–Considerthelinearprogram:

min z = x1 x2

s.t. x1 +2x2 ≤ 3 2x1 + x2 ≤ 3 x1 ,x2 ≥ 0

ThegraphicalsolutionisshowninFigure1.3.Wehave z ∗ = 2,with x∗ 1 =1 and x∗ 2 =1

Figure1.3. Graphicalsolutionwithisoprofitlines.Foracolorversionof thisfigure,seewww.iste.co.uk/radi/optimizations.zip

1.5.Simplexalgorithm

Ifalinearprogrammingprobleminstandardformhasanoptimalsolution,thena basicadmissiblesolutionthatisoptimalexists.Thesimplexalgorithmisan algorithmforsolvinglinearoptimizationproblems.IntroducedbyGeorgeDantzigin 1947,itwasprobablytheearliestalgorithmforminimizingfunctionsonsetsdefined byinequalities.Thealgorithmmovesfromonebasicadmissiblesolutiontothenext whilereducingthecost.

Theideaofthemethodisasfollows:

–Let x0 beabasicadmissiblesolution.

–For k =0,..., findanadjacentbasicadmissiblesolution xk +1 suchthat cT xk +1 <cT xk

–Untilnoadjacentbasicadmissiblesolutionimprovestheobjective.

Thisgivesalocalminimum,whichisinfactaglobalminimuminlinear programming.

1.5.1. Basicsolutionsandbasicfeasiblesolutions

Considerasystemof m linearequations Ax = b with n variables (m ≤ n)

D EFINITION 1.7.– Abasicsolutionofthesystemofequations Ax = b isobtainedby setting n m variablestozeroandsolvingthesystemfortheremaining p variables. Thesolutionofthesystemof p equationsin m unknownsisassumedtobeunique.The n p variablessettozeroaresaidtobenon-basicvariables,andthe p remaining variablesaresaidtobebasicvariables.AnLPadmits,atmost, C m n basicsolutions.If thebasicsolutionalsosatisfiesthenon-negativityconstraints,itissaidtobeabasic feasiblesolution.

D EFINITION 1.8.– Abasicsolutionissaidtobedegenerateifatleastonebasic variableiszero.Thistypeofsolutionisobtainedwhenthenumberoflinespassing throughanextremepointisgreaterthanthenumberofdecisionvariables.Abasic feasiblesolutionwhose m basicvariablesarepositiveissaidtobeanon-degenerate basicfeasiblesolution.

R EMARK .–Eachbasicfeasiblesolutioncorrespondstoanextremepoint.However, therecanbemorethanonebasicfeasiblesolutionforthesameextremepoint.This occurswhenthebasicfeasiblesolutionisdegenerate.

R EMARK .–Thenumberofbasicsolutionsquicklybecomesverylarge,evenin modestlysizedmodels.Forexample,amodelinstandardformwith 12 constraints and 25 variablescanhaveupto C 12 25 =5200300 basicsolutions.

1.5.2. Simplextableau

Supposethatwewishtosolve

max z (x1 ,x2 ,x3 ,x4 )=4x1 +3x2

s.t. 3x1 +4x2 + x3 =12 7x1 +2x2 + x4 =14,xi ≥ 0(i =1,..., 4)

Let c =(4, 3, 0, 0)T ,b =(12, 14)T , (A,I2 )= 3410 7201 .Itiseasytoseethat

x =(x1 ,x2 ,x3 ,x4 )T =(0, 0, 12, 14)T satisfiestheconstraints.Thus, x isabasic feasiblesolutionwithbasis J = {3, 4} (thethirdandfourthcomponentsof x),whose basicvariablesare x3 =12 and x4 =14.

Notethat x isnotoptimal: z (x)= cT x =0. Theoptimizationprocedure constructsasequenceoftables,calledsimplextableaus.Thefirsttableausummarizes thedata c,b,A andthebasicvariables.Thelastrowisequalto cT . x1 x2 x3 x4 3410 x J 1 = x3 =12 7201 x J 2 = x4 =14

-4-300 z (x)=0

Table1.1. Firstsimplextableau

Generalcase

Considertheproblem (P ) ⎧ ⎪

⎪ ⎩ max z (x)= cT x s.t. Ax = b, x ≥ 0

where x ∈ Rn + ,c ∈ Rn ,b ∈ Rm , and A isan m × n matrix.Wemayassumewithout lossofgeneralitythatrank A = m<n.

D EFINITION 1.9.– Let A =(a1 ,a2 ,...,an ) (where aj isthe j thcolumnof A),and, for J ⊂{1, 2,...,n}, let AJ = {aj ,j ∈ J }. – J ⊂{1, 2,...,n} isabasisof(P)if |J | = m andifrank AJ =rank (aj ,j ∈ J )= m;

–let x =(x1 ,...,xn )T ∈ Rn + .Then xj isabasicvariable(respectively, non-basicvariable)if j ∈ J (respectively, j/ ∈ J ).Wewrite xJ =(xj ,j ∈ J );

–basicfeasiblesolution: x =(x1 ,...,xn )T ∈ Rn + suchthat xj =0 for j/ ∈ J andsuchthat Ax = AJ xJ = b.

R EMARK .–Theadvantageofpassingfromthecanonicalformtothestandardform isthatweimmediatelyobtainabasicfeasiblesolutionthatcanbeusedasastarting pointforthesimplexalgorithm.Thebasicvariablesaretheslackvariables.

1.5.3. Changeoffeasiblebasis

Let x beabasicfeasiblesolutionof(P).Then

z (x)= c T x = c J x J where c J =(cj ,j ∈ J ).

Ourgoalistofindanotherfeasiblebasis J andabasicfeasiblesolution x such that z (¯ x) >z (x) (meaningthat x isbetterthan x).Thesimplexmethodproceedsby replacingoneofthebasicvariables xr withanon-basicvariable xk . Wesaythat

–thevariable xr entersthebasis J : xr → xr =0;

–thevariable xk leavesthebasis J : xk =0 → xk > 0.

Thus, J =(J −{r }) ∪{k }.Weneedrulestochoose r and k. Theserulesareas follows:

–Choose r suchthat xJ

–Choose k suchthat z

E XAMPLE 1.4.–Returningtothepreviousexample: J = {3, 4},c3 = c4 =0, andso zj =0 for j =1, 2, 3, 4 Thus, zj cj = cj ,j =1, 2, 3, 4 Hence, k =1

Tochoose r, xJ r ar 1 =min x

Thus, r =2,x4 leavesthebasis,and x1 entersthebasis.Thenewbasisis J = {3, 1} Wehave

Hence, x =(2, 0, 6, 0)T and z (¯ x)=

Passing from J = {3, 4} to J = {3, 1} increasesthevalueof z to8,butthisvalueisnotyet maximal.

Calculatingthenewtableau

Wenowapplythetransformation x → x thatincreasedthevalueof z. Sincethe value z (¯ x) (>z (x))isnotnecessarilymaximalingeneral,wemayneedtorepeatthe stepsforchoosing r and k severaltimesuntilwefindabasicfeasiblesolutionthatis alsoamaximumof z

Todothis,weneedasecondtableauwhere xJ isreplacedby xJ ,interpretedin thesamewayasthefirst.Thesamelineartransformationthatallowedustopassfrom x to x isappliedtothecolumnsof A.

Thematrix A =(aij ,i =1,...,m,j =1,...,n) isreplacedby A =(¯ aij ,i = 1,...,m,j =1,...,n) asfollows:

Thisgives

where bi , i =1,...,m, arethenewbasicvariables xJ i

Thelastrowofthenewtableauiscomputedinthesameway:

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
Optimizations and programming: linear, non-linear, dynamic, stochastic and applications with matlab by Education Libraries - Issuu