Is it possible to link MRP data to Flexsim model ?

Is it possible to link MRP data to Flexsim model ?

marco_c4
Not applicable
2,425 Views
10 Replies
Message 1 of 11

Is it possible to link MRP data to Flexsim model ?

marco_c4
Not applicable

[ FlexSim 17.2.5 ]

Hello,

My question is related to MRP data: inventory and demand forecast, in relation to the sources in the model.

How can I link the "on-hand inventory" in the sources I am using for my model?

Also, If my product is made of 10 items in it's BOM, do I have to have 10 sources to reflect that?

Thanks,

Marco

0 Likes
Accepted solutions (1)
2,426 Views
10 Replies
Replies (10)
Message 2 of 11

tanner_p
Not applicable

The best way to link your data would be through Global Tables. Do you have any experience with importing tables into FlexSim? Once you've imported a table with all your quantity and label data, you can have the Source reflect that in its production. There's many ways to access table data, however, so I'm afraid I can't give an example without knowing more about your data. Perhaps you could upload your files in a private question if you need further help.

Additionally, you can have 10 sources or use Process Flow to create those 10 items in your BOM. To achieve this using Process Flow, you'd just use Create Object activities after sources. Let me know if you have more questions about this.

Message 3 of 11

marco_c4
Not applicable

@Tanner Poulton,

Thanks a lot for your answer. I have no experience in uploading Global Tables. My goal is to know how much of each components of my BOM I have consumed during the simulation run.

To do that, I am thinking of:

1/ Import BOM items and QTY in 1 table

2/ Link each finished flow item to the same table and multiply?

Are there any other methods to do "inventory management" in FlexSim? My ERP can extract tables in csv format.

Thanks,

Marco

0 Likes
Message 4 of 11

SimFlex_support
Advisor
Advisor
@Marco Casavecchia

You should know how to control 'Global Table' of flexsim for the purpose of your doing with BoM and on-hand inventory.

Or if you do not use your BoM data, you can use the process flow template of 'Material Consumption and Replenishment'

0 Likes
Message 5 of 11

tanner_p
Not applicable

Please review the custom code that dynamically updates the Global Table (which could be used as a BOM). Whenever an item is processed, the inventory for that item's type is decremented by 1. Obviously, this model is incomplete, but hopefully you can apply the concepts from it to your own model and make it work.

18435-global-table-update.png

Hopefully this helps! Global Tables can be very powerful tools and they're worth learning.

Model: inventory-bom.fsm

0 Likes
Message 6 of 11

marco_c4
Not applicable

@Tanner Poulton

Thanks a lot for this inventory-bom code. It is very close to my need.

2 questions on the code itself:

- In the "OnReset" code: can the 500 value be taken from a table cell?

- In the "OnProcessFinish" code: how can I select from which "Type X" it will decrease of -1 as the simulation runs?

Thanks,

Marco

0 Likes
Message 7 of 11

joshua_s
Not applicable

To pull a value from a table cell, use:

int value=Table("GlobalTable1")[row][column];

Or do you mean pulled from one table and inserted into another?

The "Type X" right now is the Type label on the item coming in, so just edit the line

int row = item.Type;

so that you can select which row will be decremented.

Message 8 of 11

marco_c4
Not applicable

I have uploaded an example of what I would like to change in this custom code.

bom-inv-decremental-logic.xlsx

Basically, I need to be able to have something different than just -1 decremental qty. And also, be able to have quantities uploaded of on-hand inventory, instead of 500 for every item.

0 Likes
Message 9 of 11

tanner_p
Not applicable
Accepted solution

Hi @Marco Casavecchia,

I believe that the following updated model should accomplish what you are thinking. There are a couple things I changed.

First, since you have an Excel file now, I was able to use the Excel file for direct import upon model reset (meaning that when you update the Excel sheet, it will update your Global Tables in FlexSim). There's tutorials on how to use FlexSim Import/Export, so hopefully it's straightforward enough that you can pick it up quickly. You will have to change the directory for you model. Do this by clicking the (...) next to Excel Workbook and identifying your Excel sheet.

18478-excel-import-1.png

Second, once you have imported your Global Tables, you'll need to change the code so that you're accessing the current INV value and then subtracting the BOM value from it. I think you called this "- X". The new script for the OnProcessFinish Trigger looks like the image below. Note that I used two row and column values in case you choose to alter those.

18479-process-finish-trigger-script.png

Hopefully this helps. Of course, you're probably going to need to designate more functions, such as what happens when the INV levels are insufficient and such. This will all require using a lot of custom code. Before taking on a large model, you might consider talking to your local distributor about consulting. There are many ways to utilize FlexSim and we would hope you can find the best one for your simulation.

Model: bom-inventory.fsm

0 Likes
Message 10 of 11

marco_c4
Not applicable

Hello @Tanner Poulton,

Thanks a lot, this is very close to my need.

One clarification I might have not made. When the Processor1 is outputting 1 item, the change in INV should be : (with N being the last qty in the Inv column)

Item 1 = N-2

Item 2 = N-1

Item 3 = N-1

Item 4 = N-10


These 4 subtractions should,happen every time Processor1 output qty 1

Right now, the model is doing one item after the other only.

Thanks,

Marco

Message 11 of 11

tanner_p
Not applicable

Instead of using item.Type, just update the code to run a "for()" loop for each row in the table. That way, it will decrement each row for each item. Hopefully this helps. Please see updated model attached.

bom-inventory-update.fsm

0 Likes