question

Patricia_brenny R avatar image
1 Like"
Patricia_brenny R asked Patricia_brenny R commented

Unpacking and Packing machine, objects ID might cause bug. What to do?

Hi there!

I`m creating a couple of machines that inherit from the processor and do a couple of things:

Receive a tote with boxes inside, processes these individual boxes and packs them back up on the same tote. This has worked well when careful to send the inside boxes to the machine overriding the onSend trigger.

However the problem rises from these other two behaviors:

1- Receive a tote with boxes inside, process these boxes and release them, without packing them.

2- Receive a couple of single boxes, process them and pack them in a tote.

These behaviors of packing and unpacking are absolutely necessary for the machines I`ve been asked to develop, and I realise they act like combiners and separators, but mostly as processors for they also just process and release when necessary, which is why I chose that inheritance.

I believe that when releasing these objects that came in with an ID and either got erased or created out of nowhere, I`m skipping over some handshakes from the machines ports. I`d like a workaround on that, or at least some insight into how these handshakes work so I can develop in a way that respects thembut also preserves the behaviors I have created.

FlexSim 22.2.0
module sdkdevelopmentc++dll c++
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·
Would you be willing to place a separator, processor and then combiner and treat it all as one machine? You can change the visual of the separator and combiner in order to make it look more like one machine.
0 Likes 0 ·

1 Answer

·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Patricia_brenny R commented

You are right about creation of nowhere and deleting items in a processor. But the mechanism is just your model event list. A processor creates on entry or for items in transit events for your model event list. You want to override such events, then do this from a more basic start. Please build your own processor from a basic fixed resource object. And in cases where you have to delete items rather than sending them to a sink, erase all involved events coupled to such items from the event list.

There are existing commands to work with events described in a section of command reference. I would watch a model event list to identify and copy the sequence of events when an item is created in a source or deleted in a sink and compare this with already taken place events of your customized object.

EDIT: please observe the event log tool, too.

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

Patricia_brenny R avatar image Patricia_brenny R commented ·
Thank you so much I'll definitely try this out
0 Likes 0 ·

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.