In our model the ItemCounts doesn´t counts. For that reason in the second 0 the sink takes all at once.
Thank you for this thread, it's being really helpful. Nevertheless, I have additional questions on it @Sam Stubbs. In this code, you compare the parts that have been shipped (I guess that the value is reset every hour but don't see how) with the items that should be shipped hourly. The second part of the equation is clear, it seeks for row Current hour and column item type for the column in the table demand. But it's not clear for me what does the first part do.
gettablenum(label(current, "ItemCounts"),getitemtype(item),1) >= gettablenum("demand",CurrentHour,getitemtype(item))
Thanks a lot!
Helen
The sink possesses a label called "ItemCounts". This label contains a table that tracks how many items of each type the sink has received by incrementing the respective value whenever an item enters the sink (first function in the On Entry trigger).
The first part of the condition reads the value for the current item's type from that table label which then gets compared to the target value from the global table.
You can see the table view of the label by rightclicking on it and choosing "Explore -> As Table".
The reset of the values happens in the User Event "Track Current Hour".
12 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
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.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved