question

William Proctor avatar image
0 Likes"
William Proctor asked William Proctor commented

Destroy Task Executer/Flow Item on Path Network

I am modeling a railyard. At the end of each day, I want to remove railcars that have been picked up by an outside source (not modeled). To do this, I am looking for railcars sitting in a specific section of the yard and destroying them using the Object.destroy() command. This seems to work, but it appears that the path network positions/nodes once occupied by the destroyed railcars are still thinking that a railcar is present. What would be the correct way to remove these railcars so that this does not happen?

FlexSim 19.0.2
network nodesdestroy objectnode command
· 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.

William Proctor avatar image William Proctor commented ·

I'm wondering if it has to do with the input ports being closed and not reopened when I destroy the object at the node.

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered William Proctor commented

A model consists of different layers of action. You drag and drop a structure of 3D objects into the workspace. You connect a material and data flow to the object. You add logic systems to the objects. You let run the model. This combines the object, the data, the connections, logic systems AND the events of the FlexSim engine. If you destroy objects (items / objects) by a command you don’t destroy the events nor states of them in the running FlexSim engine. You have to find the involved events in the event list and delete them there too. And you have to create events telling the engine the nodes and paths are available. And you have to set the right states in the statistic tree nodes and statistic collectors.

A possible approach is to replicate actions, that removes the rail cars as a regular exit from the model. You can send the rail cars to network nodes by task sequence that preempt and abort all involved task sequences of the car. Then you destroy then. You divert items to sinks. And you build processor logics in process flow for the 3D process flow processor objects, because this object hasn’t got a strict bound to the FlexSim engine as the standard 3D processor. This lets you to interrupt a running processor state more freely and overrule the standard return values. Please attach a model and describe the misbehavior therein, thanks.

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

William Proctor avatar image William Proctor commented ·

Thanks for the advice. I ended up moving it to a track on the edge of the path network and then moving it to a sink (On Continue trigger on the path node). This seemed to fix the issue as the sink cleaned up all of the issues.

0 Likes 0 ·
Claire Krupp avatar image
0 Likes"
Claire Krupp answered William Proctor commented

I have successfully destroyed People and vehicles at a Control Point using the Process Flow "Destroy Object" or "Remove Person" activities. It seems to tidy up all associated events etc cleanly.

(The 3D objects were created by Process Flow in the first place but I'm not sure if that makes a difference.)

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

William Proctor avatar image William Proctor commented ·

Thanks for the thoughts, Claire. If "Plan A" didn't work then this was going to be my next option.

0 Likes 0 ·