Reinforcement learning

Reinforcement learning

damini_c
Not applicable
23 Views
5 Replies
Message 1 of 6

Reinforcement learning

damini_c
Not applicable

[ FlexSim 22.1.1 ]

Hi

I am trying to simulate model with AI using reinforcement learning. I am following your tutorial of flexsim 2022 (https://docs.flexsim.com/en/22.1/ModelLogic/ReinforcementLearning/Training/Training.html) . But I am facing issue in python It cant able to fetch observation data. It did not update further value.

whatsapp-image-2022-05-23-at-10950-pm.jpeg


please help me to solve this problem


0 Likes
Accepted solutions (1)
24 Views
5 Replies
Replies (5)
Message 2 of 6

philboboADSK
Autodesk
Autodesk
Accepted solution

Please post your ChangeovertimesRL.fsm file. We cannot tell what is wrong from just a screenshot of the python output.

Without more information, my best guess for what is wrong is that (1) you skipped step 2.16 where you check the Pull box, (2) you skipped step 3.26 where you configure a decision event, or (3) you have a stop time that is causing your model to not run. But we can't tell you for sure what is wrong without seeing the model.

If the model doesn't get to a decision event to send another observation and request another action, then the python script will be stuck waiting for that to happen.



Phil BoBo
Sr. Manager, Software Development
Message 3 of 6

damini_c
Not applicable

thank you Phil bobo for giving some time to answer.

sorry i didn't give proper information

ChangeoverTimesRL.fsm this is fsm file which i am using for reinforcement learning. . chaingeovertimesrl.png


the above picture when flexsim_env python script run and simulation module start running

I check flexsim module again at step 2.16 and 3.26 possibility of where i can skip step. i did this step . But i didn't understand about stop Time which you said where should i check this stop

Actually my laptop run slowly. is that reason python script will stuck to get observation message?

please help me to solve this problem



0 Likes
Message 4 of 6

moehlmann_fe
Observer
Observer

In the reward function, you mistyped 'sink1' instead of 'Sink1' (which is causing the error message you are seeing in the system console).

1653471833189.png

As FlexSim can't calculate/fetch the reward value, this likely means nothing is returned to the python script.

Message 5 of 6

Jeanette_Fullmer
Community Manager
Community Manager

Hi @Damini C, was Phil BoBo's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes
Message 6 of 6

damini_c
Not applicable
thank you felix Mohlmann!!!

It solved the issue

0 Likes