[R] Linear objective function with Quadratic constraints

Hans W. Borchers hwborchers at googlemail.com
Sat Sep 19 13:04:55 CEST 2009



vikrant S wrote:
> 
> I am new to R and I want to solve this following problem using R.
> 
> My Objective function is a linear function with Quadratic constraints. I
> want to know how to solve this problem and which package will be helpful
> for me for solving such type of problems. Moreover my one constraint is
> linear and equality constraints and another quadratic constraint is
> inequality constraint.
> How to solve this problem ?
> Plz help Me
> 
> Min z = 5 *x1 + 9*x2 + 7.15*x3 + 3.5 *x4
> subject to following constraints.
> x1 + x2 + x3 + x4 = 9
> x1 + x4 <=6.55
> x3(x3 - 3.6) >= 0
> 

Your example is still not precise enough to force you away from linear
programming.

You have to assume lower bounds for the x_i, otherwise their is no minimum.

Say, x_i >= 0, then the quadratic constraint reduces to x3 >= 3.6 and you
are back to applying the simplex algorithm (e.g., the one in lpSolve). 
If your lower bound for x4 is a4 < 0, then solve two linear programs, one
for x4 >= 3.6 and one for a4 <= x4 <= 0.

You can even compute it manually by eliminating  x4 = 9 - x1 - x2 - x3.

--Hans Werner

-- 
View this message in context: http://www.nabble.com/Linear-objective-function-with-Quadratic-constraints-tp25507032p25520587.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list