Linear Programming - Shadow Price, Slack/Surplus calculations

Поділитися
Вставка
  • Опубліковано 2 сер 2016
  • This video shows how to solve the following problem.
    Min Z = 5x1 + x2
    s.t.
    2x1 + x2 ≥ 6
    X1 + x2 ≥ 4
    2x1 + 10x2 ≥ 20
    X1, x2 ≥ 0
    a) Graphically solve the linear programming problem and determine the optimal solution.
    b) What is the objective function value?
    c) Calculate slack/surplus for each constraint.
    d) If the RHS of Constraint #1 increases by 1, by how much would the OFV change?
    e) If the RHS of Constraint #2 increases by 2, by how much would the OFV change?
    f) Suppose x1 and x2 are required to be integers, what will the optimal solution be?

КОМЕНТАРІ • 87

  • @nemesbence2002
    @nemesbence2002 3 роки тому +58

    these five minutes were more useful than half a semester of lectures. Cheers, man!

    • @lazarusmonkeymansoutdoorad2170
      @lazarusmonkeymansoutdoorad2170 2 роки тому +4

      You're not lying.... (currently studying for midterm with a horrible [but nice] instructor, and this 5min video was worth two entire weeks of lectures.)

    • @PunmasterSTP
      @PunmasterSTP 2 роки тому

      @@lazarusmonkeymansoutdoorad2170 I'm just curious; how did the midterm and the rest of the class go?

    • @PunmasterSTP
      @PunmasterSTP 2 роки тому

      I'm just curious; how did the rest of your semester go?

  • @connorferguson8832
    @connorferguson8832 4 роки тому +11

    Great format for the video, quick and to the point, and explaining exactly what needed to be said. Thanks!

  • @PunmasterSTP
    @PunmasterSTP 2 роки тому +1

    This was incredible; you explained so many concepts so clearly! I've been looking for videos like these for a long time, and I'm so glad that I finally came across one.

  • @estefaniac8260
    @estefaniac8260 5 років тому +5

    Thank you so much for your video. I loved how you used this graphic explanation to illustrate shadow prices. You totally saved me.

  • @tymothylim6550
    @tymothylim6550 3 роки тому +2

    Thank you very much for this video, Joshua! I really enjoyed the use of visuals! I learnt what shadow price means as well!

  • @dextarndumia2395
    @dextarndumia2395 4 роки тому +2

    You're the best man.... These tutorials have saved me a lot of hustle

  • @VivekGupta-vh8ti
    @VivekGupta-vh8ti Рік тому

    The best video till date on Linear Programming. Thank you very much

  • @mernadiaa99
    @mernadiaa99 8 місяців тому +1

    Thank you !!!! you explained half of a semester to me !!!!!!

  • @mgmailggmail6431
    @mgmailggmail6431 7 років тому +2

    love this guy already

  • @ZenoDiac
    @ZenoDiac Рік тому

    Amazing. I can see you put a lot of work into making this video. It's very clear and concise. Well done!

  • @sallytan5632
    @sallytan5632 7 років тому +2

    This is very helpful, thanks.

  • @jay0shinigami
    @jay0shinigami 7 років тому +2

    thx man i like ur videos
    they are really ease to understand

  • @GMornat
    @GMornat 7 років тому +1

    Whoah Thanks a lot it helped me to easily calculate Slack and Shadow Prices easily

  • @donjr3270
    @donjr3270 6 років тому +2

    Phew it was fast, had to pause and try to absorb it in. All the same, great video - helps a lot!

  • @camilaparola2781
    @camilaparola2781 5 років тому

    Thanks, this helped me a lot!

  • @elektrokitttv9279
    @elektrokitttv9279 5 років тому +27

    you saved my grade

  • @BASIET
    @BASIET 4 роки тому +1

    hi, thanks for the great video. but just found an error in the table at 1:24. the co-ordinates in row 3 are swopped around.

  • @luisfernandogarcia4916
    @luisfernandogarcia4916 4 роки тому

    Very good video man, congrats

  • @Gijserddd
    @Gijserddd 5 років тому

    Thanks, Great video!

  • @OniiChanBest
    @OniiChanBest 7 років тому +8

    hello, for finding the shadow price for constraint 2, how did you derive with x1=0?

    • @joshemman
      @joshemman  7 років тому +8

      x1 ≥ 0 is a binding constraint. Note that the optimal solution occurs at the intersection of x1=0 and 2x1+x2=6.

  • @Saksham916
    @Saksham916 5 років тому +1

    COOL EXPLANATION WAS AWESOME

  • @mauroacunacaliso2358
    @mauroacunacaliso2358 5 років тому

    Very insightful thanks

  • @Novana16
    @Novana16 4 роки тому +1

    read some sheet 4 times of my professor than watched this , thanks man

  • @hunchingshang492
    @hunchingshang492 6 років тому

    thanks bro, helps a lot.

  • @luckydubey3219
    @luckydubey3219 6 років тому

    Thanks it helped me a lot

  • @GodIsEverPowerful
    @GodIsEverPowerful 4 місяці тому

    What's the physical significance of SP is equal to 1 ? at the end?
    What is the impact of non binding on SP at the end?

  • @neon1300
    @neon1300 6 років тому +7

    Hi Joshua, thanks for the vid. I still don't understand the part of finding shadow prices. Why the constraint x1>=0 was ignored? If the constraint became x1>=1, the optimal solution certainly will change as x1>= 0 is a binding constraint.

    • @davidlanday2647
      @davidlanday2647 Рік тому +1

      It's a good question. These are bound constraints on your decision variables x1 and x2 and I believe the reason why you would or wouldn't adjust your bound constraints in practice will depend on the context of the problem you are solving. The video doesn't give a specific context to the problem it tries to solve, but I tried to add some below that I hope helps explain why context might matter when investigating shadow prices.
      In the video problem, let's say you grow apples(x1) and oranges(x2) on your farm, and you are trying to minimize the cost of growing each (z), where the coefficients 5 and 1 are your associated grow costs for apples and oranges respectively. Now, let's say your 3 linear constraints are the productions at your three other grow stations and they are costing you a certain amount (or more) throughout the grow season (this can vary hence the >= signs). You can see that as far as analysis of shadow prices goes, it makes sense to try adjusting these because it can tell you how much you could gain by making your production more energy efficient at the other stations.
      whereas, if you are deciding how many apples(x1) or oranges(x2) to grow based on energy costs, it does not make sense to adjust your bound constraints because you don't want to assume that you need to grow a certain amount of one or the other, and it will be up to the model to tell you how much of each you should grow in the context of energy costs (it just suffices to say that you can't have negative number of apples or oranges i.e: x1>=0, x2>=0 because that wouldn't make sense). When you adjust your lower bounds on x1 you are saying your station needs to produce a certain amount and maybe that is a requirement based on demand for apples or oranges at your farm, but probably it doesn't make sense to impose that assumption. Notice that your objective only changes when x1>=1 or x2>=6 and changing x1 will result in a new binding constraint, essentially changing the fundamental question you are trying to answer in the first place.
      I hope my example helps / is somewhat clear.

  • @jackli3989
    @jackli3989 7 років тому +11

    For the shadowing price part, I think you have to tell for more specific(seperate each step more clearly)

    • @jackli3989
      @jackli3989 7 років тому +3

      And don't speak too fast

    • @jackli3989
      @jackli3989 7 років тому +1

      When you explain the shadowing price, you should always have a feasible line along as well

    • @joshemman
      @joshemman  7 років тому +4

      Please see if this one clearer:
      ua-cam.com/video/4hp0mJgzmgc/v-deo.html

    • @swaathykumaran1903
      @swaathykumaran1903 4 роки тому +3

      @@joshemman yes it's clear there

  • @lf24-87
    @lf24-87 Рік тому +1

    Amazing lecture

  • @nadiapranabudi1749
    @nadiapranabudi1749 3 роки тому +1

    wow thank you so much

  • @moniruzzamanmonir6189
    @moniruzzamanmonir6189 11 місяців тому

    take a bunch of thanks from Bangladesh

  • @raiyanrahman2926
    @raiyanrahman2926 3 роки тому

    in max LP, what is relation between shadow price and dual price?

  • @GodIsEverPowerful
    @GodIsEverPowerful 4 місяці тому

    What about binding constraint x1=0 ?
    if RHS increases by 1?

  • @misganawmekonnen57
    @misganawmekonnen57 2 роки тому +1

    very great expression

  • @nirajvyas9997
    @nirajvyas9997 6 років тому +3

    Thanks
    Please give me your Divine blessings

  • @amandeepsingh6139
    @amandeepsingh6139 7 років тому +2

    What is difference between canonical & standard forms of LPP? Please provide canonical form of LPP video.
    Thanks for all videos of LPP. You explain very good in all videos.

  • @10.j.c
    @10.j.c 7 років тому +1

    may I know where does s1, s2 & s3 come from? at 01:46
    please kindly reply and explain thanks

    • @joshemman
      @joshemman  7 років тому +1

      s1, s2, & s3 are used to represent slack/surplus variables.

  • @NotSoFat
    @NotSoFat 7 років тому +1

    u are godsend

  • @mahirdheendsa9282
    @mahirdheendsa9282 7 років тому +1

    Thanks Brother

  • @abdulrhmanaleid3072
    @abdulrhmanaleid3072 7 років тому +1

    Greeting, i would like to have the same problem to be solved with MAXIMIZE objective. Do you have one? thanks

    • @joshemman
      @joshemman  7 років тому

      If you solve this as a Maximization problem, the solution will be unbounded. Please a maximization example here: ua-cam.com/video/0TD9EQcheZM/v-deo.html

  • @user-cs3bo4xk6m
    @user-cs3bo4xk6m 9 місяців тому +1

    very educative mister

    • @joshemman
      @joshemman  9 місяців тому

      Nice to hear, Abdul. Thanks for dropping a note.

  • @winnieooko
    @winnieooko 6 років тому

    Hello while doing my calculation on point 3 on the graph X1=2.5 and X2=1.5 when i do the calculation for Z=14 that is what i get ,am i doing it wrongly kindly clarify?

    • @joshemman
      @joshemman  6 років тому

      1:23. You're right Z = 14 at point 3. I incorrectly used (1.5, 2.5) in my calculation.

  • @lanciauxrayzimba
    @lanciauxrayzimba 3 роки тому

    how do you use this on matlab?

  • @bettys7298
    @bettys7298 6 років тому

    Hi @Joshua Emmanuel. Thanks for sharing. I have a question for question (d). Why can the question be interpreted into x1=0 but not x2=0? Thanks!!

  • @azizalimov6417
    @azizalimov6417 3 роки тому

    what if we are only given the final matrix but not the original constraints

  • @muathalrumayh4392
    @muathalrumayh4392 7 років тому +1

    شكرا

  • @aronize
    @aronize 4 роки тому

    Hi, what happens if I get a negative slack variable? What does this say about the shadow price of the constraint?

    • @joshemman
      @joshemman  4 роки тому

      You shouldn't get a negative slack value. Slack & Surplus values must be non-negative.

  • @farooqshah1137
    @farooqshah1137 5 років тому

    according to your definition for calculation of shadow price we have to simultaneously solve a binding constraint with a one for which we want to find shadow price. So if i solve constraint #1(it is a binding) with x1+x2=5 then we have x1=1 and x2=4 which yields z=9 and then SP2=9-6=3.
    and when you solved x1=0 and x1+x2=5 then SP2=-1. so why this happens?

    • @joshemman
      @joshemman  5 років тому

      It happens because the regions between Constraint #1 and #2 are not in the feasible region. The regions are bounded by [(0, 4), (0, 6), and (2,2)] and [(3,0), (2,2) and (4, 0)].

  • @sathanasaetiao8219
    @sathanasaetiao8219 3 роки тому +1

    What if there's 3 variables, How can I solve for the shadow price?

    • @joshemman
      @joshemman  3 роки тому +1

      You can use software or simplex method.

  • @fitriawulandariramlan552
    @fitriawulandariramlan552 Рік тому +3

    Hi, I think for the point 3, x1=2.5 and x1=1.5, so in the minutes 1:23, 5(2.5) + 1.5 = 14

    • @joshemman
      @joshemman  Рік тому

      You are very correct. I somehow swapped x and y.

  • @gaurangasaikia2584
    @gaurangasaikia2584 6 років тому +1

    Thank you so much Sir... It cleared many of my doubts... One question Sir.. On finding dual price should we subtract optimum value from (RHS+1) always or we can do (Optimum value - (RHS+1)) also..

    • @joshemman
      @joshemman  6 років тому +1

      I calculated shadow price here. In Minimization problems, Dual Price is the negative of Shadow Price. So if you want dual price, yes, your latter formula is correct in a Min problem.

    • @gaurangasaikia2584
      @gaurangasaikia2584 6 років тому +1

      Okay.. Thank you Sir.

  • @maxxpro4
    @maxxpro4 5 років тому

    way better than my class

  • @chayangupta9897
    @chayangupta9897 4 роки тому

    thank you sir but how to identify binding or non binding constraint?

    • @joshemman
      @joshemman  4 роки тому

      A binding constraint has a zero slack/surplus. A non-binding constraint has a positive slack/surplus.

  • @zabrinanuramalia4693
    @zabrinanuramalia4693 2 роки тому

    in 1:54, where did you get the optimal solution values X1=0, X2=6, Z=6?

    • @joshemman
      @joshemman  2 роки тому

      Hi Zabrina, How to get the solution is not shown in this video. You can solve it manually or use software as shown in videos below:
      ua-cam.com/video/ziVlZrTmtI4/v-deo.html
      ua-cam.com/video/Acz1TewvMqY/v-deo.html

    • @zabrinanuramalia4693
      @zabrinanuramalia4693 2 роки тому

      @@joshemman aah thank you!

  • @manfyegoh
    @manfyegoh 4 роки тому +1

    ur x1 and x2 is wrong for point 3

  • @nazaryoussef1185
    @nazaryoussef1185 5 років тому

    3rd point should be (2.5,1.5)

  • @davidotniel2643
    @davidotniel2643 10 днів тому

    wowwwwwwwwwwwwwwwwwwwwwwwwwwwwwww thkssssssssssssssssssssssssssyouuuuuuuuuuuuuu

  • @Novana16
    @Novana16 4 роки тому +1

    read some sheet 4 times of my professor than watched this , thanks man

  • @Novana16
    @Novana16 4 роки тому +1

    read some sheet 4 times of my professor than watched this , thanks man