How to implement reinforcement learning in Dspace using code generation
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Davoud Mokhtari Andani
am 31 Aug. 2023
Kommentiert: Davoud Mokhtari Andani
am 8 Sep. 2023
I have trained a nonlinear model using Reinforcement learning via MATLAB 2022b and now I want to implement the reinforcement learning block in dSPACE using code generation, while the simulink will pop out the error "Code generation does not support importing handle classes from matlab".What should I do to fix this error? Thank you very much. Any suggestions are appreciated.
0 Kommentare
Akzeptierte Antwort
Milan Bansal
am 7 Sep. 2023
Hi,
As per my understanding you are facing an error when implementing Reinforcement Learning (RL) Agent block using code generation.
The Reinforcement Learning Agent block does not support code generation for training. A workaround for this issue is to use Simulink Blocks such as MATLAB function Block or "Predict" block from Deep Learning Toolbox in place of RL Agent Block, which will allow using pre-trained networks including RL Policies in Simulink and supports code generation.
Refer to the MATLAB Answer link below which resolves a similar issue.
However, if the error is due to code generation for MATALB handle class, it is required to have a function that invokes the class.
Refer to the example in the documentation link given below.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Coder 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!