Hi, I'm trying to build a model where an upstream queue (Q3) receives multiple items of multiple consignment IDs. Downstream queues(Q4,Q5) when empty, receive all items of one particular consignment form Q3. As soon as a complete consignment enters Q5, Q5 closes input. Q5 opens input again when it's empty. It works perfectly, (though I appreciate if someone can suggest me a better way.) Problem is with a label (input flag) which I'm setting 0->1 in senddelaymessage(Q5,0,Q5) for the last item of consignment exiting Q5, and changing 1->0 in OnEntry of last item of consignment entering, it is not getting updated. My own logs portray that OnEntry is executed before OnMsg, hence the problem. But Flexsim Event logs depict events in true order. What am I missing?
- using itemtype as an consignment ID for simplicity
- Items have a label for total_quantity in that consingment.
- Items are created consignment wise, so no issue of ranking.
- FRSTATE is changed as per consignment in Q3.
- Input port is closed/opened in OnMsg(Exit)/OnEntry