Hi,

in my model I have integrated a fixed inventory list and a fixed order list which is the same in every run. But since I need to use this model for future predictions and replications, I need to change my lists every time I run a simulation. This means that uncertainties and fluctuations have to be integrated into the model. Is it possible with FlexSim to create global tables like Inventory List and Order list with statistical probabilities at the start of the simulation, which change after each run. The idea would be as follows: I have approx. 500 different products (SKUs) which are stored in a statistical distribution to a total of approx. 2000 products and a statistical ArrivalTime in the rack. These products should be statistically allocated to a total of 925 orders. An order can have 1-7 products. Thus, with FlexSim, a new Inventory List with approx. 2000 entries should be created at each simulation start. Can this problem be solved with Process Flow (CustomCode) for example? How can this list with statistical distributions be generated? Maybe someone can support me with this. Enclosed I attach the model. I have already created a global list called InventoryStat.

Thank you very much!

processflow.png
(11.0 KiB)

test-milkrun.fsm
(1.9 MiB)

Comment

Hi @Martin B6, was Parker S's answer helpful? If so, please click the red "Accept" button at the bottom of their answer. 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.

Best Answer

**Answer** by Parker S ·

Here is code you can use to populate your Inventory global table:

Table Inventory = Table("Inventory"); Table SKUs = Table("SKUTable"); for (int rowNum = 1; rowNum <= 2027; rowNum++) { Inventory[rowNum]["SKU"] = SKUs [duniform(1,500,1)][1]; Inventory[rowNum]["ArrivalTime"] = duniform(0,227,1); }

Where the "SKUTable" contains a list of your 500 SKUs.

I'm still working on the OrderHistory, I think it will be a bit more tricky. I'm assuming you want to have a fixed list of 925 OrderID that need 1-7 products to be allocated to them, is that correct?

Hi @Parker S

thank you very much for your answer. Yes exactly, at each start of the simulation a list (OrderHistory) should be generated, which consists of 925 different orders of 1-7 products each. The due date of the order should be stored with a statistical distribution. The idea is that at each simulation start always different Inventory and Order lists are created. Unfortunately I do not know if this is feasible. I tried to integrate the code from you into the model and there was a problem. I always get an error message that the path cannot be found. I do not know exactly what the problem is. Could you help me again and show me how I can integrate the code into the model?

Many thanks!

@Martin B6 Normally inventory and order due date are correlated through 'material requirements planning' and 'availability to promise'.

If we generate random SKU arrivals into inventory and random order due dates independantly we might see storage levels and late orders that are not at all representative of the real system with an early order waiting for a very late SKU arrival.

It also seemed in your model so far, that you were preassigning the individual SKUs to an order, but in the completely randomly generated case would you still enforce that, or would you allow, when it arrives, the same SKU number to be reassigned to another order that needs it with an earlier due date ?

I think what you're asking, while possible, raises a lot of questions.

© 1993- FlexSim Software Products, Inc. All Rights Reserved.

FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.

FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.

- site links
- www.flexsim.com
- contact us
- blog
- privacy policy
- archived forum

- Anonymous
- Sign in
- Create
- Ask a question
- Post an idea
- Create an article
- Spaces
- Software & Simulation Questions
- Accounts & Licensing
- FlexSim
- FlexSim Healthcare
- Explore
- Topics
- Questions
- Ideas
- Articles
- Users
- Badges