question

Visakh Sakulan avatar image
0 Likes"
Visakh Sakulan asked Visakh Sakulan edited

How to set(or change) state in fluid processor?

state-fluid-processor.fsm

In the model attached, when the fluid processor becomes empty, I want to set the state of the processor as CHANGE_OVER for 60 sec. I have given a custom code to do the same but the state reverts back to empty immediately.

How do I solve this problem

FlexSim 16.2.1
custom codestatesfluid processor
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

·
Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered Visakh Sakulan edited

Your issue is that the default logic of FlexSim sets states. So while your code is setting the state, the default FlexSim code is running its algorithms and setting the state as well.

A couple of things you could try. Try setting the state via a Delayed message sent in 0 time. That would give the processor time to finish its code, before trying to set the state through your own custom code. The problem here, is that other events within the model might also change the state again based on the default code of FlexSim.

Alternatively you can create custom states on objects and get statistics on them. Here's a related article on how to do that:

https://answers.flexsim.com/questions/26312/add-custom-state-to-a-state-gantt-chart.html#answer-26329

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

Visakh Sakulan avatar image Visakh Sakulan commented ·

@Sam Stubbs , I have added the custom state table from multiprocessor, in this table should I mention all the states for fluid processor or just the custom state

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.