I am running on R 3.0. I have a quadratic function like:
2*x[1]*x[1] -5 * x[1] + 8 * x[2] * x[2] - 7*x[3]*x[2] -5 * x[3] * x[3]..
The function has various quadratic terms and has some linear constraints such as:
1 <= x[1] <= 7
-2 <= x[2] <= 9
0 <= x[3] <= 32
Additionally,
x[1]+ x[2]+ x[3] = 100
Which package in R should I look at to solve this kind of an optimization problem? It is a large equation with many inequalities and I am running R 3.0.Can some thing like:
x[1]+ x[2]+ x[3] = 100
be done with optim?
I am somehow not able to figure out how to pass parameters to constrOptim or solve.QP in quadprog.