Delete and Copy Out Objects with lower bound zero

Delete and Copy Out Objects with lower bound zero

lambert
Not applicable
83 Views
4 Replies
Message 1 of 5

Delete and Copy Out Objects with lower bound zero

lambert
Not applicable

[ FlexSim 23.0.2 ]

Hi,

I have several parameters for number of operators, which are referenced to dispatchers (with on set "delete and copy out objects").

However, when I set lower bound to 0, it always keeps at least one operator object.

1674680699193.png

Is there a way so that if a parameter is 0, the simulation won't create any objects for that parameter?

Thank you in advance!

0 Likes
Accepted solutions (1)
84 Views
4 Replies
Replies (4)
Message 2 of 5

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

Here's an example by changing the OnSet code and putting a label pointer on the reference object. It adds the label firstOutObject in order to create copies but rather than deleting it, disconnects it from the referenceObject (dispatcher in your case).

ParameterOnSet_DisconnectFirstOutobject.fsm

It assumes:

  • you will reset once with at least 1 outobject connected (when it stores the pointer).
  • there is only one input connection between the object on port 1 and the connection rank will not alter the model when it connects and disconnects when the parameter changes.


0 Likes
Message 3 of 5

lambert
Not applicable

Hey Jason, thank you for your help.

Would you be able to modify the code, so that when an operator is "disconnected", he is also removed from a group where he belonged beforehand?

I want to do this because when they are disconnected, they still count as "idle" in state charts graphs that I have for different operators groups.


thank you very much in advance

0 Likes
Message 5 of 5

lambert
Not applicable
thank you, will try now!
0 Likes