SOURCE

SOURCE

eric_c2
Not applicable
171 Views
6 Replies
Message 1 of 7

SOURCE

eric_c2
Not applicable

[ FlexSim 21.0.1 ]

Hi All,

What can I do to generate from a source two different kind of output?

I mean, I want to generate a first output from a source with one size and the next one with another size alternatively.

The first sould be 2x1x1 size and the next one 2,5x1,5x1, then the third one should be like the first and the fourth like the second and repeat this generation.

I know how to change the size using a trigger on Exit, but when I do that all the items are the same and they do not change the dimension.

Someone can help me?

Thank you.

0 Likes
Accepted solutions (1)
172 Views
6 Replies
Replies (6)
Message 2 of 7

jason_lightfoot_adsk
Autodesk
Autodesk
Accepted solution

You can use a schedule or sequence that repeats where you label each as type 1 and 2 and then in the creation trigger change the shape based on the type.

Or you can see if the number that you've output is even or odd and set the shape based on that.

Or you can set a label each time you create an item and test it at the next creation - so the label flips between two values, and then use that to determine the size to create.


Message 3 of 7

joerg_vogel_HsH
Mentor
Mentor

Or you have two output ports and you send items by round robin property to these two ports. On Exit you can set the size by case depending on the variable port.

Message 4 of 7

jason_lightfoot_adsk
Autodesk
Autodesk

And then change the shape on exit rather than creation. Both outputs can be to the same object that the source feeds.

0 Likes
Message 5 of 7

SimFlex_support
Collaborator
Collaborator

@Eric C2

You should solve TWO issue for your problem.

The first is round robbin item type when creation and the second is to change the size by the item type. I upload the sample the first issue solved And then I hope you will solve the second issue.

roundRobbin_Source.fsm

If you have any question about the model, let me know it.

email ID : support@flexsim.co.kr & support@simflex.co.kr
0 Likes
Message 6 of 7

joerg_vogel_HsH
Mentor
Mentor

Here my approach from comment

36017-sendtoportroundrobin-sizeby2dlabelarray.png

SendToPortRoundRobin_SizeBy2DLabelArray.fsm

I store the sizes of items in an array at label iSize in the source. It is a 2D array in the form

[[x1,y1,z1],[x2,y2,z2]] I get the first or second size value array by variable port of the On Exit trigger.

0 Likes
Message 7 of 7

Ben_WilsonADSK
Community Manager
Community Manager

Hi @Eric C2, was jason.lightfoot's or Jörg Vogel's or Seung Yong Seo's answer helpful? If so, please click the red "Accept" button at the bottom one of their answers. 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