Allocating Resource ID for the resources in Simevents

1 次查看(过去 30 天)
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

采纳的回答

Abdolkarim Mohammadi
编辑:Abdolkarim Mohammadi 2020-5-27
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 个评论
Tashrif Yusuf
Tashrif Yusuf 2020-6-2
I found out a small workaround to this problem if the system is having a single bot. I created an array in matlab with the first coloumn the serial number, 2nd, 3rd and 4th coloumn the x,y and z location for the particular order. If i have 360 orders, i created 360 lines with the x,y,z information in an array called order_details.
This is the code i have in entity generator. If the entity id is matching with my order_details array then i give the value of x,y,z. After finishing the order, i am sending it to return path which will be 'yreturn', 'xreturn', 'zreturn' details which i can take from the next order in the queue as shown in the last line of the code.
I believe this will work for a system with only one bot because the same bot will have to come to service the next order. But, if there are more bots in the system i am not sure how to do this.
Hope i was able to explain the issue i have. Do you think there is a way in simevents to solve this isssue?
Abdolkarim Mohammadi
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 SimEvents 的更多信息

产品


版本

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by