clear allclose allxo=[0.0011,0.0049,0.36]; % assumptions
%nvars=5;
A=[];b=[]; Aeq=[];beq=[];lb=[0.001,0.002,0.01]; %lower bound
ub=[0.01,0.08,0.5]; %upper bound
nonlincon = @(X)constraint_new(X); % calling constraint function
Fitnessfun=@(X)weight_testvariable(X); %calling objective function
options = optimoptions(@fmincon,'Display','iter-detailed','Algorithm','sqp','MaxIterations',1500)[X,fval]=fmincon(Fitnessfun,xo,[],[],[],[],lb,ub,nonlincon,options)
baically i got same value of my intial guess value,not all only 1st and 3rd variables.i know these value depend on constraint and objective function
Best Answer