question

Hsi-Chuan Chen avatar image
0 Likes"
Hsi-Chuan Chen asked Sam Stubbs commented

About different process time and moving distance

Dear Flexsim help,

I have some questions as follows:

  • 1.How to change the Processor1’s process time if different operators are randomly called by Dispatcher1 from the processor1. For example, if operator1 operate the processor1, the process time will be 10. If the operator2 operate the processor1, the process time will be 100. If the operator3 operate the processor1, the process time will be 1000.
  • 2.What is the travel distance of operator1, operator2, and operator3 after the model runs for 28800 seconds?
  • 3.How to get the total and average moving distances of flowitems, containers, and taskexecutorflowitems in other general models?

Sincerely,

Hsi-Chuan Chen, [email protected]

differentprocesstime.fsm question-layout.jpg

FlexSim 16.2.2
process time and moving distances
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 Sam Stubbs commented

@Hsi-Chuan Chen

1. If you do it within the 3D environment check out this post: referencing current operator But if you would model it with process flow it is a lot simpler

2. select the operator and look at the statistics within the quick properties. There is a total travel statistic there

3. Flowitems and containers don't keep track of distance because they move from fixed resource to fixed resource instantly. You can put a label on them and increase that label every time it leaves an operator. Every taskexecuter has a "totaltraveldist" variable that you can query so onload you query the current value and on unload the new value, subtract and add the difference to a label. The same goes for the taskexecuterflowitem. You can write the totaltraveldistance to a table when it enters the sink.


forumpic.png (12.6 KiB)
· 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.

Hsi-Chuan Chen avatar image Hsi-Chuan Chen commented ·

Thanks to steven.hamoen's reply but I still have a question:

How to get the taskexecuterflowitem's variable, "totaltraveldist", in the fixed resource? I tried to use the onEntry trigger but don't know how to get the value of "totaltraveldist". There is an error in my code as shown in the attached picture.

error2.jpg

0 Likes 0 ·
error2.jpg (494.9 KiB)
Sam Stubbs avatar image Sam Stubbs ♦ Hsi-Chuan Chen commented ·

'getitemvar(item,"totaltraveldist") wont work on Flowitems as Hamoen said. Flowitems don't have a totaltraveldist variable, so calling that on the item won't work. (Also the last parameter in the getitemvar() command is looking for a number not a string.) You'll need to set a label on the item each time the item is picked up or dropped off that increments that value. Then you'd use the command 'getlabel(item,"labelName")'.

If you're trying to get a reference to the taskexecuter, then as Hamoen stated, this course of logic is much easier to model within Process Flow.

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.