Hello everyone,
I'm a beginner with FlexSim (less than a week of experience), and I'm trying to reproduce the results of a scientific article: Modeling and Simulating Warehouse Storage Policies Using FlexSim. The goal is to simulate different storage policies in a warehouse environment.
In my simulation, I have the following setup for pallet storage:
- Pallet Composition: Each pallet is composed of 16 tiles.
- Three Levels of Placement Strategy:
- Primary Sorting: Based on
label1_id
(e.g., product type). - Soft-Mix: If the primary location is full, pallets are placed based on
label2_classe
(same destination). - Mix: If no suitable location is found, pallets are placed in any available free space, but pallets with different
label1_id
should not be stacked together.
- Primary Sorting: Based on
I'm facing an issue with the custom slot assignment in the "Slot Assignment Strategy" using the "Matching Labels" option. Here's the problem:
Observation: The variable
k
(1 to level.slots.length) seems to only give access only to the slot. When I try to place an object, it uses the functionslot.hasSpace(item)
, which seems to checks if there's enough space in the slot based on dimensions (I have configured the pallets dimensions to stack up to 4 high. However, this function only returns0
or1
, and there doesn't seem to be a way to know how many items are already in the slot or to access them.Objective: I want to determine if there's already an object in a slot. If there is, I need to check its
label1_id
. If thelabel1_id
matches the current item, I can place the new item in the same slot. If not, I need to place the item in the next level (to avoid stacking pallets of different types together, even in Mix mode).
Question:
Is there a way in FlexSim scripting to:
- Access the contents of a slot to check if it already contains items?
- Retrieve the labels (e.g.,
label1_id
) of the items in a slot? - Modify the "Slot Assignment Strategy" script to implement this logic, ensuring that two items with different
label1_id
are not placed in the same stack during the Mix mode?
Any guidance or examples on how to achieve this would be greatly appreciated. I'm still new to FlexSim and scripting within it, so detailed explanations or code snippets would be very helpful.
Thank you in advance for your assistance!
Best regards,Buffer_Storage_System_G.fsm