question

mark zhen avatar image
0 Likes"
mark zhen asked Ryan Clark commented

Out of library problem

1020.fsmI want to expand my model. He must be able to move the goods on the left to the first position on the right according to time and coordinates, and then three transport vehicles will transport the goods to q4

FlexSim 21.0.0
agvagvnetwork
1020.fsm (230.1 KiB)
· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·

Could you explain a bit more? Who/what is "he"? Which one is the "first position on the right"? What times and coordinates (example)?

Some general advice:

You should be able to re-use many parts of the existing process flow. The "Decide Storage" activity assign finds the correct storage object and slot based on the DstX/Y/Z values. If you get the slot where an item should be, you can get a reference to the (first) item in it with "slot.slotItems[1].item".

You can then mostly use a copy of the process flow to travel there and retrieve the item, then update the coordinates on the pallet and once again use an adjusted copy of the process flow to transport it "to the first position on the right".

From there you could use standard port connections to have the forklifts transport the items to queue4. Use a condition in the "Send to Port" option to only send out items from a specific slot for example.

Option: Conditional Port

Storage.Item(item).as(Storage.Item).currentSlot.bayID == 1

True -> 1
False -> -1

This would lead to only items from the first bay being send out.

0 Likes 0 ·
mark zhen avatar image mark zhen Felix Möhlmann commented ·

My "he" refers to the entire model. Now the part of the warehouse has been completed, but I don’t know how to build the part about the delivery.

0 Likes 0 ·
Ryan Clark avatar image Ryan Clark mark zhen commented ·

Hi @霈倫,

Like @Felix Möhlmann said, would you mind being more specific about the problems you're experiencing? That makes it much easier for us to be able to help you. Please see Best practices for using this Answers site - FlexSim Community for more details.

Thanks!

0 Likes 0 ·
Show more comments
Ryan Clark avatar image Ryan Clark commented ·

Hi @霈倫 , was Felix Möhlmann's answer helpful? If so, please click the "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.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

Like I wrote in my original comment, a lot of the process logic can be reused for this. In the attached model I create tokens with the same Dst-values as the pallets in two process flow sources. Then I use the a copy of the "Decide Storage" activity to find the correct slot based on the those coordinates. The only difference to the original activity is that this one doesn't assign the slot to an item but instead writes it to a label on the token.

In the "Assign Item" activity I then check for items in that slot, which are not already marked as outbound (this means the "currentSlot" is different to the "assignedSlot"). If an item is found, the same block of travel and move activities as in the original flow is used to load the item and return to the center lane. Only the second move object activity is different - moving the item into the SonCar instead of the storage.

Then I reset the Dst-values to the original values (they get changed to actual 3d coordinates in the "Decide Storage"). Only DstX gets changed to 14, so the item will be moved to the right most slot. The same activities as in the original flow are used to transport the item there (only "PulledItem" is exchanged for "item" since that's the label name the item is assigned to here - in both the "Move Object" acitivity and the code of "Decide Storage").

In the "On Slot Entry" trigger of the storage on the right, I push the entering item to a list, when the entered slot is the right most one. In the "Retrieve Step 2" flow, tokens (each representing a task executer) pull these from the list again and then move them to queue4.

1020_fm.fsm


1020-fm.fsm (254.8 KiB)
· 6
5 |100000

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

mark zhen avatar image mark zhen commented ·

Hello, I would like to ask how those lines are drawn outAnd can you ask me about the entire retrieval process! Thank you very much

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann mark zhen commented ·

Here's the manual entry for travel networks (I assume that's what you mean with "lines"). In short: Add network nodes from the library and drag connections between them by holding down "A" and clicking on them in order. Task executers and other objects get connected to them the same way; hold down "A", select the object and then click on a network node, to connect them. (Blue lines for "fixed resources", red lines for task executers)

https://docs.flexsim.com/en/21.2/WorkingWithTasks/Travel/WorkingWithTravelNetworks/

The basic logic of the retrieval process is already described in my answer.

I commented the code I wrote in the activities and named them based on their function. (Again, most of it is copied from the previous process flow.) I don't think it would make much sence to copy/paste all of that text in here. You can open the code window with the icon in the screenshot below.

1636716118010.pngInformation on commands can be found either under "Help -> Commands/Command Helper" or the manual page for the respective variable class (link to Object class, other classes can be found in the side bar on the left)

https://docs.flexsim.com/en/21.2/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/Object.html

If you have any specific questions about parts of the code or the function of certain activities, feel free to ask.

1 Like 1 ·
1636716118010.png (7.2 KiB)
mark zhen avatar image mark zhen Felix Möhlmann commented ·

I now have another problem. If I only want the elevator on my left to enter the warehouse and the elevator in the middle to leave the warehouse, how can I adjust my model?1115.fsm

0 Likes 0 ·
1115.fsm (259.9 KiB)
Show more comments