question

swa12 avatar image
0 Likes"
swa12 asked Jason Lightfoot edited

error in code

@Joerg Vogel Greetings, I am trying to store two pallets per bay according to my model, use this code that is assigned to the floor warehouse, I got an error, the code must respect the maximum floor storage per bay, it can only store one and it must have two pallets, maximum one on top of it. other

Code


Dll.fsm

Storage.Object current = ownerobject(c);

Object item = param(1);

Storage.Item storageItem = Storage.Item(item);

/***popup:SlotByCondition*/

/**First Slot with Space*/

storageItem.assignedSlot = Storage.system.findSlot("WHERE slot.slotItems.length < 2 ");


FlexSim 23.2.2
codefloor storageslot assignmentpallet stacking
· 1
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

This site is intended to act as a resource for people to search and so we are keen that our answers are useful to everyone. If you delete our comments, no-one else can benefit from the time we took to consider the issues and provide our best solution.

In this case there was a valuable lesson to be learned about replacing a rack's slotAssignmentStrategy with:

storageItem.assignedSlot = Storage.system.findSlot("WHERE slot.slotItems.length < 2");

when it should be:

storageItem.assignedSlot = Storage.system.findSlot("WHERE slot.slotItems.length < 2 AND slot.storageObject=$1",0,current);
0 Likes 0 ·

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered swa12 edited

Your slots (1.08x1.23) are not big enough for the pallets (1.25x1.25) and your port choice is fixed - it doesn't respect if a slot can be assigned.

· 5
5 |100000

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

swa12 avatar image swa12 commented ·

The first one I already corrected is fine, now the second point I didn't understand where I changed that option or what I should change

1699813724429.png


0 Likes 0 ·
1699813724429.png (26.6 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ swa12 commented ·
First available is fine - don't use random port to go to the floor storage - as it will try and go only to one floor storage even if it doesn't have space.
0 Likes 0 ·
swa12 avatar image swa12 Jason Lightfoot ♦ commented ·

@Jason Lightfoot

1699824286955.png

I tried it and corrected that but now I get this error. I already left the first order, it did well but the second one stayed frozen.

0 Likes 0 ·
1699824286955.png (129.5 KiB)
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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