question

Sia Sengchoon193 avatar image
1 Like"
Sia Sengchoon193 asked Dewriffic16 commented

How to group different objects together and parametrize ?

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

FlexSim 21.1.5
parametersgroupmemberobject group
1655414576218.png (64.5 KiB)
1655414633443.png (99.0 KiB)
1655414673610.png (59.5 KiB)
1655414742164.png (96.1 KiB)
1655414794856.png (158.7 KiB)
1655414905391.png (147.1 KiB)
1655415062219.png (112.7 KiB)
test.fsm (149.5 KiB)
· 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.

Kavika F avatar image Kavika F ♦ commented ·

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 0 ·
Kavika F avatar image
0 Likes"
Kavika F answered Dewriffic16 commented

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


1655420991376.png (300.6 KiB)
· 3
5 |100000

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

Dewriffic16 avatar image Dewriffic16 commented ·
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 0 ·
Julie Weller avatar image Julie Weller Dewriffic16 commented ·
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 0 ·
Dewriffic16 avatar image Dewriffic16 Julie Weller commented ·
Thanks Julie! just posted a new question with more details...
1 Like 1 ·
Jordan Johnson avatar image
2 Likes"
Jordan Johnson answered

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


test-1.fsm (149.7 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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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