question

easyman avatar image
0 Likes"
easyman asked Joerg Vogel edited

How to set action parameters in send to port/port by case

In reinforcement learning, I aim to train the minimum setting time of a line using three actions.

●Action 1: Setting the action parameter in "Send to Port" from the output of P3.

●Action 2: Setting the action parameter in "Port by Case" from the input of P4.

●Action 3: Setting the action parameter in "Send to Port" from the output of P4.

However, it does not work according to the action parameters conveyed by the reinforcement learning algorithm.

I would like to inquire if there is a separate method for configuring it accordingly.

action.pngTestModel.fsm

FlexSim 24.1.0
reinforcement learningparameters
action.png (105.3 KiB)
testmodel.fsm (34.6 KiB)
· 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.

easyman avatar image easyman commented ·

Item Type is 1~5

Action means choose the line and minimum setup time
However it actions only B3

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel commented

You replace numerical values in port edit fields by labels, then you can change those labels while a model runs.

· 2
5 |100000

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

easyman avatar image easyman commented ·

@Joerg Vogel Is it possible show how to set labels in send to port???


0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel easyman commented ·
@easyman, you do not set labels in send to port. You set them up , in Quick Properties pane of objects, by template in Process Flow or Trigger. And then you use them to get evaluated instead of a number value in Edit field of Port !!! You can use instead of labels also Parameters, which you setup in Toolbox.
0 Likes 0 ·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Joerg Vogel edited

There are numerous error messages in your model that you should not be ignoring. The label name of P5 and P6 is wrong, so the code that sets the observation parameters fails and stops when it reaches the respective lines that would set those values. The observation parameters also do not currently allow to take on the value 0, which should probably be the reset value for all of the labels, since the processors start empty.

The main issue is caused by a bug in the current version though. The Decision Events are not correctly linked, so they never fire.

You can fix this by removing the spaces in the event names in the attribute tree of the RL tool.

1711353407298.png

testmodel_1.fsm


1711353407298.png (33.0 KiB)
testmodel-1.fsm (72.0 KiB)
· 2
5 |100000

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

easyman avatar image easyman commented ·
How to see the tree structure in flexsim??
0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel easyman commented ·

@easyman,
img-0569.jpeg
Tree or Tree View is an Icon in top menu bar. It is a feature of licensed version of FlexSim. An express licensed version misses this feature.

0 Likes 0 ·
img-0569.jpeg (51.9 KiB)