필터 지우기
필터 지우기

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,

조회 수: 1 (최근 30일)
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);

답변 (1개)

Himanshu
Himanshu 2024년 6월 5일
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!

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by