question

Dirk Boumans avatar image
0 Likes"
Dirk Boumans asked Steven Hamoen commented

Remove task sequence from global task list

Hi

I would like to know if it's possible to remove a task sequence from a global task list without being executed by a task executer.

What I've done is created a task sequence for emptying a reject by an operator before it's completely full. I've used a queue which can hold maximum 10 flowitems. When the amount increases to 7 items I'll create a token with a create.on event source. With this token I create a task sequence to pick up the flowitems and push the task sequence to a global task list.

If the queue reaches 10 items before the operator empties the queue I stop the machine upstream because the "reject bin" is full. In this case I want to create a new task with a higher priority to empty this bin. If the operator has preformed this task the previous task is obsolete. How can I remove this specific task from the task list.

All items that enter the queue are pushed to a list. For this I use a create token on event en create the token when a flowitems enters the queue. Then the value of the token is pushed to list. This reference is later used for pulling the items from the list in then task sequence.

You can imagine that when the higher priority task has been preformed the items are already pulled from the list and sinked. So when the lower priority task is preformed the operator can't load the already sinked flowitems and the simulation stops.

Does anyone have a solution. I'll try and upload a example model tomorrow for reference.

test-task-priority.fsm

FlexSim 19.1.0
FlexSim 19.1.1
task sequencepriority
5 |100000

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

Steven Hamoen avatar image
1 Like"
Steven Hamoen answered Steven Hamoen commented

@Dirk Boumans

Hello Dirk,

I think this is how I would solve it. I attached the model with the changes but it is kind of a mock up because there are not other tasks for the operator so I wouldn't be able to test it completely. So there is no actual execute tasks and not all fields of the TSlist are filled correctly.

Basically I have a operator process that simply looks for work. So when a task is put on the task list it takes the one with the highest priority and executes it.

For your problem with the queue, I wouldn't take the old task off, but I would just update the priority of that task. I do that by pulling the task of the list but checking the "keep entry on list" option. If it finds the task (could be that the operator has already started it) it updates the priority. To be able to do that I had to make the priority dynamic also.

If you have questions don't hesitate to call me.


Steven (Talumis)

test-task-priority-talumis.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.

Dirk Boumans avatar image Dirk Boumans commented ·

@steven.hamoen

This solutions pointed me in the right direction. However I've one remaining question which I'm certain of someone can answer.

When the queue is full I pull to first task sequence from the list and increase the priority and push it back to the list. This way the operator will select it first. This works in my test model. However in my project I have multiple process flows creating task sequeces pushing them to the same task sequence list because these tasks need to be performed by the same operator. So need to find a way to select the correct task to increase the priority of. I know I can use the WHERE function in the queries but I don't have a value to distinguishes the correct task.

all tokens have a label I've called LineID to point to the correct production line. Is it possible to create a field in my tasksequenceList with that recieves the value from the token label LineID?

I've tried to code it with flexscript, but I'm new to this so I can't figure this out.

0 Likes 0 ·
Steven Hamoen avatar image Steven Hamoen Dirk Boumans commented ·

@Dirk Boumans

Yes it is quite easy to create an extra field on the list. Actually you already did with the priority label. Click the list-> click the advanced button ->click the green plus sign and select label from the list. Then the only think you have to do is enter the name of the label in the field. That way that field will exist in the list and will be filled with the value from the label on the token that is put on the list

0 Likes 0 ·
Joseph Gillespie avatar image
0 Likes"
Joseph Gillespie answered Dirk Boumans commented

@Dirk B3

While it would be possible to pull the low priority task sequences off the list, it wouldn't work as you want it to. The problem is that when creating the low priority task sequences, you are pulling items off of the "rejects" list. If you were to remove the low priority task sequences, the items pulled off of the rejects list to create the low priority task sequences would still be off of the list and it would not be possible for the high priority task sequence to include them.

Instead of using task sequences, another solution would be to use the operator as a resource and have each queue acquire the operator when it is 2/3 full. Here's an updated version of your model with this solution: testtaskpriorityupdated.fsm


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

Dirk Boumans avatar image Dirk Boumans commented ·

@Joseph Gillespie

To be honest, not entirly. But I think it has to do with my lack of explaining the goal I have.

The solution you propose I already have in place in my project. But because the operator has more tasks to perform I want to make use of the priority function. Look at it this way.

The processor checks if a product meets the quality requirements to the product. If not the product is rejected in the queue (a reject bin). When the reject bin is almost full I want the operator to empty the queue. When the queue gets completely full the processor is stopped. Reason for this is, if the next product doesn't meet criteria it can't be rejected. So when the queue is full the complete production line is stopped. Now I want the operator to first empty out this queue before performing another task, so the line can be restarted. Other tasks that I need to add to my simulation is:

  • Testing of quality assurence equipment such as metal detectors, x-ray
  • Loading of raw materials in packaging machines
  • Regular manual product testing.

What I want to achieve is to create tasks with priorities and that operator select tasks based on priority and distance. However with the emptying of a reject bin, I want to give the operator a task sequence when the bin is almost full but not with the highest priority. But when the line is stopped the priority must increase so the line restarts again.

I hope this clearifies and maybe will help to solve the issue.

Regards

Dirk

0 Likes 0 ·