question

Óscar Manuel CMN avatar image
0 Likes"
Óscar Manuel CMN asked Óscar Manuel CMN commented

An invalid task has been encountered

Good Morning.

The model is a job shop where the destination of the items depends on the "JobType" label. In addition, operators have to collect orders by ordering them according to their change times. I get the following error message:


I have an Assign labels: Destination and there seems to be a chance that I won't create a destination on any occasion, and that's what's going wrong. I don't see when that can't work.

The intention of this Assign labels is to go through the items in the queue observing the setup time they would have in their corresponding destination, and in this way choose the destination that provides a lower SetupTime value.

SIMSET-WHN1-SQ-k2_1_autosave.fsm

FlexSim 20.0.6
process flowflexsim 20.0.6
5 |100000

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

José Antonio MD avatar image
0 Likes"
José Antonio MD answered Óscar Manuel CMN commented

Hello @Óscar Manuel CMN,

In my opinion, the problem is in the activity "Assign labels".

Using the loop you look for all items in the queue, but some are already assigned to an operator who is walking or loading an item.

Therefore, it is possible to assign a destination from one piece to another and that's why problems arise.

You should make sure not to recalculate the items that are already assigned.

In any case, I think it is always good to do a check like the one proposed by Benjamin.

I hope I've helped.

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

Óscar Manuel CMN avatar image Óscar Manuel CMN commented ·

Finally I have chosen to apply the logic that had the position of assigning labels, inside the pull from list, and now it does not give an error.

SIMSET-WHN1-SQ-k2_1.fsm

0 Likes 0 ·
Benjamin W2 avatar image
0 Likes"
Benjamin W2 answered Óscar Manuel CMN commented

In your "Assigned Labels" custom code, you are trying to reference the label "destination" on a flow item in the 3d model. That label will sometimes have a value of NULL. Please see the picture:


1592405909527.png (414.8 KiB)
· 8
5 |100000

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

Óscar Manuel CMN avatar image Óscar Manuel CMN commented ·

Yes, but the question is why sometimes it gives a NULL value, because in the Assign labels, I think I contemplate all the possibilities.

0 Likes 0 ·
Benjamin W2 avatar image Benjamin W2 Óscar Manuel CMN commented ·

Where do you assign the "destination" label to the flow-item? Are you assigning it as an object or text? In your Assign Labels custom code, you reference "token.PulledQueue.as(Object).subnodes[i].destination.TipoTrabajoAnterior". You need to make sure the "destination" label on the flow-item is a pointer to an object. Sometimes this field is NULL.

0 Likes 0 ·
Óscar Manuel CMN avatar image Óscar Manuel CMN Benjamin W2 commented ·

How do I do that? I not really understand

0 Likes 0 ·
Show more comments