question

Łukasz E avatar image
0 Likes"
Łukasz E asked Ben Wilson commented

Update Combiner Target Quantity in Process Flow

How to update Combiner Target Quantity in Process Flow?

I want to write a code to update the quantity from My Global Table.

Becuase I update the target quantity on entry to a combiner, when pallet from port 1 enters.


And I want to make the second update in some particular time (when some item.Type enters) in my process flow, so I copied the deafult update combiner target qyantity.

and I changed the object and deleted the if loop.


It is working somehow, but there is a exception

time: 41850.916390 exception: FlexScript exception: Label property Wozek retrieved on /Tools/ProcessFlow/ProcessFlow. Label does not exist. at MODEL:/Tools/ProcessFlow/ProcessFlow/Custom Code~60>variables/codeNode

How to update it correctly?

FlexSim 20.2.3
processflowcombinerflexsim 20.2.3updatecombiner component list
1610704968048.png (38.0 KiB)
1610705055849.png (38.0 KiB)
· 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.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Łukasz E,

We haven't heard back from you. Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond to the previous comment so that we can continue to help you.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question, or you can contact your local FlexSim distributor for phone or email help.

0 Likes 0 ·

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered tannerp commented

The header of a trigger parses the parameter into the source code. You are responsible to do the same in a custom code of a process flow activity. From here on I can only guess, what data you have set as labels at your token.

token.item might be the involved item. Then you translate this into the code as

Object item = token.item;
Then the compiler can identify the label “Wozek“ belonging to the item that is referenced in token.item. This replaces the line 3.
· 4
5 |100000

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

Łukasz E avatar image Łukasz E commented ·

so let's I just want set the Target Value.

I pack my items - let's say I need to pack 10 items (on first entry the combiner updated the value and it is collecting 10 items)

But in my process flow sth happens a new Item was collected Type 88. (already I packed 4 items)

And because of this entrance (Type 88). I just want to set the new target value. for example 6. (and after the last 2 items [4+2]) the combiner should finish collecting.

So how to set this? "Set Target quantity = 6" (instead of this 8 based on a pallet)

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Łukasz E commented ·

That has nothing to do with the error.

the node behind the variable names thelist, thesum are involved in collecting of items. Because you can bring items from more than two input ports into a combiner the table thelist gets updated for each row for input port two, three, four and so on. In total the combiner only counts the items entering him after the container item has entered. This is thesum. The variable nodes behind the pointers are “componentlist“ and “targetcompentsum”. You update the values of those both variables. “Componentlist” is the table of components through the input ports two, three, four,...

And “targetcomponentsum” gets the value of all items you want to collect together at the end. You don’t need to calculate how many you need additionally to the already collected, You updates only the total values to get at the end of collecting.

But you must be absolutely correct that componentlist column sum matches with targetcomponentsum otherwise the processing never starts or there won’t never enter another container item the combiner again.

0 Likes 0 ·
Łukasz E avatar image Łukasz E Joerg Vogel commented ·

But I mean that I can delete the code from the screen. because I thought about it and I wont need it if only I could set the desire new target quantity (eg. 6) and the combiner will be able to finish collecting after 6 items (apart from 8)

0 Likes 0 ·
tannerp avatar image tannerp Łukasz E commented ·

What is the reason behind changing the target quantity? Does it have to do with the size or type of item? If so, you might consider combining items based on a different metric, like size or weight.

For example, instead of starting with a quantity of 10 items and then changing to 6 later, you might consider starting with a target size of 100 cubic feet. Each item would then be allocated a portion of the 100 ft^3 available until another item cannot fit.

This is just an idea - it might not be what you're looking to do, but I thought I'd throw it out there just in case. Hope it helps.

0 Likes 0 ·