Idea

Chris Smith avatar image
5 Likes"
Chris Smith suggested Chris Smith commented

Process flow template/module for assembly line material replenishment and consumption models

Sorry in advance for the essay... I wanted to explain the idea thoroughly.

Assembly line material replenishment and consumption is a very common problem in manufacturing environments. However, it is surprisingly difficult for inexperienced modelers to create this type of model in FlexSim. I have worked with 10+ modelers in the last year who have tried to create this type of model. For instance, consider the following model requirements:

Example Scenario: Model a product being assembled on a production line. The production line produces 10 different variants and items are added to the product in 50 stations based on the product being produced. There are around 500 parts added to each product with amounts that depend on the variant. The lineside storage for the raw material is in buffers that are replenished using min/max replenishment. Parts are reordered from a external warehouse when the buffer reaches the min and follow the following chain to get to the lineside location:

  • Warehouse location to warehouse dock - using forklift
  • Warehouse dock to truck - using forklift
  • Truck to plant dock - using forklift
  • Plant dock to plant lineside location
  • using tugger or forklift (depending on size and weight)

The parts are ordered by the packaging qty. The tuggers at the plant can carry 500 lbs of material and follows a defined route every 30 minutes for delivery.

This is a common scenario to model to learn the following things:

  • Optimizing min/max replenishment points for a line
  • Optimizing tugger routes
  • Finding overall system performance

Current Difficulty: I am not saying that it is impossible to mostly do this with the current objects in FlexSim (there are a few exceptions). However, for a model that is common to almost all assembly plants, it is not intuitively accomplished in FlexSim. Also, it can become a mess really quickly at scale (think 10 stations with boxes that contain 10,000 bolts and 2 bolts used per part...). Below is some functionality that a material replenishment model could include that I think would dramatically improve the ability of FlexSim to tackle this type of problem. If it is possible to do these inherently in FlexSim (without or with minimal custom process flows/code), then please let me know.

Requested Functionality

  • Allow easily defining the route that a part takes to get from storage to consumption (I see this as similar to a patient track in HC)
  • Defined replenishment mechanisms
    • This is basically the method used to reorder the parts when the lineside inventory gets small. Some common methods are the following:
      • Min/max replenishment (This requires quite a few labels and messages)
      • Frequency (This is currently easy to do)
  • Better resource capacity considerations for task executers (by weight or volume)
    • When doing material delivery models it is useful to model a small box of bolts as a flowitem and an engine block as another. However, if I set the capacity of an AGV to 2, then it considers two small boxes of bolts to be the same as two engine blocks... In order to fix this it is necessary to do other work like add labels and do capacity based off labels.
  • Define routes for resources that are run continuously (can be done with AGV module) or at an interval.
  • Scalability I most often accomplish this by being sure to do delivery by packaging qty and then doing consumption from a label with the currentQty on a lineside location. This requires quite a bit of code to get it working.

I would be happy to have further discussions on this, if it is something of interest to the community.

developmentmodulesmaterial flowreplenishmentconsumption
5 |100000

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

anthony.johnson avatar image
5 Likes"
anthony.johnson commented

Chris,

Sorry, you're not going to get many non-process flow solutions on this from the FlexSim employees. Most of us are pretty sold on the advantages of process flow. It's visual, it's easier to communicate what logic is happening when, and it doesn't pigeon-hole people into only using the canned (hidden) logic that we would provide if we were to make an actual module for it.

To your point on speed, there is certainly some overhead with executing process flow logic. However, first off, it does depend on how you build your process flow, whether you're creating new tokens every 10 milliseconds vs finding options for not having process flow logic fire all the time. Second, right now there is a lot of low-hanging fruit for us to optimize it on our side, and even make it faster in some cases than would be possible if you were to implement logic in FlexScript. Label access is an example. There are ways that we can make label access in some cases an order-1 operation, even faster than a hash table lookup. So yes, speed is something to think about, but I don't think it necessarily has to be a show-stopper.

Secondly, on the object-oriented point, process flow can be implemented from an object-oriented perspective, specifically using the instanced (fixed resource and task executer) process flows. Using this methodology, you can implement a process flow from the perspective of the object. If done properly, the process flow will then scale to as many objects as you like; you just attach the objects as instances to the process flow, and each will start performing the desired functionality.

Thirdly, I guess I'm a bit flummoxed that you want to implement the replenishment mechanism using a "patient track"-style UI, but not using process flow. Process flow gives you the capability you would get from a patient track, and you get an extra dimension (patient tracks are a one-dimensional list of activities, while process flow gives you full flowchart style 2D UI).

I'm attaching an example model I put together that contains a fixed resource process flow that I believe is pretty flexible for implementing material consumption and replenishment. The cool thing, as I said before, is that you can just define the set of objects that use this logic by adding them as instances of the process flow (and you can drag new ones from the library as well). To define parameters, click on an attached object and in its quick properties you should see process flow input variables. These are inputs specific to that object associated with the process flow logic, as follows:

  1. StartLevel - This is the amount of material that the object will start with at the beginning of the simulation
  2. ReorderLevel - This is the level at which the object will make a new order to replenish the material
  3. ReorderUnitQty - This is the amount of material that is replenished with a single unit delivered to the station. So if it's bolts, and there are 500 bolts per box that's delivered to the station, this value is 500.
  4. NumReorderUnits - This is the number of discrete units to reorder at a time. So if you have boxes of 500 bolts each, and you reorder 4 boxes at a time, ReorderUnitQty would be 500, and NumReorderUnits would be 4.
  5. ItemDependentDepletion - This is a 1 or 0 value that tells whether the amount to deplete the material by is dependent on the item that is being processed. Usually this will be 0, but in some cases it might be 1. For example, if every part that is being assembled at a station uses up 2 bolts, no matter what the part type is, then ItemDependentDepletion should be 0. However, if some parts use 2 bolts, and others use 4, etc. then ItemDependentDepletion should be 1. When 0, the process flow can optimize for speed, which I'll talk about further down, so if you can make it 0, make it 0.
  6. DepletionUnit - What you enter for this value is dependent on ItemDependentDepletion. If ItemDependentDepletion is 0, then you should enter the constant amount of material that is used for each part. For example, if you use 2 bolts for each part, then this should be 2. If ItemDependentDepletion is 1, then this value should be some expression that contains token.Item. For example, if items moving through the station have a label called Volume that represents the amount of material that is consumed at that station, then you should enter for DepletionUnit: token.Item.Volume.
  7. Storage Location - This is the location from which to replenish the material. The default replenishment process uses this to create an item and place it there for pickup.

On the speed optimization: When the depletion amount is not dependent on each item, the process flow can simply listen for when the object's total input reaches a certain amount calculated from the various parameters. It is essentially saying: notify me when the object's input reaches 300. In between that time, nothing is happening in the process flow, so it is actually potentially faster than if you were to track things on the object using entry/exit triggers. It should be noted that in building this, I came across a bug in the wait for event, and unfortunately you can't get/set the proper values in the GUI. But when it does work, you will see that I'm listening for a tracked variable's OnChange event (the object's input statistic usually) and I'm setting it so it waits until the object input increases "to or through" a given value, namely the point at which I need to reorder.

If depletion amount is item-dependent, then the process flow does need to listen for each entry of the object, although I don't think that would bog down the system that much.

In the example model, I've implemented the two types of depletion/replenishment. Processor1 has standard fixed depletion, while Processor2 has item-dependent depletion based on a Volume label on the item.

Regarding your resource capacity suggestions, I believe that how and what resources pick up is a completely different problem than material consumption and replenishment, and thus I don't see those two as really needing to be paired together, since the problem of how, when, and what to pick up is a problem that happens in almost every model, not just in material consumption/replenishment. In the example model, I use the AGV template process flow to direct the AGV motion. If you want to constrain what an AGV can pick up given its current state, you can customize this in the AGV template process flow by changing a list pull query. You might push back on this as the AGV template process flow can be somewhat complex. I would respond that the AGV template process flow is exactly the result of people pushing for more flexibility in controlling transportation, which is exactly what you are wanting. It consolidates many of the complex decisions and prioritizations into a set of list pulls, where you can customize what you want to do next by simply adding/changing an ORDER BY or a WHERE clause in a pull. You just need to take some time to understand how everything is working (and I am open to feedback on how we can make it more easily learnable).

Going forward on this, my thought is that we should implement these types of functionalities via more template process flows, like the AGV template process flow, instead of as separate modules. Perhaps if many people find this one useful (and I'm open for feedback as to how it can be improved), then we will put this into the standard software as an available template. I also would like to make tweaks to the AGV template process flow so that it enables more automatic functionality, such as polling at intervals as you suggested.

materialconsumptionreplenishment.fsm

· 9
5 |100000

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

Chris Smith avatar image Chris Smith commented ·

@anthony.johnson

Thanks for the response. I think that the solution provided is the most capable method I have seen for doing material replenishment using Process Flow. It uses a similar approach to the one I am currently using without Process Flow, which is to model the replenishment units and then have a counter to keep track of lineside quantities. Most of the models I had seen in Process Flow used tokens to represent the parts, which would explain the scalibility problem (using flowitems in the 3d to represent parts is a similarly unscalable approach).

Regarding a process flow template vs module: I was not aware that more template process flows was the dev direction, as I hadn't seen any new template process flows since process flow was originally released. Additionally, the current templates don't really deal with a specific modeling objective, but rather in replicating an existing object. I honestly have no preference between a module and process flow template, as long as they are relatively similar in performance and ease of use. I merely suggested a module as my experience with new users had suggested modules as a more easily digestible format for explaining how to create a model. However, after seeing your example, I agree that using an instanced process flow template with variables that can be edited from the objects UI seems to be a good and relatively simple approach. Fundamentally, I see little difference between telling a user that you can do something in custom code and you can do something in process flow. Without a template (in the case of Process Flow) or module (in the case of Custom Code) it shifts the responsibility on the user to define the logic from the ground up (good thing for experienced modelers, but difficult for others). The real advantage in model building between one software and another is how easy it is to accurately replicate the real world system. That means that while process flow and custom code are great for experienced consultants and full-time simulation engineers, without a template or module it is unlikely that a part-time modeler can accomplish a model like the one we are discussing. So, I would agree that providing additional templates is an important part of making the software more user-friendly for that large subset of users.

Regarding the patient track style UI: I agree that process flow can provide this functionality. This suggestion was mostly driven by an assumption of developing a module. Upon looking at the example provided, I am thinking the best way to accomplish this requirement would be to create an array for each part where the value is the next destination (or array of destinations) and then a loop in the replenishment track to pop through that array until it reaches the final destination.

I would be interested in what others think, but the simplest solution in this space seems to be the one that easily translates a PFEP document (common documentation in a manufacturing environment), along with a few additional inputs, into a simulation. A solution where users can map the values they have in the PFEP to a specific input field in FlexSim would be ideal. This seems to be accomplished with the Process Flow example you provided.

Thanks again for your response. I will try this solution in a current case I have, and provide feedback from my experience.

1 Like 1 ·
Matt Long avatar image Matt Long Chris Smith commented ·

We initially added the Source, Queue, Processor etc templates to give starting points for anyone that wanted to take those library objects and customize their logic without having to pull out a BasicFR and code it up themselves.

We later added the two AGV templates to give more flexilibty to how the AGVs are used (and in some cases to remove the need for difficult to use/understand picklist options). We plan to continue adding additional Process Flow templates that will help with modeling more difficult problems, or to model features that the current library does not have built in. One future plan is a Crane template that would give you the ability to better handle crane collisions as opposed to using the very simplified picklist. Another would be a new combiner object that would give much more flexibility to how, when and where objects are combined. The biggest holdup with developing the templates is trying to create logic that works in many different situations and that is most useful to our clients.

0 Likes 0 ·
Chris Smith avatar image Chris Smith Matt Long commented ·

@Matt Long

I didn't get process flow until 6 months after it initially released, so from my perspective there were always the same templates. I look forward to those new templates. A template like the one Anthony provided above is extremely useful to a broad, yet admittedly not complete, subset of users. Maybe it would be useful to provide a method whereby templates like these (not necessarily completely developed or supported, but curated) can be shared between users. I guess this forum can sort of serve that purpose, but it would be great if that list could be found from within the software (maybe the online content link).

As far as what would be most useful for this client, see the original post :) ....

1 Like 1 ·
Show more comments
Chris Smith avatar image Chris Smith commented ·

@anthony.johnson

I have been trying to use this template, and I found one thing that would be an important future feature. It would be important to allow multiple parts at each station. Most assembly lines have at least some stations where multiple parts are added. In this case I would think it would be useful to model the line as a combiner and model the lineside material as a queue that feeds the combiner. In that case this template would apply to the lineside material location and not necessarily the station on the line. I think this would also make sense to most modelers as there are usually lineside material storage areas next to the assembly station. I have achieved this logic before by doing the material storage like in the template you attached and subsequently creating parts for consumption when required by the line (this process could definitely be better with a process flow based combiner). Do you think it makes sense to have the template apply to a queue-like object and then be pulled by a combiner-like object that models the line? It sounds like there is a combiner template in the works. Do you think it will be somewhat intuitive to hook that combiner up to a replenishment queue template? Thanks again for your help.

0 Likes 0 ·
Chris Smith avatar image Chris Smith Chris Smith commented ·

@anthony.johnson

Attached is a first pass using some of the logic I have used in the past. To really make it user friendly it would need to not require the custom code on the combiner to send the messages to the queues requesting an amount of items (this could be done with a separate template for the combiner, but I thought I would focus on one task at a time...). Some work would also need to be done to keep statistics in an accurate way. I would also be interested in any suggestions and comments that anyone has.

materialexample-1.fsm

1 Like 1 ·
anthony.johnson avatar image anthony.johnson ♦♦ Chris Smith commented ·

If I'm interpreting you right, I think another way to do it would be to attach the object to the process flow twice, as two "instances" of the same process flow. Each instance would simulate its own level/replenishment process. The problem is, the UI doesn't allow that :-). Alternately, you can duplicate the process flow so that you have two differently named process flows that essentially do the same thing (Material1, and Material2). Most objects would just be attached to one, but for those stations that use up 2 materials, you attach both Material1 and Material2.

Modeling it as a combine operation would work as well, but it's a very different model-building strategy than the process flow-based, so it would require completely different model-building steps. And the resource requirements would be higher as you're actually simulating the material as separate flow items.

0 Likes 0 ·
Chris Smith avatar image Chris Smith anthony.johnson ♦♦ commented ·
@anthony.johnson

I never thought about doing something like that first suggestion, but it makes sense. I do think either of those would work. I think the only change to the template above that would be necessary to get the above suggestion working would be to move the labels that are currently being tracked on the instanced object (TotalSupplied, QtyReordered, MainToken) to be labels on the instance process flow, right? Thanks again.

0 Likes 0 ·
anthony.johnson avatar image anthony.johnson ♦♦ Chris Smith commented ·

As I'm thinking of it more, you're right that there might be some advantage in having a "Supply Queue" template for a queue that feeds a combiner, and implements consumption/replenishment logic. This would be useful if you do in fact want to simulate discrete units. So, build one and share with me what you come up with :-)

0 Likes 0 ·
Sam Stubbs avatar image
0 Likes"
Sam Stubbs commented

I don't know if this is exactly what you're looking for, but instead of creating a new module, if you use process flow to handle the logic of your facility. You could use the preemption activities to simulate replenishment.

We've created a sample "bottling" facility to demonstrate how this could work. The preemption activities here simulate an MTBF/MTTR functionality for the Filling and Capping areas. But it also uses preemption for the label restocking, which sounds like it could be something similar to what you're trying to simulate.

bottlestationexample.fsm

5 |100000

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

Chris Smith avatar image
0 Likes"
Chris Smith commented

Thanks, Sam. This process flow does accomplish the logic of much of this request (specifically, the material replenishment mechanism). However, it also seems to prove the scalability issue. If you try to run 8 replications of 3 scenarios of this model for a months (or even a weeks) worth of production it takes a surprisingly long time. Now imagine that there are 50 stations with 500 parts... I think that an object oriented module would be superior for the following reasons:

1. Object-oriented models seem to require less processing power. Maybe I am using Process Flow incorrectly, but it seems when I use process flow the models seem to slow down dramatically compared to a custom coded solution. I would be interested in having a discussion about this to see if there is a way to minimize this performance impact.

2. Object- oriented modeling is more familiar to a broader set of people. Process flow, while incredibly useful, is not common to people who have used other software. It is much easier to help people create models if the 3D objects have the default capability to accomplish the modeling task.

I mostly just want to present this as a module idea to judge how much community interest there is in this type of module. Thanks again for your comment.

5 |100000

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

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.