question

Ssu Ying C avatar image
0 Likes"
Ssu Ying C asked tannerp commented

Set item type base on the input time and output time

How can I set the item type base on the input time and output time?

Box input sequence is box1, box2, box3...

When the larger numbers are output earlier than smaller numbers then set smaller number as type 2 and others are type 1(i.e. if box7 output time is earlier than box6, then set box6 as type 2 and box7 as type 1)

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

Sam Stubbs avatar image Sam Stubbs ♦ commented ·

I'm not sure I understand the logic of what it is you're trying to do? Could you explain in greater detail what you're trying to accomplish with the item types? There might be a better way to track and handle it.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Sam Stubbs ♦ commented ·

@Sam Stubbs, you geht such scenarios, if a queue previous to a processor is set to LIFO sometimes.

1 Like 1 ·

1 Answer

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

Each object can be referenced as a pointer in the tree. The object must be casted into a treenode class. This reference can you convert into a number. Every new item gets a higher number as such a reference than the previous one. You store the number in a label at the processor. If the number of the exiting item is smaller than the stored number of a previous item then this item gets the type value 2. You change the stored number in the label when the exiting number is greater than the stored value (a) or you set the label value on each exiting item (b).

This logic is built by the OnExit event for Process Flow or in the OnExit trigger of the processor properties in 3D-model.

Sequence example 1,2,5,3,4,6

(a) Type 1: 1,2,5 Type 2: 3,4 Type 1: 6

(b) Type 1: 1,2,5 Type 2: 3 Type 1: 4,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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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