48
Operations Research Lecture Notes By Prof A K Saxena Professor and Head Dept of CSIT G G Vishwavidyalaya, Bilaspur-India

Operation Research07.04.14

Embed Size (px)

DESCRIPTION

Operation Research07.04.14

Citation preview

Operations ResearchLecture Notes ByProf A K SaxenaProfessor and HeadDept of CSITG G Vishwavidyalaya, Bilaspur-IndiaOperations ResearchSome important tips before start of course material to students Mostly we followed Book by S D Sharma, as prescribed for this syllabus At places, we use some internet links not necessarily mentioned there at. We acknowledge all such resources. As the course is mostly mathematical in nature, we will be solving problems in class room. The problems will involve a lot of mathematics, calculations although simple but will be so time consuming to express on computers, we leave it up to students to ask in details any particular topic or problem in class or during contact hours. So ready to take off !!!!History of Operations ResearchThe term Operation Research has its origin during the Second World War. The military management of England called a team of scientists to study the strategic and tactical problems which could raise in air and land defence of the country. As the resources were limited and those need to be fully but properly utilized. The team did not involve actually in military operations like fight or attending war but the team kept off the war but studying and suggesting various operations related to war. What is Operations Research?Several definitions have been given Operationsresearch(abbreviatedasOR hereafter)isascientific methodofprovidingexecutivedepartmentswitha quantitativebasisfordecisionsregardingtheoperations under their control: Morse and Kimbal (1944) ORisananalyticalmethodofproblem-solvinganddecision-makingthatis useful in the management of organizations. In operations research, problems are brokendownintobasiccomponentsandthensolvedindefinedstepsby mathematical analysis. OperationalResearch(OR)istheuseofadvancedanalyticaltechniquesto improvedecisionmaking.ItissometimesknownasOperationsResearch, ManagementScienceorIndustrialEngineering.Peoplewithskills inORhold jobsindecisionsupport,businessanalytics,marketinganalysis andlogistics planning as well as jobs with OR in the title.Assuchanumberofdefinitionscanbefoundinliterature,you can express the term OR with the spirit mentioned in the literature. Meaningof Operations Research?As stated early, the OR does not mean to get involved in the operations but suggestion for better execution of operations. Suggesting strategy how the operations can be improved and get better results. The genesis of ORis in finding better ways to solve a problem. Thus it is analytical not purely hard core action oriented. As we explore several options for the analysis of operations, we search and re-search the effects of operations. If one solution offers some result, try second solution and see and compare with previous and so on unless we satisfy ourselves. Therefore research term sounds to indicate that there would be enough thinking on the outcome of several results. Hence Operation Research.Meaningof Operations Research?A simple example of ORGivendifferentroutstoreachfromsourceAto destinationB.Alsoontheseroutestherecanbe variouswaystotravel.Forsimplicity,weassumewe havetravellingmodesx,y,zeachhavingdifferent travelling time and cost incurred on travel.Ihavealimitedmoneyorbudgetandalimitedtime also to reach destination B. Now all options can reach meAtoBbuttheywillnotbefitforme.Iwanta solutionwhichIcanusesothatIcanaffordjourney both in terms of cost and time. OR can be used here.Management Applications of Operations Research?1. Finance budgeting and investment2. Purchase, procure and exploration3. Production management4. Marketing5. Personal management6. Research and developmentScopes ofOR (elaborate following by your own as discussed in class) 1. Agriculture:optimum allocation of land, crops, irrigation etc2. Finance:maximize income, profit, minimize cost etc3. In industries: Allocation of resources, assignment of problems to worthy employees etc4. Personal management: To appoint best candidate, decide minimum employees to complete job etc5. Production management: Determine number of units to produce to maximize profit, etcPrinciples of Modeling in Operations Research?HowshouldwemodelproblemsofOR,forthispurposefollowing principles can be kept in mind (Some principles are given here)1. Trytobuildupasimplemodelinsteadofbuildingcomplex model2. Use only the specialized model to solve a problem ratherthan applying same model to fit in every problem3. Model validation before implementation: Test a model before it is actually implemented in real world 4. Model should be practical in approach and not a pure ideal one which may face problem when put in real time problems5. Use a model only for which it is best. It should not be pressed to do what it can not do better with6. ORmodelscansupportdecisionmakersintheirprocessbut can not replace or in many cases outperform decision makers. Main Characteristics or features of Operations Research?1. Inter-disciplinaryteamapproach:InOR,tomodelaproblem, peopleorexpertsfromvariousdisciplinesarejoined.E.g Computerexpert,Economists,mathematicianscanjointo model a economics problem2. Wholisticapproachtothesystem:ORmodelshavetothink thewholebusinessnotfortheparticularunitforwhichitis engaged. It will see the effect of the model in entire business.3. Using OR techniques, we can only improve the solutions of the exiting problems but can notmakethem perfect due tomany other factors affecting solutions4. Useofscientificresearchtoapplythestateofarttechniquesto improve solutions5. Total output is optimized by maximizing or minimizing outputInthepresentcoursewewillconsideronlyfewwellestablishedstandardproblemsofORlikeLPP,Transportation, Assignment,Replacement,CPM/PERT.Furthertherecanbe optimizationmodelsinvolvingGenetic,Swarmintelligence,etc beyond the scope of the course hereExpression of problems inOperations Research?A typical example of OR problemMost of the problems in OR are of the following form Givenanobjectivefunctionalsocalledfitness functionwhichdependsoncertainvariablesor parameters.Theobjectivefunctionhastobe optimized, i.e. maximized or minimized. Asetofconstraintsgivenwhichshouldbesatisfied while solving the problemSome conditions on the nature ofparameters so as to ignorethoseparametersatallwhichdonotfulfill these conditions e.g. x2=4 will give x=+2 and x=-2 but we do not want to consider x=-2 so we have to declare x>=0 at the start of the problem.Operations ResearchIntroduction to LPPEquations and Inequalities/ConstraintsWe are familiar with terms equations such as 2x+ 3y -3z = 12 isanequationaswehaveanequalitysignrelatingleft hand side with right hand sideBut in OR we will mostly deal with types of following 2x + 3y = 14Thesetypes of representationswill be called as constraints or inequalities in ORLPPstandsforlinearProgrammingProblemwhichmeans findingoptimumsolutions(minimumormaximum)represented bya function of variables orparameterscalled objective function, denoted by zSubjecttoasetoflinearequationsorinequalitiescalled constraints.Operations ResearchIntroduction to LPPIn an LPP, the equations or inequalities are of the linear form like a11x1 +a12x2 ++ a1nxn = b1ora11x1 +a12x2 ++ a1nxn >= b1or In general where aij, bi, and cjare given constants. aij are coefficients ofdecision variables xs, bi are constraints values and cjare coefficients associated to objective function zOperations ResearchIntroduction to LPPA complete solution to an LPP comprises of following steps1.Formulating problem to a proper mathematical form2.Solving the problem graphically/algebraicallyInourdiscussiononward,wewillfirstlearnhowto formulategivenprobleminthestandardform,thenlearn firstitsgraphicalsolutionthenalgebraicsolution.In algebraic solution, we will apply simplex method. Operations ResearchIntroduction to LPPAn example problem in formulated form MaxMaxz=z= 5 5x x1 1+ 7 + 7x x2 2s.t. s.t.x x1 1< < 6 62 2x x1 1+ 3 + 3x x2 2< < 19 19x x1 1++ x x2 2< < 8 8x x1 1> > 0and 0andx x2 2> > 0 0Objective ObjectiveFunction Function Regular Regular Constraints ConstraintsNon Non- -negativity negativityConstraints ConstraintsOperations ResearchIntroduction to LPPExercise on formulating an LPPAtoycompanymanufacturestwotypesofdolls,AandB. Each doll of type B takes twice as long to produce as one of typeA,andthecompanywouldhavetimetomakea maximum of 2000 per day. The supply of plastic is sufficient to produce 1500 dolls per day of A and B combined. Each B typedollrequires fancydress ofwhichthereareonly600 perdayavailable.IfthecompanymakesaprofitofRs3 and Rs 5 on doll A and B respectively, then how many dolls of A and B should be produced per day in order to maximize the total profit. Formulate this problem.Operations ResearchIntroduction to LPPFormulation of LPPIn this problem (and these types of problems) start from last. We are to maximize the profit. So the objective function z will be Maximize zThen two products are dolls of A and B types. So decision variables will be x1 and x2. Now let x1 denotes the number of dolls of type A required for maximize profit zand x2 be dolls for B type.Profit on each doll of A is Rs 3 and that for each doll B is Rs 5 so Max z= 3x1 + 5x2Asx2takestwicetimethanx1andtotaltimeallowedperdaycanproduce2000 dolls so x1 + 2x2 =0, etcOperations ResearchIntroduction to LPPSolution of LPPWewillseehowLPPcanbesolvedaftertheseare formulated.There can be two type of solutions to discuss 1.Graphical solution2. Algebraic mainly simplex methodFirst we shall discuss graphical method to solve LPP.Weadoptan easyapproachherebytakingaroughsketch of graphs manually but in principle correct.Operations ResearchIntroduction to LPPGraphical Solution of LPPThe concept of graph and linear equations.In a graph, we have two axes, axis of x and axis of y.++ (-,+) IInd (+,+) Ist+y O- (-,-) IIIrd (+,-) IVth--..---------- - x ++++++++++The axes can be divided in four quadrants. Any point (x,y) liesinoneofthequadrants.TheoriginO isthepoint having (0,0) coordinates. Any point in four quadrantswill be(x,y),(-x,y),(-x,-y)and(x,-y)infirst,second,thirdand fourth quadrant respectively. Operations ResearchIntroduction to LPPGraphical Solution of LPPThe Suppose an LPP is given in the formulated form.Max(min) z = c1x1+c2x2+cnxns.t.a11x1+a12x2+..a1nxn()b1a21x1+a22x2+..a2nxn()b2am1x1+am2x2+..amnxn()bmwith xis >=0 1.Consider all constraints as equations2.Plot all lines (equations) on the graph3.Indicatepointofintersectionofeverytwolinesintersecting eachotherorthepointofintersectionofalinewithaxisasthe case may be. If you are not using the graphaccurately the solve the two lines algebraically to know point of intersection. 4.Shade the region of every line which is towards the axis (=). Operations ResearchIntroduction to LPPGraphical Solution of LPP5.Aswehavexis>=0,allvalidregionswilllieinthefirstregiongoing towards origin (=)6.Afteralllines(constraints)areplottedandshaded,thecommon region, shaded and surrounded by all lines will give the feasible region. 7.Nowplotobjectivefunctionlinezattheoriginandmoveitparallel away from first quadrant in the +infinity direction. 8.Keepthelinezslidinginthefeasibleregion.Apointwillbereached which is the extreme point in the feasible region. In most of the cases ofmaximum,thisisthefarthestpointfromoriginandforcasesofminimum, this point is the closest to origin. This point is called the point of optimum solution of z.9.Find out the value of z at this point. The point is the solution point with the value of z as calculated there.10.Foraquicksolution,takeallintersectionpointsandshadethecommonregioncalledfeasibleregion.Findoutthecoordinatesofevery cornerpointinthefeasibleregion.Calculatezateachofthesepoints, and finalize the point with maximum(minimum) value of z as the solution point with value of z as calculated there at. Operations ResearchIntroduction to LPPPlotting of linesSuppose a line (or inequality) is given as followsx1+ 4 x2(< = >) 4Then firstforplotting purpose write it asx1/4 +x2/1 (< = >) 1 (i.e. x/a + y/b =1 form)Now plotting becomes easier2-1-|| | |12 3 4(0,0)Theslanted line represents x1+ 4 x2(< = >) 4 or x1/4 +x2/1 (< = >) 1 . The line cuts intercepts 4 from axis x1and +1 from axis x2. This is why we brought the line in the form x1/4 +x2/1 (< = >) 1 Operations ResearchIntroduction to LPPPlotting of linesIf we have lines (or inequality) of the formx1- 4 x2(< = >) 4Then firstforplotting purpose write it asx1/4 +x2/-1 (< = >) 1 (i.e. x/a + y/b =1 form)Now plotting becomes as follows2-1-|| | |12 3 4-1- (0,0)-2-Theslanted line represents x1- 4 x2(< = >) 4 or x1/4 +x2/-1 (< = >) 1 . The line cuts intercepts 4 from axis x1and -1 from axis x2. This is whywe brought the line in the form x1/4 +x2/-1 (< = >) 1 Operations ResearchIntroduction to LPPPlotting of linesSimilarly we can plot lines of othertwo types lying in second (-,+) and third (-,-)quadrants. ThegraphicalsolutiontoseveralLPPproblemshavebeen practiced in classroom. Ply try solved and unsolvedproblems.Operations ResearchIntroduction to LPPGeneral form of LPPThe LPP can be in general one of the following formsMax(min) z = c1x1+c2x2+cnxns.t. the m constraints a11x1+a12x2+..a1nxn()b1a21x1+a22x2+..a2nxn()b2am1x1+am2x2+..amnxn()bmwith xis >=0Slack and Surplus VariablesSlack variable: If a constraint has =20then to make it equality, we need to subtract some non negative term sfromtheconstraint.Thuswehavex1+x2- s=20thensis called a surplus variable.Operations ResearchIntroduction to LPPStandard form of LPPThegeneralformofLPPisgivenpreviously.Thestandardformhas following characteristics Objective function should have only Maximum and NOT Min. So even if we have Min z = c1x1+c2x2+cnxn, we will convert to Max form by Max z = -Min(z) or we can have Max z = -c1x1-c2x2--cnxn, and can write z =-z so Min z = Max zConvertallconstraintstoequalitiesusingslackorsurplus variables so that we have a11x1+a12x2+..a1nxn+ xn+1= b1a21x1+a22x2+..a2nxn+ 0xn+1 + xn+2=b2-(2) am1x1+am2x2+..amnxn+ 0xn+1 + 0xn+2+ xm+n=bmwith all xis >=0 -(3)The objective function will become nowMax z = c1x1+c2x2+cnxn +0xn+1+0xn+2+0xn+m -(1) If any x is unrestricted in sign, convert it to x x where x and x are >=0Operations ResearchIntroduction to LPPMatrix form of LPPThegeneral and standard forms of LPPare given previously. The standard form can be converted to the Matrix form as followsMax z = CXT(transpose of X)subject toAX = b, b >=0 and x >=0Where x = (x1,x2,xn, xn+1,xn+m) c =(c1,c2,..cn,0,0)b= (b1,b2,,bm)And Matrix A =a11a12..a1n1 0 0 1a21a22 ..a2n0 1 0 0..am1 am2 ..amn 0 0 00Studentsareadvisedtoattemptallproblemsrelatedtothe concepts so far and ask the doubts if any.Operations ResearchIntroduction to LPPImportant Definitions of LPPSee the standard form of LPP and equations 1,2,3Solution of LPP: Any set of variables x = (x1,x2,xn, xn+1,xn+m) is called solution of LPP if it satisfies (2) only.Feasible Solution of LPP: Any set of variables x = (x1,x2,xn, xn+1,xn+m) is called feasible solution of LPP if it satisfies (2) as well as (3).Basic solutions and Basic Variable: A solution to (2) is a basic solution ifitisobtainedbysettingnoutofm+nvariablesequalto0andthen solvingforremainingmvariableswiththedeterminantofcoefficientsof these m variables is non zero. Usuallywecallthosevariablesasbasicvariableswhichareusedtoget identity matrix in solving LPP using simplex method.BasicFeasiblesolutions:Abasicsolutionto(2)isabasicfeasible solution if it also satisfies (3).Optimum Basic Feasible solutions: A basic feasible solution which also satisfies (1) is called a Basic Feasible solutions.Unbounded Solution: If the value of objective function z can be increased or decreased infinitely then such a solution is called an unbounded solution.After these definitions, we are ready to start solution of LPP using simplex method.Studentsmusttrysomenumericproblemsbasedonthelectures completed so far.Operations ResearchIntroduction to LPPSolution of LPP problemsThe LPP can have following casesi.When we have purely slack based problems (=)For (i) type problems, simple simplex method can be used. A number of exercises have been completed in class rooms.For(ii)typeproblems,simplexmethodwithtwophaseorbigM method can be used. A number of exercises have been completed inclass rooms.Students must recall definitions of slack, surplus, artificial variables, basicvariablesetcandtheyshouldtrymorenumericproblems based on these problems.Degeneracy in LPPWhilesolvingLPPusingsimplexmethod,sometimeswegetmin Ratio(XB/Xk)sameformorethanonebasicvariable,thenthis problem is called degeneracy. Take few such examples and solve.Operations ResearchDuality inLPPIthasbeendiscoveredthateveryLPPhasbeen associatedwithanotherLPP.OneoftheseLPPis calledPrimewhiletheotherLPPwillbecalledDual. Sometimes,thesolutiontoadualiseasierthanthe primalsoitisbettertoconvertatthattimeprimal into its dual. Primal LPPSuppose following LPP is givenMaxZx =3x1+ 5x2subject tox1=5; and w1,w2,w3>=0Matrix Form of Primal and DualSuppose the matrix for LPP is Operations ResearchDuality inLPPMatrix Form of Primal and DualSuppose the matrix for LPP is Min Zx = Cx (Primal objective function), C RnSubject to AX=cT, C RnWhere w=(w1,w2,..wm) and AT, bT,cTare the transpose of A, Band COperations ResearchDuality inLPPGeneral rules to convert primal into duali.Convert objective function to max form (min z = -min z )ii.Bring all inequalitiesto =can be written as -=and=4anda