举报
comicking
well the one i talked about is basically trial and error. take all constraints as equation, and solve for all corner points, then plug them in and compare the value of objective func. ur teacher wont like that though its easy to understand and efficient enough in simple problems. one generally used method to solve optimization (not restricted to linear problem) is to find out the stationary point of Lagrange function. http://en.wikipedia.org/wiki/Lagrange_multiplier let c1,c2,c3 be slack variables and l1, l2, l3 be the L-multiplier of the 3 constraints (usually lambda is used for mutiplier but hard to type here so i used l), respectively, the lagrange func L is L(x,y, c1, c2, c3, l1,l2,l3) = 8x+5y+l1(x+c1-150)+l2(y+c2-200)+l3(x*2+y+c3-400) solve the system: dL/dx = 0, dL/dy=0, dL/dc1=0, dL/dc2=0, dL/dc3=0, dL/dl1=0, dL/dl2=0, dL/dl3=0. where dL/dx means the partial derivative of L w.r.t. x.