gini
gini

Reputation: 11

The matlab FMINCON solution terminating at upper bound

I am running an optimisation algorithm using FMINCON SQP to optimise a problem of 8 variables. Following are the parameters:

g = [g1 g2 g3 g4 g5 g6 g7 g8] %my variables
lb = [0 0 0 0 0 0 0 0];
ub = [1 1 1 1 1 1 1 1];

The minimisation of Objective function is defined as:

sse = sum((test results - calculated)).^2; 

subject to linear constraints:

A = [1,1,1,1,1,1,1,1];
b = 1;
ceq = [];

The aim of the optimisation process is to fit a curve as shown in the fig. curve fitting
The blue line represents test results and the magenta is the curve obtained from the optimised variables.

Problem: Although I am able to fit the curve as required, the optimised variables end up with values in the upper bound. I have implemented the following code for fmincon:

options = optimset('Display', 'iter','Algorithm','sqp', 'TolX',1e-10, 'TolFun', 1e-20,'MaxIter', 10000000000,'MaxFunEvals', 10000000000);

[y,fval,exitflag,output] = fmincon('objective', ginit, A,b,[],[],lb,ub,[], options);

Could anybody please advice me about a robust method to overcome this issue of optimisation solution terminating at the upper bound? Could you please also let me know what might be the reason behind this issue?

Upvotes: 1

Views: 282

Answers (1)

Infinity77
Infinity77

Reputation: 1449

Beside the very accurate comment from max, are you positive that you mean this:

sse = sum((test results - calculated).^2);

Instead of this:

sse = sum((test results - calculated)).^2;

?

Upvotes: 0

Related Questions