I have following question on Non linear optimization that came to my lab exam. I am trying to solve it but it is giving wrong answer.
Following is my objfun.m
function f = objfun(x)
f = 0.6224*x(1)*x(3)*x(4)+(1.7781*x(2)^2.0)*x(3)+(3.1661*x(1)^2.0)*x(4)+(19.84*x(1)^2.0)*x(3);
Following is my confun.m
function [c, ceq] = confun(x)
c = 1296000-(4/3)*pi*(x(3)^3.0)-pi*(x(3)^2.0)*x(4);
ceq = ;
Following is my main file that calls both files
x0 = [0.5,0.5,10.221,11.334];
[x,fval] = fmincon(@objfun,x0,A,b,Aeq,beq,LB,UB,@confun,options);
10.0000 10.0000 6.1875 6.1875
My solution is nowhere nearer to the given answer and the issue lies in initial guess?
On stackoverflow when I put this question which I have now deleted somebody commented that there is typo in question and constraints on x1,x2 and x3,x4 are reversed. I too agree with that as the solution given in position x3 and x4 have far greater values than the one allowed in the constraints.
But sill I am not being able to find the solution?