Attached is an example model that simulates a Kiva system.
See Dev Talk: Kiva System Modeling for the steps I took in building the model.
Thank you for the KIVA system model. Can you post the code for the floor storage slot assignment? line 13 is difficult to read not sure what's after 1aStorable. Thank you.
Thanks for the very nice Kiva model (did you know that kiva means nice in Finnish?:) ). Good demonstration of the new features as well as using the lists.
I run the model and noticed that sometimes FlexSim freezes and I have to kill the process. It seems to be connected to the run speed - if the run speed is less than ~50 you can run the model without problems.It also runs with FastForward. Do you know the source of the freezing?
Anthony,
I'm new to Flexsim and these tutorials are great and very informative. Once again thank you for a great simulation and instructions. My apologies, I was looking at the code on a small screen and it made it difficult to read some of the code which I have now after looking at it on a larger screen. 1aStorable is actual IsStorable and what is after is &&. Best regards and please keep making these tutorials.
** May I suggest a tutorial on AGVs with crabbing capabilities, 90 degree movement without turning. Thank you.
Hey everyone,
Here's the slot assignment code:
Storage.Object current = ownerobject(c); Object item = param(1); Storage.Item storageItem = Storage.Item(item); /**Random Bay, Level, and Slot with Space*/ while (true) { int bayNum = duniform(1, current.bays.length); Storage.Bay bay = current.bays[bayNum]; int levelNum = duniform(1, bay.levels.length); Storage.Level level = bay.levels[levelNum]; int slotNum = duniform(1, level.slots.length); Storage.Slot slot = level.slots[slotNum]; if (slot.isStorable && slot.slotItems.length == 0) { storageItem.assignedSlot = slot; return 0; } }
Note that I've changed it from the model in the video. As some of you have noticed, it causes an infinite loop if you run the model too fast. Unfortunately I myself fell victim to the rotational peculiarities that may come up when using slot.hasSpace(). When you run the model fast, the rotation of the item is dependent on the last window refresh, which may end up being non-zero. This causes slot.hasSpace() to return false always, so you get into an infinite loop. So to solve, I just don't use slot.hasSpace() but just say the slot must be empty.
I want to get any other idea or ways to control the AGVs battery level (moving and charging) in KIVA model layout.
A-Star module has not the feature to control the battery level in the AGVs.
For example...
ex1) Replacing A* with AGV path line control using AGV module?
ex2) Using 'total travel distance limit' replacing with Battery level?
ex3) Aor any other way modeling?
Thanks.
There isn't anything really special about the AGV's battery level tracking, and in some cases it can be more restrictive than doing it yourself. I would suggest tracking battery level on your own using a tracked variable label on the AGV, along with using the process flow to change the discharge rate.
Once you've added the tracked variable, you can set its discharge or recharge rate in the process flow. When the rate of change for the battery level changes, (e.g. when you start a travel operation):
current.labels["BatteryLevel"].as(TrackedVariable).rate = -1;
A value of -1 would mean the discharge rate, in units per model time unit. If you're representing the tracked variable in amp hours and your model time unit is seconds, then -1 means you're discharging at 1 amp hour per model second, i.e. 3600 amps. If you're simulating battery level as a percentage, then -1 means one percent battery per second.
Thanks a lot, @anthony.johnson
I will try to do using Tracked Variables for solve my real issues.
Yes. I have the hard project about picking-up the items to the rack-cart and then picking-off to the gravity flow racks by oprators but transporting between them is done using Kiva robot system.
The layout is also some irregular and the AGV robots are self-spinning and there are battery charge points in it.
I will try to do as your guide and then If I will have some questions and issues, I will post it as other independent subject.
Thanks again very much.
If using 'Tracked Variables' label as you said above, the battery level control is possible in the case of NetworkNode with using Process Flow?
Yes, you can use tracked variables to track battery usage using any travel navigator.
我想知道這個模型是否可以在 2020 版本中做同樣的事情
"I wonder if this model can do the same in the 2020 version"
No, it requires functionality that was added to FlexSim version 21.2 in August 2021.
This is an issue that has been added to our bug list. Unfortunately I don’t have a workaround for it right now.
That flag is actually added to also include the outbound items, which would normally be ignored in the query. (Assumption would be that the user mostly wants to find an available item, not one that is already pending for transport.)
Thanks so much for the tutorial ! I am a total newbie who is learning FlexSim for a KIVA simulation contest and I was wondering if and how you can do the following.
1. Instead of creating one cart per FloorStorage slot, can you create one cart with other objects inside ? They can be objects or they can be tokens related to the cart object.
2. Instead of creating random orders, I want to create orders related to the objects/tokens inside the cart object. Then if I find the objects inside the cart object, I want to call that cart and transfer the objects to a source. I will then use this source to calculate the output.
This is a more realistic model but hard to program for a newbie.
I would really appreciate if you or anyone else can help me with explanations or simple codes on how I should go about it.
Attached is an example model of how I would start to edit the model to fit your goal.
In the FloorStorage1 Process, which creates the carts, I added a subflow that creates between 1 and 4 totes on each cart. These totes are pushed onto a global list.
Furthermore, the carts are now assigned unique 'Type' labels (1, 2, 3, ...) to alter be able to identify them.
The order generation now randomly pulls a tote from the item list (This could later be based on label values or other properties and conditions). It then looks at the Type of the cart that tote is on and writes it to the corresponding label on the token. Now, instead of just pushing the type number onto the order list, the token itself is pushed. This allows to also preserve the information which tote is ordered.
The rest of the process works as before. A robot will bring the cart with the ordered tote to one of the picking stations. You could now further alter the picking flow by having the operator actually remove the tote from the cart. (In that case the tote also has to be removed from the item list. Currently the order generation flow leaves them on the list to allow the model to run indefinitely without having to add new totes)
For more information about lists, you can refer to the respective manual section.
Hi, I have a few questions about AStar. 1. It can be seen from the picture below that the cell was not deallocated in time. What's the reason? Is there a way to deallocate through code? 2. When I simulate Kiva that can climb shelves, I need to remove Kiva's allocation of the current location cell. How to achieve this? 3. Can loading/ unloading offset be implemented in AStar Navigator? ( The load/ unload point is not exactly on the grid cell ) Thank you very much for your help!
I am having some trouble with getting the Kiva bot to deliver the cart to the station. the robot will grab the cart, turn around to return the cart to the station then stops before making it to the station, the token in the process flow will become frozen in the "Notify of Delivery" node.
Hi @Avery W , for the best support, please post a new question that includes a link to this post, as well as the model you're working with. If needed, you can mark the question as private to protect any sensitive information in the model.
Dear David, my aim is trying to build a warehouse in which 2D-shuttles drive. This looks quite similar as the Kiva model but I also need to take the battery discharging into account. Can I ask you how you did this? In my case, there are 2 options: charging when it drops below a lower bound until its upper limit or each time it waits for a request, it charges a little bit (however below the threshold requires to fully recharge).
Thanks in advance!
AR_Updated (1).fsmHi, I wanted to follow your video and do it with version 24.1. However, I encountered some problems. I could not solve the problem completely. Can you help me? Thanks in advance.AR_Updated.fsm
One of the Task Executers is not linked to the A* Navigator. The OnCalculatePath event does not exist for this TE and thus you get an error about an invalid triggering event for the Event-Triggered Source in the Dynamic Barrier Management.
The Run Animation and Stop Animation activities look for an object named "Picker" in the picking stations. The operators in your model are named differently and two stations do not have one at all.
In the Slot Assignment Strategy, replace the "hasSpace" expression with a check whether the slot is currently empty. If the cart has a non-right-angle rotation when the code is run, it will fit into no slot and FlexSim crashes due to an infinite loop. This is actually mentioned in Anthony's top comment on this post.
I tried recreating the model and my model is in a loop after 3 hours and will not move. Can you help me see where i maybe causing this. I tried to compare with the file provided but to no avail.Kiva Rack Modeling.fsm
The floor storage in your model has a height of 1m, so the carts do not fit into any slot and the Slot Assignment Strategy gets stuck in an infinite trying to find a slot.
You can increase the height of the storage but the issue can reappear later if the carts are rotated at a non-right angle when trying to find a slot.
I would suggest you follow the advise from Anthony's top comment and search for an empty slot rather than a slot "with space".
Hello, Thanks a lot @anthony.johnson
I am trying to modify this model to use data coming from an Excel file. The file contains columns for OrderID, OrderLine, SKU, Quantity, and Time. I have already created a Global Table in FlexSim named OrderTable
for this Excel file and added a Scheduled Source to generate orders. However, the process is not straightforward, and I need some guidance. Also, How I can Attribute an initial inventory to carts in the model and visually display the parts/items stored in these carts.
How I can Include charge stations for robots and integrate them into the workflow.
I would appreciate any detailed instructions or examples you can provide to help me implement these features.
Thank you in advance for your help!
Best regards