The RL Agent block only supports Normal and Accelerator simulation modes.
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
mehmet bozuyla
am 12 Dez. 2020
Kommentiert: Filip Poloczek
am 9 Dez. 2021
I am working on Reinforcement Learning to control coupled-tank system. I created a simulink environment for Deep Deterministic Policy Gradient (DDPG) agent. When I run the model in normal mode it works well. But when I choose the external mode it gives the below error. Is there any solution to use the DDGP agent in external mode on the Simulink?
The RL Agent block only supports Normal and Accelerator simulation modes.
0 Kommentare
Akzeptierte Antwort
Emmanouil Tzorakoleftherakis
am 13 Dez. 2020
Hi Mehmet,
As I mentioned in the other thread, assuming you want to train your agent in External Model, I believe this is a current limitation as of R2020b. If you want to use a trained agent in External Mode, probably the easiest way is to replace the RL Agent block with a MATLAB Function block that does inference. Inside the MATLAB Fcn block, you can call the function that is generated by generatePolicyFunction.
Hope that helps
7 Kommentare
Filip Poloczek
am 9 Dez. 2021
I tried the solution above and generated the function with generatePolicyFunction.
I use the following code for the matlab function:
function y = fcn(u)
output = evaluatePolicy(u)
y = output
If I try now to use the external mode, I get the following error code:
For deep learning, the simulation target language must be set to C++.
Had you the same problems or do you know a solution for that problem?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Training and Simulation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!