Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Solving a Diet Problem using the Simplex Method, Study notes of Calculus

Linear ProgrammingSimplex MethodOptimization Techniques

A step-by-step solution to a diet problem using the simplex method. The problem is a standard minimization problem, which is converted to a standard maximization problem to apply the simplex method. How to identify the pivot, make it equal to zero, and make the pivot column values into zeros. The document also discusses the importance of checking for negative values in the objective equation and repeating the procedure until no negative values are present.

What you will learn

  • What is the Simplex Method and how is it used to solve optimization problems?
  • What are the steps involved in applying the Simplex Method to solve an optimization problem?
  • How do you convert a standard minimization problem to a standard maximization problem for the Simplex Method?

Typology: Study notes

2021/2022

Uploaded on 08/05/2022

hal_s95
hal_s95 🇵🇭

4.4

(620)

8.6K documents

1 / 3

Toggle sidebar

Related documents


Partial preview of the text

Download Solving a Diet Problem using the Simplex Method and more Study notes Calculus in PDF only on Docsity! 1     SOLUTION  USING  SIMPLEX  METHOD     If  you  would  like  to  further  talk  about  the  solution  methods  in  the  classroom,  you  could  show  how   to  solve  this  problem  using  simplex  method  as  follows:     In  our  diet  problem,  we  are  looking  at  a  “standard”  minimization  problem.    What  does  the   “standard  minimization”  mean?    It  means  that  the  constraints  are  all  linear;  the  constants  are  non-­‐ negative;  the  inequality  symbols  are  greater  or  equal  to;  the  non-­‐negativity  constraints  are  placed   on  our  variables;  and,  we’re  minimizing.    After  recognizing  that  it’s  a  standard  minimization   problem,  in  order  to  apply  the  simplex  method,  we  need  to  convert  it  to  a  standard  maximization   problem.    To  do  that,  we  will  start  writing  a  matrix,  which  comes  from  the  coefficients  and   constants  of  the  constraints  as  well  as  the  coefficients  and  constant  of  the  objective.       A  =       Then,  we  will  find  the  transpose  of  this  matrix  by  interchanging  its  rows  and  columns.     AT  =       We  can  see  that  the  rows  of  this  matrix  are  the  columns  of  the  first  matrix.    This  new  matrix  is  a   maximization  problem  so  that  the  corresponding  maximization  problem  is:     Maximize  w  =  135.5  y1  +  45.5  y2  +  32.5  y3  +  1,000  y4       subject  to  the  constraints     12  y1  +  3  y2  +  9  y3  +  171  y4  <=      2   33  y1  +  6  y2  +        y3  +  150  y4  <=  1.5     y1  >  0,  y2  >=  0,  y3  >=  0,  and  y4  >=  0       This  formulation  is  called  the  dual  of  the  original  problem.    Since  this  is  the  standard  form  for  a   maximization  problem,  we  can  now  apply  the  simplex  method.    To  do  that,  the  first  step  is  to     Step  1:    Rewrite  the  objective  formula  as  an  equation:    w    -­‐  135.5  y1  –  45.5  y2  –  32.5  y3  -­‐  1,000  y4  =  0.     We  will  call  this  the  objective  equation.         Step  2:    Remove  the  inequalities  from  the  constraints.    To  do  that,  we  will  introduce  two  slack   variables  as  m  and  n  and  add  them  to  the  constraints.    We  will  call  these  the  constraint  equations:   2       w  –  135.5  y1  +  45.5  y2  +  32.5  y3  +  1,000  y4  =  0      objective  equation     12  y1  +  3  y2  +  9  y3  +  171  y4  +  m=      2        constraint  equation   33  y1  +  6  y2  +        y3  +  150  y4  +  n  =  1.5      constraint  equation     Step  3:    Let’s  next  put  all  of  these  in  a  tableau.       RHS  =  right  hand  side     Step  4:    Our  next  step  is  to  identify  the  pivot.    To  do  that,  we  first  find  the  pivot  column.    The  pivot   column  is  the  column  with  the  largest  negative  value  in  the  objective  equation.    Let’s  draw  a  line   with  the  green  marker  around  the  pivot  column.    Next  comes  identifying  the  pivot  row.    This  is  done   by  dividing  the  values  of  the  constraints  by  the  value  in  the  pivot  column.    The  lowest  value  gives   the  pivot  row.    2  divided  by  171  =  0.012;  1.5  divided  by  150  =  0.01.    The  pivot  is  where  the  pivot   column  and  pivot  row  intersect.    Let’s  draw  a  line  around  the  pivot  with  the  red  marker.       Step  5:    We  now  need  to  make  the  pivot  equal  to  zero.    To  do  this,  we  divide  the  pivot  row  by  the   pivot  value.    It’s  best  to  keep  the  values  as  fractions.                     Step  6:    Next  we  need  to  make  the  pivot  column  values  into  zeros.    To  do  this,  we  add  or  subtract   multiples  of  the  pivot  column.  The  pivot  column  value  in  the  other  constraint  will  go  to  zero  if  we   add  -­‐171  times  the  pivot  row.  The  pivot  column  in  the  objective  function  will  go  to  zero  if  we  add   1,000  times  the  pivot  row.    This  then  is  the  first  iteration  of  the  simplex  method.               y1   y2   y3   y4   m   n   w   RHS  values   12   3   9   171   1   0   0   2   33   6   1   150   0   1   0   1.5   -­‐135.5   -­‐45.5   -­‐32.5   -­‐1,000   0   0   1   0   y1   y2   y3   y4   m   n   w   RHS  values   Ratios   12   3   9   171   1   0   0   2   2/171   33   6   1   150   0   1   0   1.5   1.5/150   -­‐135.5   -­‐45.5   -­‐32.5   -­‐1,000   0   0   1   0     y1   y2   y3   y4   m   n   w   RHS  values   12   3   9   171   1   0   0   2   33/150   6/150   1/150   1   0   1/150   0   1.5/150   -­‐135.5   -­‐45.5   -­‐32.5   -­‐1,000   0   0   1   0   y1   y2   y3   y4   m   n   w   RHS  values   -­‐25.6   -­‐3.8   7.9   0   1   -­‐1.1   0   0.3   0.2   0.04   0.007   1   0   0.007   0   0.01   -­‐25.5   -­‐25.5   -­‐29.2   0   0   3.3   1   5  
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved