フィルターのクリア

How to solve the run error when using the reinforcement learning toolbox with carsim s-function?

31 ビュー (過去 30 日間)

Hello I am having a problem with the Reinforment learning toolbox whil running the Sumulink model with Carsim S-function when I run the matlab file that calls the simulnk model to start the training process of RL-agent, the simulation stops showing the error attached in the photo. P.S: the model without the RL agent block runs pretty fine and the dll file is detected.

  4 件のコメント
hu Sam
hu Sam 2023 年 11 月 28 日
Hi Mohamed, have you figured out the problem? I have the same problem
Mohamed Abdullah
Mohamed Abdullah 2023 年 11 月 28 日
編集済み: Mohamed Abdullah 2023 年 11 月 28 日
Hi ,what version of Matlab and Carsim do you use? the solution is to change the versions (R2023b and Carsim 2019 work fine).it looks like Carsim 2017 is not compatible with RL in Matlab . try to change to a recent version.

サインインしてコメントする。

採用された回答

Yatharth
Yatharth 2023 年 9 月 18 日
Hi Mohamed,
I understand that while running the Simulink model with CarSim S-function the RL agent block causes the simulation to stop and you are getting the error "A run cannot be made because there is no vehicle solver DLL file" but without the RL agent block your model runs fine.
RL Agent block activates 'Fast Restart' in a model and it seems that CarSim does not support "Fast Restart" in a model.
You can try
>> set_param(modelName, 'FastRestart', 'off')
I would also like to specify that CarSim is not developed by MathWorks, and hence you could also contact CarSim company to request technical support if the problem continues.
I hope this helps
  2 件のコメント
zhouhang
zhouhang 2023 年 9 月 19 日
Hi Yatharth,
Thank you for your help.
At first, I guess it might be a software version issue, so I have tried CarSim2019/2020 with MATLAB2020a/2022a. The Crash always happen. After serveral try I have found a phenomenon that if I did not set any import ports in CarSim(still have output ports), just put it in a simple MATLAB DDPG routine, it can be "Fast Restart" and trained without error.
But if I set import ports in CarSim and repeat the above operation, after the first train episode, MATLAB crashed directly. So there may be a problem between Matlab and CarSim import ports.
Mohamed Abdullah
Mohamed Abdullah 2023 年 9 月 19 日
編集済み: Mohamed Abdullah 2023 年 9 月 19 日
Hi Yatharth, I have tried your method regarding turning off fast restart but it didn't work out.
My carsim version is 2017 and Matlab 2022a.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by