question

Wu Hung L avatar image
0 Likes"
Wu Hung L asked Wu Hung L commented

Decide Connector By Case using string label

Hi~ I want to use string label to decide which connector,just like this post.

https://answers.flexsim.com/questions/31687/decide-activity-connector-by-case-using-string-lab.html

In my case,I use the same method but it doesn't work... Here is my file,and the picture is my input.

Thanks~

model-1.fsm

FlexSim 18.1.1
decide
1.png (30.2 KiB)
2.png (52.1 KiB)
3.png (23.7 KiB)
4.png (34.1 KiB)
model-1.fsm (93.9 KiB)
5 |100000

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

1 Answer

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Wu Hung L commented

Can you exchange the connector names, in such a spelling that it isn't anymore indifferent to a number or a string. Therefore you add a non-numerical character into your string that doesn't mismatch with a number. Don't use the characters "e, -, +". If the process works then well, you know the problem. The interpreter doesn't distinguish between a number and string, if the value can be both.

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

Wu Hung L avatar image Wu Hung L commented ·

model-1.fsmHi~ I changed the connector names, but the tokens all still went to connector 1 "Send To ST1". Is there any logic error in my prcoess flow? Or is this string can't be distinguished by Flexsim? But this string is tagged by Token.Event to distinguish which event trigger the token.

And here is my file. Thank you !

0 Likes 0 ·
model-1.fsm (87.9 KiB)
1.png (47.2 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Wu Hung L commented ·

change line 6 to

string LabelVal = /** \nToken Label: */nodetomodelpath(getlabel(token,/**/"Event"/**/),1);
0 Likes 0 ·
Wu Hung L avatar image Wu Hung L Jason Lightfoot ♦ commented ·

Thank you!

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.