Errror: Undefined function 'getActionInfo' for input arguments of type 'struct'.
Afficher commentaires plus anciens
Hi
This would work previously. I now get an error when I try to test a RL agent. Is this an issue of data-type expected?
I have provided the error message as well as the properties of the agent Action and Observation objects.
Error message -> Undefined function 'getActionInfo' for input arguments of type 'struct'.
Agent and Observation objects:
>> DDPG_agent.agent.getActionInfo
rlNumericSpec with properties:
LowerLimit: 0
UpperLimit: 100
Name: [0×0 string]
Description: [0×0 string]
Dimension: [1 1]
DataType: "double"
>> DDPG_agent.agent.getObservationInfo
rlNumericSpec with properties:
LowerLimit: [3×1 double]
UpperLimit: [3×1 double]
Name: "observations"
Description: "controlled flow, error, integral of error"
Dimension: [3 1]
DataType: "double"
2 commentaires
Rajesh Siraskar
le 13 Sep 2021
Modifié(e) : Rajesh Siraskar
le 13 Sep 2021
Emmanouil Tzorakoleftherakis
le 13 Sep 2021
Where is the error in the code above? I don't see an error when you call getActionInfo. Can you attach a mat file with the required variables to reproduce this? Also, which release are you using?
Réponses (2)
Rajesh Siraskar
le 22 Sep 2021
1 commentaire
Emmanouil Tzorakoleftherakis
le 22 Sep 2021
thanks. It is hard to pinpoint the error without a reproduction model, but it seems like you are using a struct somewhere you are not supposed to. Can you doublecheck?
Rajesh Siraskar
le 23 Sep 2021
1 commentaire
Emmanouil Tzorakoleftherakis
le 23 Sep 2021
A couple of suggestions:
1) Make sure DDPG_agent.agent and PPO_agent.agent are the actual agent objects and not structs
2) In the Simulink model, make sure to change the 'Agent object' field in the RL Agent block to be PPO_agent.agent or DDPG_agent.agent as needed (I suspect you may have forgotten to do this)
Catégories
En savoir plus sur Environments dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
