Non-linear optimization with fmincon

1 Ansicht (letzte 30 Tage)
juan pf
juan pf am 25 Mär. 2014
Bearbeitet: juan pf am 25 Mär. 2014
Hi
I am solving a nonlinear convex optimization problem. The problem has equality nonlinear constraints. I also have non-negativity constraints. For some reason Matlab does not respect the non negativity constraints and finds an optimum in negative numbers. I have no idea why it does this.
Thanks in advance!
Juan
problem.x0 =x0;
problem.objective =@(x)objfun(x);
problem.nonlcon =@(x)confuneq(x,b1d,b1f,M1,z,g);
problem.solver ='fmincon';
problem.options =optimset('Display','iter-detailed');
problem.lb =[0.1 0.1 0.1 0.1];
problem.ub =[1000 1000 0.9 0.9];

Akzeptierte Antwort

Alan Weiss
Alan Weiss am 25 Mär. 2014
Please show us your options and your call to fmincon and the resulting output. If you are using the interior-point or sqp algorithms, then fmincon strictly obeys bounds, and unless your problem is 5-dimensional or higher, all your solution components should be above 0.1.
Alan Weiss
MATLAB mathematical toolbox documentation

Weitere Antworten (1)

juan pf
juan pf am 25 Mär. 2014
Bearbeitet: juan pf am 25 Mär. 2014
Thank you very much for your answer -- now works! The options are below.
x0=[0.5 0.5 0.5];
problem.x0 =x0; problem.objective =@(x)objfun(x); problem.nonlcon =@(x)confuneq(x,b1d,b1f,M1,z,g); problem.Algorithm = 'sqp'; problem.solver ='fmincon'; problem.options =optimset('Display','iter-detailed'); problem.lb =[0.1 0.1 0.1]; problem.ub =[2 20 0.9];
tic; [x,fval]=fmincon(problem); time=toc;

Kategorien

Mehr zu Nonlinear Optimization finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by