Allocating Resource ID for the resources in Simevents
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Tashrif Yusuf
le 18 Mai 2020
Commenté : Abdolkarim Mohammadi
le 17 Juil 2020
Hi,
I am building a model of automated warehouse. This model has vehicles as resource which will serve the orders. When one order is completed the resource is released and is available for the next order. Now, i am brining back all the vehicles to one location but in real time, the vehicle will be at different locations when the order is completed. For Eg: Once order is recieved the vehicle goes to the particular order tote, brings the order tote to the operator and takes back the order tote to the original location. These locations can be different for different orders.
So when the next order is generated, i want to know the position of the previous bot so that i can calculate the distance/time required for it to reach the next order location.
Is this something that i can do with simulink. Sorry if it is a noob question.
Regards,
Tashrif Yusuf
0 commentaires
Réponse acceptée
Abdolkarim Mohammadi
le 27 Mai 2020
Modifié(e) : Abdolkarim Mohammadi
le 27 Mai 2020
I was unable to run your model, but according to your post, I think you need to calculate the distance of the orders to the operator. If this is the case, you need to define the location of the order in the warehouse when the order is generated. I have attatched a simple model where each order has three attributes: (a) order's location in the warehouse, (b) the distance between the operator and the robot, and (c) the order serving time which is proportional to the distance. You can calculate all of these upon entity generation or upon entity entry into the Entity Server.
In the attached model, I assumed that the operator is located at coordinates [0,0,0] and the location of the generated order in the warehouse is a random triplet [x,y,z] in the range of [1,1,1] to [5,5,5]. I calculated the distance using vecnorm function, which calculates the Euclidean norm. I also assumed that it takes 2 seconds for the robot to travel 1 in the warehouse. You can customize these assumptions to match your problem. The model also outputs the attributes, which is accessible via the variable out.SimOut in the base workspace.
6 commentaires
Abdolkarim Mohammadi
le 17 Juil 2020
As far as I could understand your problem, I think you have multiple bots going around and serving orders, and one or multiple pending orders at the location of operators. You want all of the bots to memorize the location of previous orders. I think there are two ways to do this:
1) Attach an attribute to the bot named as PreviousOrderLocation. As soon as the bot reaches to rack 4, we have
entity.PreviousOrderLocation = 4;
entity.CurrentOrderLocation = 3;
2) You can also use set and get functions like SetPreviousOrderLocation and GetPreviousLocation to retain the location of the previous order. When the bot reaches to rack 4, we have:
SetPreviousOrderLocation (1, 4);
Where 1 means the first bot and 4 shows previous location for the first bot. You have to set the output signal dimension of the SetPreviousOrderLocation and input signal dimension of GetPreviousLocation to [4,1].
And when you want to calculate the distance elsewhere, you will have
PreviousLocation = GetPreviousOrderLocation (1);
to retrieve the previous position and perform further calculations. Hope this helps.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur SimEvents dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!