Error using ==> feval Undefined function or method 'obj_fcn_power' for input arguments of type 'double'.Caused by:Failure in initial user-supplied objective function evaluation.FMINCON cannot continue

  • Follow


Hello,

I have to run an optimization using the function fmincon with 'interior-point' as optimization algorithm.
I want to provide the algorithm with analytic gradients and Hessians (using Symbolic Math Toolbox like in: http://www.mathworks.com/help/toolbox/optim/ug/brn4nh7.html#brv_i_1) to make the algorithm converge more rapidly.

But when I start the simulation I get the following messages:

Warning: Function 'diff' is not verified to be a valid MATLAB function.
[generate::CFunverified]
Warning: Function 'diff' is not verified to be a valid MATLAB function.
[generate::CFunverified]
                                  .
                                  .
                                  .
                           many times
and also:
??? Error using ==> feval
Undefined function or method 'obj_fcn_power' for input arguments of
type 'double'.

Error in ==> fmincon at 583
      [initVals.f,initVals.g(:)] = feval(funfcn{3},X,varargin{:});

Error in ==> constrained_optim at 198
    angoli =
    fmincon(@obj_fcn_power,starting_point,[],[],[],[],lim_inf,lim_sup,@vincolo_nl,opzioni);
    
Caused by:
    Failure in initial user-supplied objective function evaluation.
    FMINCON cannot continue.

I tried also to verify the initial value of my objective function:
>> obj_fcn_power(fase_classico)
and the result is:
??? Error using ==> diff
Difference order N must be a positive integer scalar.

Error in ==> potenza_ver2 at 34
t24 = diff(t16,x1);

Anyway the initial value of the non-linear constraints are correct:
>> vincolo_nl_ver2(fase_classico)

ans =

   -0.4000


Could someone help me?
Thank you very much.
Cheers
Giovanni
0
Reply gion_81 12/21/2010 10:32:09 AM


0 Replies
383 Views

(page loaded in 0.014 seconds)

Similiar Articles:




7/21/2012 5:33:06 AM


Reply: