Errors while running adaptive cruise control model from website
显示 更早的评论
I an trying to run Adaptive Cruise control model from https://www.mathworks.com/help/mpc/ug/adaptive-cruise-control-using-model-predictive-controller.html
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.
采纳的回答
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
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 的更多信息
标签
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
