question

Damini C avatar image
0 Likes"
Damini C asked Damini C commented

Reinforcement learning

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


FlexSim 22.1.1
reinforcement learningpython
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

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 0 ·

1 Answer

·
Phil BoBo avatar image
1 Like"
Phil BoBo answered Damini C commented

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.

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Damini C avatar image Damini C commented ·

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 0 ·
Felix Möhlmann avatar image Felix Möhlmann Damini C commented ·

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.

2 Likes 2 ·
1653471833189.png (18.7 KiB)
Damini C avatar image Damini C Felix Möhlmann commented ·
thank you felix Mohlmann!!!

It solved the issue

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.