Problem managing operators with process flow & 3D Model & parameter

Problem managing operators with process flow & 3D Model & parameter

carmen_fernandez7YE4Y
Participant Participant
364 Views
8 Replies
Message 1 of 9

Problem managing operators with process flow & 3D Model & parameter

carmen_fernandez7YE4Y
Participant
Participant

[ FlexSim 23.0.0 ]

Hello,

I am using the process flow to control the operators as a resource referenced to 3D object. The quantity of this resource can be variable so it is defined by the "OP" parameter (see example: Operators_PF_Parameter_OK.jpg) My problem comes when I set the value of the parameter to 0, because the process flow logic still acquires the operator created in the 3D model and I don't know how to avoid it. Any suggestion to control this particular case?

I have attached a model with an example: Dummy_Operators_PF_Parameters_v01.fsm

Thanks in advance.

0 Likes
Accepted solutions (1)
365 Views
8 Replies
Replies (8)
Message 2 of 9

SebastianCanasV
Collaborator
Collaborator
Accepted solution

Hi @Carmen F ,
I suggest you to use Jason Lightfoot's answer here. With Process Flow you can reference a Dispatcher with the Create Task Sequence activity. With these activities you can also replace Acquire/Release activities.

Hope it helps!

dummy-operators-pf-parameters-v01_SC.fsm

0 Likes
Message 3 of 9

carmen_fernandez7YE4Y
Participant
Participant

Hello @Sebastián Cañas,

Thanks for your answer but I wouldn't want to use a dispatcher because the acquisition of the resource in the real model has a certain complexity and is given by the application of some priority rules that I control through process flow. I have attached a new dummy including this aspect. Dummy_Operators_PF_Parameters_withPriorityRules_v01.fsm

In the example, depending on label "Type" of the item and the values in the global table "Operator_Priority", it is selected the operator profile to be acquired (Example: { 2,1} --> Firstly, it will be looking for OP2 and secondly for OP1). In addition, depending on the schedule, it will choose an operator from one shift or another but it is not relevant at this point.

If the first operator profile requested is not available, it will look for an operator from the second profile and so on. It will go through a loop until it finds a free one. Once the operator is acquired, the task sequence is created.

In the new attached example this logic is working, but I still don't know how to handle the case where the value of the parameter that controls the number of operators in a profile is =0. Example_malfunction_withParameter0.jpgIn this case, no operator of that profile should be acquired.

Any suggestions how to solve it using this approach or using another?

Thanks in advance.

0 Likes
Message 4 of 9

Push your available operators to a list and pull them off using an ORDER BY clause that references the expression:

 puller.orderProfile.indexOf(value.operatorID)

which assumes the puller has an array label containing the operator profile , where the values match those stored on the operators as the label 'operatorID'.

0 Likes
Message 5 of 9

SebastianCanasV
Collaborator
Collaborator

@Carmen F ,

Besides Jason's suggestion, I made a demo model that seems to work! I'll explain the steps I did:

  • Add your operators to an objects group.
  • Reference the Group you'd created as PF Resource.
  • Create the Parameter with the Lower Bound as 0, reference the Group you'd created and select the operation Delete and Copy Group Members in the trigger On Set.
  • Create a Model Triggers OnModelReset. I reuse the code of Set Number in People Group that you find also in the operations of the trigger On Set of the parameters. I made a few changes, set the variable newValue as the parameter you set before and the variable group as the group you'd created.

parameterzero-pf.gif

ParameterOPZero_PF.fsm

0 Likes
Message 6 of 9

carmen_fernandez7YE4Y
Participant
Participant

Hi @Jason Lightfoot ,

I have been working from your idea and I already have the list of operators available for each shift based on the value of each parameter. Attached new dummy: Test_Gestion_Personal_V0_3_withTS_5_PendingPullOperator_3.fsmBut I have problems with the ORDER BY clause that you suggest. I don't know who to use it applying also the comprobation of the shift (T1, T2, T3).

I think It would be solved if pull from Operator List based on the value of "perfil" (profile). For this purpose, I have assign label "QueryLab" before the pull, I have checked that it is working well, but I can't get the pull activity to read it. Could you tell me how to do it? Thank you so much.query-pull-pending.jpg


0 Likes
Message 7 of 9

I added labels to your operators for opID (to give the position in the profiles array) and turno - to match the shift. Instead of pushing tokens to the list I added all operators as the initial entries.

The the pull query is just:

WHERE turno=puller.turno ORDER BY prio ASC

the the thing pulled is the operator.

test-gestion-personal-v0-3-withts-5-pendingpullope_jl.fsm

0 Likes
Message 8 of 9

carmen_fernandez7YE4Y
Participant
Participant
I made some changes to not push operators with quantity =0 and know it works! Thank you very much for your support @Jason Lightfoot , I have learned very useful thing from your tips.
0 Likes
Message 9 of 9

carmen_fernandez7YE4Y
Participant
Participant

Thank you very much for your dummy and the custom code @Sebastián Cañas I have tested your approach in my real model and it works. It will be very useful.

0 Likes