Errors while running adaptive cruise control model from website

I have used the code provided by them but i'm getting the following error.
Error evaluating 'InitFcn' callback of MPC block (mask) 'mpcACCsystem/Adaptive Cruise Control System/MPC'. Callback string is 'impcblock_InitFcn'
Caused by:
  • Can not resolve: mpcobj.

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2020년 4월 24일
It requires the MPC toolbox. Do you have it? run
ver mpc
license inuse

댓글 수: 9

yes, i do have the tool box
MATLAB Version: 9.6.0.1072779 (R2019a)
MATLAB License Number: 192331
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 18362)
Java Version: Java 1.8.0_181-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
Model Predictive Control Toolbox Version 6.3 (R2019a)
control_toolbox
matlab
simulink
The weblink is for R2020a. But I followed it in R2019a. No errors.
oh ok, even i'm using R2019a. Dont know where i'm making mistake
Run "license inuse" after that error to see if you do have the MPC license active.
Re-start MATLAB, try again starting from the addpath() command in the weblink.
The mpc license is not active after the error
so what is the exact output of "license inuse" after that error?
license inuse
control_toolbox
matlab
simulink
Fangjun Jiang
Fangjun Jiang 2020년 4월 24일
편집: Fangjun Jiang 2020년 4월 24일
I think that is the cause of the problem/error. You have the MPC toolbox installed but you couldn't check out a license for MPC. Your license is probably served on a license server. For whatever reason, you couldn't check it out. The code in the callback is trying to create a MPC object. If no error, the "license insue" should return those plus "mpc_toolbox".
Figure out the license issue, license('checkout','mpc_toolbox') and license('test','mpc_toolbox') might be useful.
thank you for your help

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Controller Creation에 대해 자세히 알아보기

제품

릴리스

R2019a

태그

Community Treasure Hunt

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

Start Hunting!

Translated by