minimize
Minimize constrained functions with FMINSEARCH or FMINLBFGS, globally or locally
Author: Rody Oldenhuis

Dear Oldenhuis,
Actually my problem (let it be 3 variable problem) has one linear equality constraint e.g. Aeq =[1 1 1], beq = 200 and also there is lower and upper bound for each variable e.g. lb = [30 40 50] and ub = [80 100 85]. Let x0 = [60 70 80]. Let the function is fn. There is no iequality constraint
I write the optimize statement as follows

sol=optimize(@fn,x0,[],[],Aeq,beq,lb,ub)

But it did not work and the message comes to be

Error using optimize/check_input (line 466)
Given linear constraint vector [b] has incompatible
size with given [x0].

Error in optimize (line 347)
check_input;

Kindly advise.

09 Apr 2013

minimize
Minimize constrained functions with FMINSEARCH or FMINLBFGS, globally or locally
Author: Rody Oldenhuis

@Oldenhuis,
What to do till then. What should be the order of input arguments. Without this facility, this utility cannot be used for constrained optimization. Kindly give your advice.

08 Apr 2013

minimize
Minimize constrained functions with FMINSEARCH or FMINLBFGS, globally or locally
Author: Rody Oldenhuis

Dear Rody Oldenhuis,

When i try to optimize the following fn (with inequality constraints)

rosen = @(x) (1-x(1)).^2 + 105*(x(2)-x(1).^2).^2;

optimize(rosen,[0 0],[],[],[1 1], 1)

I get the error message

Error using optimize/check_input (line 466)
Given linear constraint vector [b] has incompatible
size with given [x0].

Error in optimize (line 347)
check_input;

Why is this so, although i used the example given with optimize.m
Similar is the problem with equality constraints. Kindly spare a little of your precious time to reply

08 Apr 2013

minimize
Minimize constrained functions with FMINSEARCH or FMINLBFGS, globally or locally
Author: Rody Oldenhuis

Please read the first line of my mrssage as

"When i try to optimize the following fn (with inequality constraints)"