Borrar filtros
Borrar filtros

Error using barrier Objective function is undefined at initial point. Fmincon cannot continue.Error in Calibration (line 161) [x, fval ] = fmincon(GGG, x0, A, b, Aeq, beq, lb,

2 visualizaciones (últimos 30 días)
Hello,
Please can someone help me solve this issue. I keep getting the below error. Attached also is my matlab codes.
Thanks,
Celestine.
>> Calibration
Error using barrier
Objective function is undefined at initial point. Fmincon cannot continue.
Error in fmincon (line 861)
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA,GRAD,HESSIAN] =
barrier(funfcn,X,A,B,Aeq,Beq,l,u,confcn,options.HessFcn, ...
Error in Calibration (line 161)
[x, fval ] = fmincon(GGG, x0, A, b, Aeq, beq, lb, ub, nonlcon, opts);

Respuestas (1)

Himanshu
Himanshu el 5 de Jun. de 2024
Hey Celestine,
I tried running your code and along with the error messages mentoined by you I also encountered some other errors, one of which being
Unrecognized function or variable 'GEsolve'.
This indicates that you have not defined the 'GEsolve' function. This function is critical for your calibration process, as it seems to be used to calculate the sum of squares of some residuals or differences between model predictions and observed data, which 'fmincon' then minimizes. So make sure this function is implemented and in the current MATLAB path.
Once that is done, to debug the remaining errors, you will have to:
  • verify that all data inputs (GO_agg, VA, T, fd, etc.) are loaded correctly and have the expected dimensions and values.
  • ensure that the initial guesses respect any constraints on the parameters. In your code, you've defined lower bounds (lb) as all elements being tol and upper bounds (ub) as all elements being inf. These bounds might need adjustment based on the nature of your problem.
Hope this helps!

Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by