question

cjr0020 avatar image
0 Likes"
cjr0020 asked Jason Lightfoot commented

Process time in a processor based on a label on current task executor?

I am relatively new to using FlexSim (I have used Arena in the past) and I have assigned a label in my task executors that are connected to a dispatcher to store a value that I want the processor to use for the process time. I am unsure of what command to use to have the process read the value stored on that label for the task executor that is currently working that processor. all flow items are considered the same, with the process time being dependent on the task executor. Any explanation of how to do this would be greatly appreciated!

FlexSim 23.0.0
labelstaskexecutorprocesstime
5 |100000

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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Jason Lightfoot commented

you use an dispatcher, then you loose any reference to know which operator will arrive. Instead you must customize the tasksequence an operator does. While he is in a transport job, he must adjust a label value (1) in your processor by a tasktype of setnodenum directly or by a message before he unloads an item to the processor. If he has a support job to accomplish he changes the label value (1) at the processor or send a message to the processor before a stop request finish tasktype gets executed. Probably you need a delay task of 0 seconds to let update any settings in engine process execution and then you can allow to resume the rest tasks of involved tasksequence.
(1) Such a label will be set at your processor be read by the processor each time it executes its process time function. Indirectly means the processor on message event [or trigger] evaluates the incoming message to update the processor label to set the process time. Then the message must contain the process time as a message parameter.

operator-sets-process-time.png

Customizing a tasksequence can be done by editing the reference field to choose an operator or activating use transport option and then selecting a custom tasksequence example from picklist option field.
If you don’t find a support example tasksequence you build it on your own from manual description as a utilize tasksequence.

As I remember a utilize tasksequence consists of tasks of type:

  • milestone
  • travel to object
  • stop request finish
  • utilize

You can explore a dispatched utilize tasksequence in activetasksequence node in an operator variable treenode, if he is called for support of a setup or processing action.

Edit: because you want to read a process time value from your operator, you can only do this by evaluating this label value in On Message Event [or trigger] in your operator. By evaluating this event you read the operator procees time label value and set it in a label at your processor, which the processor reads in process time function.
You get the reference to the processor if have set the value as a parameter in this message task. Or you evaluates the ongoing active tasksequence of the operator to explore the station he is traveling to.operator_set_processor_attributes.fsm


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

cjr0020 avatar image cjr0020 commented ·

I am using a normal distribution for each of my operators, and even when I set the label type as Flexscript in both the processor and task executor, it will not read it properly....

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ cjr0020 commented ·
Are you accessing the label by value or using evaluate? Test your expression in a script window first to debug what's happening or post all the information here, or upload your model.
0 Likes 0 ·
Sebastián Cañas avatar image
2 Likes"
Sebastián Cañas answered Sebastián Cañas commented

@cjr0020 ,
Depending on whether you are using a stochastic or deterministic time, you should create in the TaskExecuter a FlexScript Label or a Number Label.

Then you set the Processor's process time using a reference to the operator. You should use the FlexScript's commands regarding Object Labels and it is also recommended that you use the commands for Referencing Objects.

In the demo model I attached, I use the following command in the Process Time's property:

current.inObjects[1].centerObjects[1].outObjects[1].ProcessTime

I will explain this from left to right:

  • current: it's the reference to the Processor
  • current.inObjects[1]: it's the reference to the first object connected to an input port of the Processor. In other words it's the Queue.
  • current.inObjects[1].centerObjects[1]: it's the reference to the first object connected to a central port of the first object of the Processor's input ports. It means it's a reference to the Dispatcher.
  • current.inObjects[1].centerObjects[1].outObjects[1]: it's a reference to the Operator.
  • current.inObjects[1].centerObjects[1].outObjects[1].ProcessTime: it's a reference to the value stored in the Label called "ProcessTime" in the Operator.

Another option is to create a Pointer Label within the Processor that reference the TaskExecuter. For example, if you create a Label named "Operator", you could use the next:

current.Operator.ProcessTime

Finally, you can directly reference the operator's label using the following:

Model.find("Operator").ProcessTime

However, this option is not recommended since you can have problems in case you change the name of the Operator.

Hope it helps!

ReferenceLabel_SC.fsm


· 7
5 |100000

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

cjr0020 avatar image cjr0020 commented ·

Thank you for your explanation! it makes sense when explained step by step as above

0 Likes 0 ·
cjr0020 avatar image cjr0020 commented ·
@Sebastián CañasI have tried doing the first method, but I want the operator to be required to complete the process and when I attempt that, it no longer can find the reference. Do I need to adjust it so that it allows the operator tobe utilized?


0 Likes 0 ·
Sebastián Cañas avatar image Sebastián Cañas cjr0020 commented ·

@cjr0020,

In the demo model I made I was assuming you are using the Task Executer to transport items from the previous station to the processor. If you want the Operator to complete the Process and that same Operator would have the time within a Label, then you should first connect the Operator as a Center Port, so that you could use this syntax in the Process Time property:

current.centerObjects[1].ProcessTime

Assuming you named the label "ProcessTime".
This demo model can show you this.

ReferenceLabel2_SC.fsm

1 Like 1 ·
cjr0020 avatar image cjr0020 Sebastián Cañas commented ·

So this is not possible to do with an executor through a dispatcher? I say that because I have 6 operators I am connecting to one dispatcher and I want all of them to function this way

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.