Resetting S-Function environment for different reinforement learning model

2 vues (au cours des 30 derniers jours)
mlaudu
mlaudu le 10 Fév 2022
Commenté : Musa le 27 Jan 2024
I am trying to design a reinforcement learning controller for my model which is defined by a Simulink S-Function block. My model runs for a small time interval [0 tf] for one computation of the reward function. How can I reset the S-Function block so it runs again from the same initial state as often as possible for training the RL controller? Thanks for your help.

Réponses (1)

Anurag Ojha
Anurag Ojha le 24 Jan 2024
Hello Mlaudu,
You can use the “InitializeConditions” method. The "InitializeConditions" method is used to reset values that need reinitialization each time an enabled subsystem, containing the S-function, is executed.
You can refer to following MATLAB Documentation links to get better understanding
  1 commentaire
Musa
Musa le 27 Jan 2024
Thank you very much. We've since worked out a work-around for the problem.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Simulink Functions dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by