Page 1 of 1

Reading labels with the assembler

Posted: Monday 30 April, 2018 - 10:33
by Maaike8
Hello,

I am currently modeling a situation of a food bank and I have a question about the assembler I am using. The food bank has to make 2000 crates each week and for these crates they need at least 12000 products. For this model I have incoming food donations that contain a label 'products on pallet', that tells how much products a specific donation contains. I want my assembler to select products based on the number of 'products on pallet' and not the products separately. So, when the order says that 12000 products are needed for a specific week, the assembler needs to count the 'products on pallet' for specific products until there are 12000 or more.
I hope this is a clear problem; is there someone who can help me with this?

Kind regards,
Maaike

Re: Reading labels with the assembler

Posted: Monday 30 April, 2018 - 11:23
by Gerben
Hi Maaike,

I see two solutions for your problem:
a) Model donations as pallets that you unpack, your assembler then uses the count of unpacked items.
b) Create your own variant of an assembler, that uses an other counting mechanism.

For option b), you may want to take a look at the 4dScript at Assembler->OnEntered. The last bit of code shows under which conditions the assembler packs the products.

Gerben

Re: Reading labels with the assembler

Posted: Monday 30 April, 2018 - 11:42
by Maaike8
Hi Gerben,

Thanks for your quick response. Only thing is that I am not very experienced with ED yet, so can you explain a bit more how to model donations as pallets that need to be unpacked?

Regards, Maaike

Re: Reading labels with the assembler

Posted: Monday 30 April, 2018 - 12:21
by Gerben
You can create a source that creates a container with 'x' products inside, instead of creating a label 'products on pallet' with value 'x'.
You can then use a splitter or unpacker to use these individual products.

Gerben

Re: Reading labels with the assembler

Posted: Tuesday 01 May, 2018 - 09:56
by Maaike8
Ok, I created a container with products on it. I used the unpacker to get separate products again, but how can I let the assembler know that the separate products that were in the container before still belong together? So, if the assembler decides to get one of those products, he needs to take them all, because it was one donation and they still belong together.