Results 1 to 4 of 4

Math Help - help with LINGO issue solving a linear programming problem

  1. #1
    Newbie
    Joined
    May 2010
    Posts
    2

    help with LINGO issue solving a linear programming problem

    Hello,

    I'm trying to solve a linear programming problem using LINGO software. The textbook gives the answers in the back, so I know I have the below constraints right, but when I enter them into LINGO and solve, I don't get the right answers. The answers should be: X1 = 500, X2 = 300, X3 = 200. Cost: 550. Can anyone point out what I've done/entered wrong?

    Max 0.50x1 + .70x2 + .45x3
    s.t.
    10x2 - 15x3 >= 0
    6x1 + 8x2 - 5x3 >= 0
    x1 <= 500
    x2 <= 600
    x3 <= 400
    x1 + x2 + x3 = 1000
    x1, x2, x3 >= 0

    I entered this problem in LINGO like this:

    ! MAXIMIZE PROFIT;
    MAX = 0.50*X1 + 0.70*X2 + 0.45*X3;
    !MATERIAL CONSTRAINT 1;
    X1 + X2 + X3 = 1000;
    !MATERIAL CONSTRAINT 2;
    X1 <= 500;
    !MATERIAL CONSTRAINT 3;
    X2 <= 600;
    !MATERIAL CONSTRAINT 4;
    X3 <= 400;
    !MATERIAL CONSTRAINT 5;
    10*X2 - 15*X3 >= 0;
    !MATERIAL CONSTRAINT 6;
    6*X1 + 8*X2 - 5*X3 >= 0;
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,110
    Thanks
    68
    Never used LINGO, plus not interested in learning it!

    I ran it in Ubasic: 500:300:200 = 550 is correct as MINIMUM expense.

    IF program assumes MAXIMUM revenue, then 400:600:0 = 620.

    Perhaps your LINGO assumed this?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,110
    Thanks
    68
    In case you want to "see" the program in UBASIC:
    (using a,b,c instead of x1,x2,x3)

    FOR a = 0 to 500
    FOR b = 0 to 600
    c = 1000 - a - b
    IF c>400 or c<0 THEN NEXT b
    IF 10*b - 15*c < 0 OR 6*a + 8*b - 5*c < 0 THEN NEXT b

    m = .5*a + .7*b + .45*c
    [store m if lowest so far]

    NEXT b
    NEXT a
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    May 2010
    Posts
    2
    Thank you for the response. You resolved my issue! The textbook says this is a Maximization problem, but after I entered it as a minimization problem, I came up with the correct solution. This must be a textbook error.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 4
    Last Post: October 28th 2009, 03:31 PM
  2. Solving Linear Programming:
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: July 6th 2009, 02:32 AM
  3. Linear Programming Problem again
    Posted in the Advanced Math Topics Forum
    Replies: 0
    Last Post: June 3rd 2009, 04:39 PM
  4. solving a linear programming problem
    Posted in the Math Topics Forum
    Replies: 3
    Last Post: March 29th 2009, 01:34 PM
  5. solving this problem in linear programming
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: October 3rd 2008, 05:58 PM

Search Tags


/mathhelpforum @mathhelpforum