question

XinLiang S avatar image
0 Likes"
XinLiang S asked XinLiang S commented

How to get used process time during processing with breakdowns?

It is ok to use time()-getentrytime(current.first) to get used process time.

But if the model with breakdowns, it does not work fine.

How can I get used time during processing?

Command like: getProcessTime(current.first).qa.fsm

FlexSim 18.2.2
process time
qa.png (38.0 KiB)
qa.fsm (187.9 KiB)
· 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.

tannerp avatar image tannerp commented ·

Hi @XinLiang S,

I'm not sure what you're trying to do, but I have a couple of concerns/questions.

1) What are you referring to by "used process time"? Is that the time the item takes to process? Or is it something different?

2) This may not be the right kind of trigger for this. It doesn't seem like you are drawing anything, but you're using an On Draw trigger.

3) You should use "Model.time" and not "time()" on line 8 of your code.

Hopefully you can explain a bit more of what you're looking for so we can help you.

0 Likes 0 ·
XinLiang S avatar image XinLiang S tannerp commented ·

Thanks for your comment.

1) Used process time: How much process time has been used for current flow item.

2) I need to trigger On Message event to duplicate an item to output during process based on some calculation. Not sure if any other reasonable way to trigger it.

The purpose is to simulation a cutting process, which is to input 1 coil and output many bundle of items (with delay(cycle time) between output). So, Separator is not applicable.

There is an saw mill simulation example using multi-processor. But in my project, the number of bundles vary according to parameters(Bundles Output = ProcessTime / CycleTime).

So, I make the demo to simulate. It do output 1 bundle after delay(cycle time)(##here I need to know how much process time has been used for current flow item##), till (ProcessTime/CycleTime) bundles finish output.

0 Likes 0 ·
XinLiang S avatar image XinLiang S tannerp commented ·

Hi Tanner Poulton,

I have used MultiProcessor for the simulation of cutting.

But another problem is that 2 items are loaded after first flow item finished, other than one. Seems that the closeinput(current) does not work fine as expected.

0 Likes 0 ·
test.png (55.1 KiB)

1 Answer

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered XinLiang S commented

As long as you use the Function Process Time inside the properties of the processor class, you have to set the process time as a return value in this funktion. You can compute this return value, store the value at the item as a label value, and finally return this value in this function. The FlexSim engine will use this return value to hold the item at the processor in the state processing. It is up to you to evaluate the item labels values to get what you want. Perhaps you can transfer the item label value OnExit to a tracked variable and use it in your statistics.

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

XinLiang S avatar image XinLiang S commented ·

Thanks for your reply.

I try to use MultiProcessor for the cutting simulation.

0 Likes 0 ·