Set certain state on the TimeTable, when closing Input?

Set certain state on the TimeTable, when closing Input?

thoams_g
Not applicable
28 Views
3 Replies
Message 1 of 4

Set certain state on the TimeTable, when closing Input?

thoams_g
Not applicable

[ FlexSim 18.1.2 ]

I am desperately trying to set the state of a processor when using the time table. The situation is as following:

According to the shift plan, I want to stop the production and therefore the input. This enables the item still in the processor to be processed. It is important for me to do that, since I am writing down the entering times and exiting times to a global table. If the item is stuck over the weekend, the item stay time in the processor is becoming larger and larger which does not resemble the reality.

The problem with closing the inputport on this scheduled downtime is that the processor is in the idle state, which would then interfere with the dashboard. I would like to set the state to STATE_OFF_SHIFT but I do not know how to do that. Is there any possibility do that with the help of the TimeTable?

Thank you for your help, it is really appreciated.

Future State .fsm

0 Likes
Accepted solutions (1)
29 Views
3 Replies
Replies (3)
Message 2 of 4

sastanin
Advocate
Advocate
Accepted solution

Down function (as any Flexscript trigger) has immediate effects, so

- if you Stop Object, you set the off shift state correctly, but suspend processing and don't unload the item

- if you Stop Input, you can finish processing, but then the object enters the idle state (so the statistics can be off, or the object may even start processing the next item when it is supposed to be down)

To achieve what you want you need to do both, but postpone state change (stop) until the object is empty. Given that it's not immediate, and depends on some other condition in the future, you probably cannot do it in the down function.

Instead you may start a process flow which will wait until the processor can be stopped. Please find atached a simplied model which uses this technique. At t=50 the object is supposed to start its "scheduled down" period, but there's a flow item in the processor.

35934-flexsim-5mylgtnkcr.png

The Down Function is set to do nothing (return a string "do nothing"):

35913-flexsim-6qal8q2utc.png

Instead there's a fixed resource process flow, attached to this Processor, which creates a new token every time Down Function event triggers:
35914-flexsim-m8ynazd30g.png
This process closes input immediately, but delays state changes. It may even skip the downtime completely. Please note how Event-Triggered Source is configured. It filters events, to intercept only those of the current object, and it writes event parameters downstate and downtime as token labels.

P.S. If you haven't deleted the previous post, I would have sent you an answer hours ago. Sorry, don't have time to type all the explanations again. I hope this example is helpful. delayed_stop_example.FlexSim18.1.fsm

P.P.S. In general, if a behavior to be implemented lasts in time, implementing it in Process Flow is usually more straightforward.

Message 3 of 4

thoams_g
Not applicable

Thank you for your answer, I will try it immediately.

I am sorry I deleted my posts from hours ago, but i thought I had a working idea. I implemented it and thought it would work. So I deleted the post to avoid wasting someone's time. However, after a few hours I realised that my approach didn't work and even after several attempts it didn't work so I turned to you.

Message 4 of 4

Ben_WilsonADSK
Community Manager
Community Manager

Hi @Thoams G, was Serge A's answer helpful? If so, please click the red "Accept" button on 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