question

Donghuang L3 avatar image
0 Likes"
Donghuang L3 asked Donghuang L3 commented

Slug-building: problem in specifying exact sizes

Hi, I am having a problem trying to specify the sizes of slugs of my conveyors.

I am working on a merge conveyor system: it has 8 merge lanes going into a single mainstream. I want each slug on each lane to be exactly 20 items. Also, I do not want consecutive slugs from a single lane whenever there are other lanes ready.

I started by specifying the slug-builder parameters of the lanes, and then used a MergeController to control the lanes. To guarantee exact slug sizes, I also created Restricted Areas for each lane according to this answer:
Why are my released slugs to big going to the merge? - FlexSim Community
(The physical dimension of each restricted area here is just adequate for 20 items.)

But still, the slug-building does not work as I expected. The problem can be illustrated as the following two screenshots:1.png2.pngSeems there is no flexibility in manipulating the release() function of the slug-building conveyors --no way to set up quantities nor to turn on/off.

Also, even with the Restricted Area approach, it still adds unwanted items when those items are close to a full slug. I found that if I set up lower thresholds (e.g. 10 items instead of 20), the systems works as expected (but that will make the conveyors under-utilized).Would you please help figure out a way to develop the exact, customized slug-building control as described? Thank you.

FlexSim 22.2.1
merge controllerslug buildingarea restriction
1.png (125.2 KiB)
2.png (149.5 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.

1 Answer

·
Jacob W2 avatar image
1 Like"
Jacob W2 answered Donghuang L3 commented

Hi @Donghuang L3,

I am including a model that shows a way to limit the size of a slug without allowing larger batch sizes through. I used two decision points that drive the logic behind the slug building. In my model DP2 increments a label called count by 1 each time an item arrives at it. Once the label is greater than the SlugSize parameter that I added, the current item is stopped and it is added to a label called Obj on decision point 2.

Once the slug is completely collected on the conveyor, it is then able to be released. The released items then pass over the second decision point, DP1. Each item increments a label called SlugCount by 1. When that value is equal to the SlugSize parameter it then resets the label Count on DP2, resumes the item that was stopped at DP2, and resets the label SlugCount to 0. This process is then repeated until the model is stopped. Below I have included the code that is written onto each of the decision points.

//DP2
// If this function returns a true, the default draw code of the object will not be executed.
{ //************* PickOption Start *************\\
/***popup:IncrementValue*/
/**Increment Value*/
treenode thenode = /** \nNode: */ /***tag:node*//**/current.labels["Count"]/**/;
double value = /** \nIncrement By: */ /***tag:value*//**/1/**/;
thenode.value += value;

if (thenode.value > Model.parameters.SlugSize) {
Object involved = /** \nItem: *//***tag:item*//**/item/**/;
involved.up.as(Conveyor).itemData[involved].stop();
current.Obj = involved;
} //******* PickOption End *******\\
}
//DP1
/**Increment Value*/
treenode thenode = /** \nNode: */ /***tag:node*//**/current.labels["SlugCount"]/**/;
double value = /** \nIncrement By: */ /***tag:value*//**/1/**/;
thenode.value += value;

if ( thenode.value == Model.parameters.SlugSize){
current.centerObjects[1].labels["Count"].value -= thenode.value; //resets the label 
thenode.value = 0;

Object involved = current.centerObjects[1].labels["Obj"].value;
involved.up.as(Conveyor).itemData[involved].resume();
}

Some important information about the code. Each decision point is connected with a center port connection. This makes it easier to reference the other decision point if necessary.

Each of these are controlled by a parameter called SlugSize. This allows one to easily modify the needed slug size. Be sure that the slug building conveyor itself also has the slug size set by this parameter.

slug-size.jpg

I hope this helps. If you have any questions feel free to reach out.

Limiting slug building sizefsm.jpg

(Rightclick on the file attachment -> Save Link/Target As (might be called differently depending on the browser) -> Set "Save as type" to All Types -> Save with a name ends with .fsm)


· 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.

Donghuang L3 avatar image Donghuang L3 commented ·

Hi Jacob, thank you very much for the answer. I found that the release timing is not exactly as I expected, please see the following figure:3.png
In your codes, item.9 waits at the entrance node until item.8 passed the exit node. However, what I expect is to enter item.9 once item.1 passed the exit node -- so that at the moment a slug of 8 is fully released, the first item of the next slug just arrive the exit node.
Any ideas?

0 Likes 0 ·
3.png (1.2 MiB)
Jacob W2 avatar image Jacob W2 ♦ Donghuang L3 commented ·

Hi @Donghuang L3,

I have edited the model a bit. It now releases the next batch item as soon as the first item in the batch passes the decision point on the connecting conveyor. This method still has some issues, for example if there isn't enough space between the two conveyors and decision point where the items are being stopped, the next items will be attached to the first batch. To fix this you can either add a photo eye that delays the item for a small amount of time, or increase the length of the conveyor belt.

Here is the updated code on the decision point.

if ( thenode.value == 1){
Object involved = current.centerObjects[1].labels["Obj"].value;
involved.up.as(Conveyor).itemData[involved].resume();
current.centerObjects[1].labels["Count"].value -= (Model.parameters.SlugSize);
}
if(thenode.value == Model.parameters.SlugSize) {

thenode.value = 0;
}

I have added two other conveyors in the model to highlight what is going on in the model.

Limiting slug building size1fsm.jpg

0 Likes 0 ·
Donghuang L3 avatar image Donghuang L3 Jacob W2 ♦ commented ·

Yes, the "more items attached to batch" issue is indeed the problem I am trying to solve. Will try the photo eye approach you suggested.

Thanks Jacob!

0 Likes 0 ·

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.