question

Rohan J avatar image
0 Likes"
Rohan J asked Jeff Nordgren answered

Creating multiple objects from same source in process flow.

test-model.fsm

How can I add multiple components in the same source in process flow. Can you help me out by creating "Part A" and "Part B" in the process flow and then assigning the same on the 3D model.

Please reply to me on [email protected]

FlexSim 17.2.2
multiple parts from same resource
test-model.fsm (25.2 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.

Regan Blackett avatar image
0 Likes"
Regan Blackett answered Regan Blackett edited

The answer that works best for you may depend a little on how you want the parts to arrive. for example, if you want Parts A and B to occur randomly, or if you want a Lot of Part A and then a separate Lot of part B, etc. Based on having a Schedule Source in your model, I'm guessing that you want a batch of "Part A" tokens to be created at one time in the model and a batch of "Part B" to be created at another time. So I would set up my Schedule Source Like this:

I added a second row to your schedule, the time field could be whatever time you want, but as currently put together now you would get all your first row arrivals first and the second row arrivals right after in the sample moment in time. If you wanted you could also name the Parts Part A and Part B int he name field but it isn't required.

Notice in the red rectangle I have created a label with the same label name that you had in the "Assign Labels..." section, I moved the label declaration there because I was assuming that you want all the Parts from row 1 to be the same type. I'm also using simpole numeric values fro the type ( 1 and 2) because values are usually easier to work with. For example if you wanted to set either the product shape or color (or both) based on what kind of part it is, it's a little more straight forward with numbers rather than working with text or names like "Part A":

Here's how you can have different parts have different 3D shapes using the Create Object activity (Note the use of your labelItem label to choose between box and Cylinder shapes):

And also here with changing the color using a Change Visual Activity:

Also notice the 'Product' label. You had 'labelItem' declared on the create object activity and the source, which means the value from the Source would have been overwritten by create object. I renamed it Product because the purpose of the label is to give youy a reference to the object that was created, rather than storing a value.

See your model below:

testmodel.fsm


createobject.png (43.6 KiB)
changevis.png (18.3 KiB)
schedule-source.png (69.2 KiB)
changevis.png (19.8 KiB)
createobject.png (43.6 KiB)
testmodel.fsm (24.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.

Jeff Nordgren avatar image
0 Likes"
Jeff Nordgren answered

@Rohan J

Attached is a model that is similar to the one you sent. It has two options. The first option (left process flow and Queue1 and Queue3) uses the bernoulli() distribution in the Create Object PF block to create flowitems with a 50/50 chance of being a 1 or 2 (Type A or Type B). Because it is a distribution, it may not get an exact 50/50 distribution, but would, over time.

The second option (right PF, Q2 & Q4) uses two sources to create exactly the same number of Part A as Part B (itemtype 1 & 2) and creates them in the same queue (Q2). Other than that, they pretty much do exactly the same thing. So it's just a matter of how exact you need the 50/50 split to work.

Does something like this work for your situation? If not, what am I missing?

Thanks.

itemcreate-jn1.fsm


itemcreate-jn1.fsm (29.0 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.