question

Stephanie Lombard avatar image
1 Like"
Stephanie Lombard asked Matthew Gillespie answered

Shapes disappear on reset model

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

FlexSim 16.2.0
shapes disappear on reset model
hc-try-1.fsm (137.3 KiB)
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

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 0 ·
Stephanie Lombard avatar image Stephanie Lombard commented ·

Thank you Jorg, that makes sense.

0 Likes 0 ·

1 Answer

Matthew Gillespie avatar image
2 Likes"
Matthew Gillespie answered

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.

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.

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.


itemtype.png (7.1 KiB)
unload.png (32.3 KiB)
5 |100000

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