Error in Server after Assembler

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
WUR
Posts: 21
Joined: Monday 10 June, 2013 - 14:14

Error in Server after Assembler

Post by WUR »

Dear ED Community,

My model is working quit well, only at the end there is a strange error.
I ask ED in a server after an assembler to put all the product with Label([visual quality at retail], i) < 6.0 to Channel 1, otherwise Channel 2. But it seems that ED puts everything in the Queue at Channel 1. If I then ask Tools --> View atom labels I see that the Label 'visual quality at retail' is above 6.0, but the product is still in Channel 1.

Could this occur due to the rules I set in the Assembler?

Kind regards,
WU R.
Attachments
Working 24-07.mod
(122.32 KiB) Downloaded 338 times
BartC
Posts: 47
Joined: Monday 05 November, 2012 - 17:05

Re: Error in Server after Assembler

Post by BartC »

Hello WU R,

First of all, on the SendTo statement, there is no involved atom, so your atom pointer "i" does refer to another/none existing atom. Instead, use other referrals e.g. first(c) to refer to the first product in the server.

Secondly, I can see that you set the Label([visual quality at retail], i) on the input trigger of the second channel of the assembler and that you let the assembler pack the products. This means that your label is written to the product in the other product arriving via input channel 1. So at your quality check server, the SendTo statement must be like this:

Code: Select all

If(
  Label([visual quality at retail], first(first(c))) < 6.00,
  1,
  2
)
Regards,

Bart
WUR
Posts: 21
Joined: Monday 10 June, 2013 - 14:14

Re: Error in Server after Assembler

Post by WUR »

Thanks a lot! It works :)
I also add an Unpacker to split the products from each other.

Now I have only one question left, about experimentation.
I want from the atoms: food loss before retail, food loss at retail and sold products the average value of the label representing the quality of all products that are in the queues.
However, when I'm entering the following:
Label([visual quality at retail],cs) it does not provide any information (0,0000) in the results.

How does this work?

In the attachment the model with the experimentation wizard.

KR,
Attachments
Working 25-07.mod
(113.96 KiB) Downloaded 318 times
BartC
Posts: 47
Joined: Monday 05 November, 2012 - 17:05

Re: Error in Server after Assembler

Post by BartC »

Hello WU R,

The label "visual quality at retail" is set on your products and not on your monitored atom(s) e.g. Sold Products. To solve your issue I wrote some 4DScript on the entry trigger of the Sold Products atom to copy the label of the product to the Sold Product atom and at the same time average it. Now you can use Label([visual quality at retail],cs) as a parameter in the experiment wizard (see the attached model).

I only did it for the Sold products atom, you have to do this yourself for the Food loss before retail and food loss at retail atom.

Regards,

Bart
Attachments
Working 25-07_Modified.mod
(117.47 KiB) Downloaded 303 times
Post Reply