Shapes disappear on reset model

Shapes disappear on reset model

stephanie_lombard
Not applicable
22 Views
3 Replies
Message 1 of 4

Shapes disappear on reset model

stephanie_lombard
Not applicable

[ FlexSim 16.2.0 ]

hc-try-1.fsm

Hi,

I am building a model regarding a health care facility within Flex sim 16.2.0. The model is mostly controlled through process flow. I have built a patient arriving, going to reception and waiting for a doctor in the waiting room. I now wish to simulate a customer going for an x ray by acquiring the X ray technician to "load" a shape (that represents a wheelchair) and a patient from the doctor's office. The shape and the patient is then taken to the X ray queue where a delay time represents the time it takes to complete the x ray. Thereafter the X ray technician loads the shape and the patient once again, takes the patient to the exit and returns the wheelchair to the wheelchairs queue. During the first run everything works fine. When I reset and run a second time, the shapes (representative of wheelchairs) disappear (from the 3 D model and from the group).

I have looked at the answer for the question "Why are 3 D shapes disappearing?" on https://answers.flexsim.com/questions/25013/why-are-3 d-shapes-disappearing.html , this seems to work up until a certain stage. If I stop the model while the X ray technician returns the wheelchair (shape) to the wheelchairs queue and reset, one of the wheelchairs disappear and eventually the other one disappears as well.

I have attached the model where I attempted to resolve the problem by using the suggested move and change visual activities as explained in "Why are 3 D shapes disappearing?" on https://answers.flexsim.com/questions/25013/why-are-3d-shapes-disappearing.html

Please advise

Stephanie Lombard

Accepted solutions (1)
23 Views
3 Replies
Replies (3)
Message 2 of 4

joerg_vogel_HsH
Mentor
Mentor

Maybe it is not the shape that disappear. It is the item with the shape that is deleted. If the item or object isn't inside a container object that destroys regularly items on reset, maybe you can switch off the destroy flag of the object/item.

switch_destroyonreset(obj,0); // obj = pointer to the object or item 

Hint of classic Flexsim

0 Likes
Message 3 of 4

stephanie_lombard
Not applicable

Thank you Jorg, that makes sense.

0 Likes
Message 4 of 4

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

Task Executers, including Operators, destroy any flow items they're carrying on reset. They do this by looping through everything they're carrying and destroying any objects that have an itemtype node. Your shapes aren't flowitems so they shouldn't be destroyed, but if you look at them in the tree they both have an itemtype node.

2826-itemtype.png

This itemtype node is being added by the XRay queue when you unload the wheelchair into the Queue. The queue thinks you put a flowitem into it and makes sure it has an itemtype node so it can store information under it.

2827-unload.png

So to fix your problem, I would delete the itemtype node on your shapes and then change your process flow by replacing the Unload Wheelchair activity with a Move Object activity where you move the wheelchair into the model and not the Queue. You'll probably have to add an activity to reposition the wheelchair so it's next to the queue.



Matthew Gillespie
FlexSim Software Developer