Results 1 to 2 of 2

Math Help - Solving a system of equations for the maximum whole number values in MATLAB

  1. #1
    Newbie
    Joined
    Feb 2011
    Posts
    6

    Solving a system of equations for the maximum whole number values in MATLAB

    Basically my problem is this:

    a_1*p_1+a_2*p_2+a_3*p_3+a_4*p_4 \le K_1
    b_1*p_1+b_2*p_2+b_3*p_3+b_4*p_4 \le K_2
    c_1*p_1+c_2*p_2+c_3*p_3+c_4*p_4 \le K_3

    where all the a's, b's, and c's are known constant coefficients, the k's are known constants, and the p's are variables.

    I'm also given the equation

    d_1*p_1+d_2*p_2+d_3*p_3+d_4*p_4=total

    Where the d's are known constant coefficients, and total is an unknown constant.

    My objective is to use either a "for" or "while" loop to find the values of p_1, p_2, p_3, p_4 that produce the highest value for "total"

    my initial thoughts were to create a coefficient matrix and a variable matrix multiplied together to get the resultant matrix, then simply divide the resultant matrix by the coefficient matrix to get the values for the variable matrix.
    Obviously, this didn't work. So I come to you MathHelpForum.

    I'm not looking for a final solution (thus the entirely symbolic problem presented). Simply direction on how to proceed. Whether it be a tip on the proper loop structure to use, or how to set up the matrices properly
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Jenkins View Post
    Basically my problem is this:

    a_1*p_1+a_2*p_2+a_3*p_3+a_4*p_4 \le K_1
    b_1*p_1+b_2*p_2+b_3*p_3+b_4*p_4 \le K_2
    c_1*p_1+c_2*p_2+c_3*p_3+c_4*p_4 \le K_3

    where all the a's, b's, and c's are known constant coefficients, the k's are known constants, and the p's are variables.

    I'm also given the equation

    d_1*p_1+d_2*p_2+d_3*p_3+d_4*p_4=total

    Where the d's are known constant coefficients, and total is an unknown constant.

    My objective is to use either a "for" or "while" loop to find the values of p_1, p_2, p_3, p_4 that produce the highest value for "total"

    my initial thoughts were to create a coefficient matrix and a variable matrix multiplied together to get the resultant matrix, then simply divide the resultant matrix by the coefficient matrix to get the values for the variable matrix.
    Obviously, this didn't work. So I come to you MathHelpForum.

    I'm not looking for a final solution (thus the entirely symbolic problem presented). Simply direction on how to proceed. Whether it be a tip on the proper loop structure to use, or how to set up the matrices properly
    This looks so like a linear (integer) programming problem that I can't help but think that is what is lurking somewhere behind this question.

    CB
    Last edited by CaptainBlack; March 3rd 2011 at 09:55 PM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 1
    Last Post: December 11th 2011, 05:22 PM
  2. Replies: 5
    Last Post: August 4th 2011, 03:36 PM
  3. Replies: 5
    Last Post: February 27th 2011, 12:11 PM
  4. Finding maximum r-values of ploar equations
    Posted in the Pre-Calculus Forum
    Replies: 3
    Last Post: May 31st 2009, 08:49 PM
  5. Matlab: Solving linear system with QR/Householder
    Posted in the Math Software Forum
    Replies: 0
    Last Post: September 18th 2007, 03:50 AM

Search Tags


/mathhelpforum @mathhelpforum