question

Manuel Sinco avatar image
0 Likes"
Manuel Sinco asked Matt Long answered

Create token each time Operator goes to Scheduled Down or Idle State

Hello,

I have a Process Flow Fixed Resource for my operators, all of them are attached objects to it. So I want to create a token each time the operator goes to Schedule Down or Idle States.

I used an Event-Triggered Source to create my tokens my Object is current (Operators attached) and for the event, I'm using OnStateChange and a value "scheduled down" match value (picture [1]) or OnStateValueChange Change Rule = 12 (picture [2]).

[1]

[2]

On neither of both way it works, so I want to know if I made a mistake or there is another way to do it. I know that I can select the Time Table directly and create them OnDown, but I have different Time Tables and the operators may be assigned to different ones, so that's why I want to create them based on each operator.

Thanks.

Manuel.

FlexSim 19.1.0
flexsim 19.1.0token creation
· 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.

Matt Long avatar image Matt Long commented ·

We've been having issues with answers not uploading attachments/images properly. Can you try reuploading those pictures?

In a simple test case using either OnStateChange or OnStateValueChange I'm able to have the Event-Triggered Source create tokens and match a given state.

0 Likes 0 ·
image1.png (13.8 KiB)
image2.png (12.0 KiB)
Manuel Sinco avatar image Manuel Sinco Matt Long commented ·

Sure @Matt Long, let me reupload them here.

[1]

[2]

Now I have ran it with the 1st image instead of "scheduled down" to 12 but I'm getting this error.

time: 0.000000 exception: Error: Event-Triggered Source activity "On Schedule Down" in "Assembler" attempted to override the return value but a Finish activity was not hit or did not specify a Return Value.

0 Likes 0 ·

1 Answer

·
Matt Long avatar image
2 Likes"
Matt Long answered

You have checked Will Override Return Value for the OnStateChange event. Uncheck that and that exception will stop.Your OnStateValueChange looks fine. Can you upload your model and I can take a look at what's going on?

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

Manuel Sinco avatar image Manuel Sinco commented ·

Thank you @Matt Long it worked in the way I wanted. I used the OnStateChange with the Override value unchecked and worked properly. 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.