How to group different objects together and parametrize ?

How to group different objects together and parametrize ?

sia_sengchoon193
Not applicable
3,457 Views
6 Replies
Message 1 of 7

How to group different objects together and parametrize ?

sia_sengchoon193
Not applicable

[ FlexSim 21.1.5 ]

I want to build a parametric table to run the optimization

But I have a problem that the things in the group will disappear after parameterization

The scene that I want parameters is a workspace,

There are 4 work machines and 1 operator inside,

I want to optimize how many workspaces I need to meet my needs

1655414576218.png

so I group them first

1655414633443.png

like this

1655414673610.png

Then create a parametric table

1655414742164.png

Then set the reference of the parameter, and set Delete and Copy Group Members

1655414794856.png

At this time, there are still original members in the group.

1655414905391.png

But when I set it up to reset and run it once, there is only one type of member left in the group

1655415062219.png

I don't know why it happens? Do I need to set something or create a trigger?


test.fsm

Accepted solutions (1)
3,458 Views
6 Replies
Replies (6)
Message 2 of 7

JordanLJohnson
Autodesk
Autodesk

The "Delete and Copy Objects" code in the On Set trigger works like this:

  1. Delete objects in the group until there is only 1
  2. Copy that object until there are enough object

The new copies have the exact same location as the original object.

If you want to turn machines on or off, I wouldn't use that pickoption. Instead, I would have the queue send a message to itself, and when it gets the message, it closes the input ports of all the processors, according the parameter.

test_1.fsm

.


Jordan Johnson
Principal Software Engineer
>

Message 3 of 7

kavika_faleumu
Autodesk
Autodesk
Accepted solution

Hey @Sia Sengchoon193, great question! There's a few things I'd like to point out that may help you with your analysis.

First is that when you group the Processors and Operator together into one group and try to parameterize how many there are with a Parameter, it will only add/remove one type of object. Therefore, when you change the parameter and reset the model, the operator disappears - FlexSim thinks you just want processors.

Secondly, the reason you're only seeing 1 processor after updating the parameter is that the processors stack on top of each other when created; if you move one you'll see more underneath.


One solution is to put everything you want to replicate on a plane (Library > Visual); when things are in a plane, you can move the plane and they all move together; you can copy planes and everything inside is copied (like a mass selection). If you put the plane in a group and then parameterize the group (add and delete members), you can actually duplicate entire planes (image below). [Here's a link on how to put things in planes if you don't just drop them into one]

1655420991376.png

One downside is that the connections to things outside of the plane are not kept.

Another solution would be to put all the processors in one group and all the operators in another group and then parameterize them individually (not in planes). Then they will scale up and keep their port connections. This would be really useful to use in an Experimenter too, which can run hundreds of iterations on different combinations of parameters.

parameterize group.fsm

0 Likes
Message 4 of 7

kavika_faleumu
Autodesk
Autodesk

Hi @Sia Sengchoon193, was Jordan Johnson's or my answer helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes
Message 5 of 7

dewriffic16
Not applicable
I have almost the exact same question, however I have a need to parametrize up to about 8 'workspaces' that each contain a mixture of processors, combiners etc. Each workspace should have say 3 operators and I want to be able to duplicate the workspace or plane while maintaining the connections. Any ideas on how to duplicate while maintaining connections? Even using the planes and making connections manually, I struggle with having to make all these connections each time.
0 Likes
Message 6 of 7

julie_weller
Not applicable
Hi @Dewriffic16! I think the easiest way to do that would be to replace your 3D connections with process flow, that way the connections would be connected to the groups and not the physical objects. If you want more help, please post a new questions (you can link to this one), ideally with your model. If it's proprietary you can toggle the question to be private.
0 Likes
Message 7 of 7

dewriffic16
Not applicable
Thanks Julie! just posted a new question with more details...