question

George AY2 avatar image
0 Likes"
George AY2 asked George AY2 commented

Process Time Changes According to Timetable

cusersgabiyoundesktoptest.fsm

Hello guys,

I've been trying to solve this problem for a while now, and I know it's probably easy. However, I'm fairly new to Flexsim and need your help.

I would like my processor/combiner to change its process time and go through breakdowns according to a pre-defined timetable imported from Excel. What I've attempted in the attached model is to set a timetable of states in the breakdowns tab for the processor and coded its process time to change according to what state the processor is in at a certain period in time. However, no matter what the state the processor is in, it seems to not process anything. Any help on this?

Thanks a lot for your proposals and ideas :)

George

FlexSim 18.0.2
process timedynamic process timestate-dependent process tie
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

·
Steven Hamoen avatar image
0 Likes"
Steven Hamoen answered George AY2 commented

@George AY2 Hi George, have you used the debugger to step through your code? To me it looks that does exactly what it should do. The fact that it looks like it is not doing anything is due to the fact that when your item leaves, the next one is immediately placed on the same position. If you look at the statistics (upper part of quick properties) you will see that products leave the combiner and enter the sink, so the model is working. If you would use a processor you will see the item moving during process time so that would help you here.

· 5
5 |100000

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

George AY2 avatar image George AY2 commented ·

Hello Steve,

Thank you for your prompt answer.

Yes I have. If you watch the statistic for the first 120 seconds, the duration during which the timetable assigns the states (see Capture), Input and Output are 0 all throughout. After that, given that the timetable no longer controls the states, the combiner returns to its "normal state", and starts processing the items.cusersgabiyoundesktopcapture.png.

N.B: State 37 is "available" and 1 is "idle", exactly what the code snippet assigns process times for.

0 Likes 0 ·
Steven Hamoen avatar image Steven Hamoen George AY2 commented ·

@George AY2 If you look at your timetable you see that the downfunction (that is the functions that is fired if the table encounters a time) states "Stop object" This means that the object doesn't do anything, all events are delayed infinitely and no in- and output is possible. You have defined 3 down periods all sequential. Because the first 1 finishes after 60 sec an item is let in but immediately you bring the combiner down again so again nothing happens.

So you could change the downfunction and remove the stop object but you still have a problem because you set the state of the combiner, but the logic of the combiner itself also sets the states and this will overwrite the states you set. It would be better if you use a userevent. Put the times you want to change something in a table and use the userevent to run through the table. Everytime something has to change set a label and then in the processtime look at that label to determine what time to use

0 Likes 0 ·
George AY2 avatar image George AY2 Steven Hamoen commented ·

Thanks again!

Everything you said makes sense and worked out up until using userevent.

Could you kindly be more specific on how to do so? For example, what type of table do you mean when you said "putting the time you want to change something in a table"? If it's not a hassle, maybe editing and reattaching the model I posted would be greatly appreciated!

0 Likes 0 ·
Show more comments

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.