question

Jason Merschat avatar image
0 Likes"
Jason Merschat asked Jason Merschat edited

Crane collision detection using Travel to Location

Does Crane collision detection using Travel to Location work when driving model from Process Flow? It seems as if two cranes can violate the collision detection logic.

**Please note that I created a collision plane in the Advanced Tab using one sphere. The same effect happens with multiple collision detection spheres.

The 1st collision seems to be handled correctly. During later collisions Crane 1 does and end around to unload its box, violating the collision detection. I have also tried using negative numbers for travel distance for the crane logic with no luck.

Typically in these types of systems the cranes will move together allowing each other to pick and place. The collision detection will allow the management of picks and places with one finishing a task and the other "pushing" that crane out of the way to complete its task. I am not sure why this doesn't work using the logic in the crane collision detection script.

pf-crane-test-collisions-sanitized.fsm

I wonder if AStar can handle this or should I create a custom process flow using the OnCollision Trigger??

process flowcranecollisiontravel to locationtravel to loc
5 |100000

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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Jason Merschat edited

I would try to get more informations which tasksequence gets a higher priority depending on the age of the transported item, the distance to the destination, the length of the queue at the destination or something else. If I have decided that, I set a label at the crane, which gets the higher priority. This crane pushes the collision member in the direction of its own travel, until the crane has finished the active tasksequence.

In the case that both cranes have the same priority choose randomly which crane gets the higher priority.

· 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 Merschat avatar image Jason Merschat commented ·

Hello Jorg and thank you for the response. Indeed I am trying to get some information on priorities of task sequences; specifically how they are used in the current crane logic. I shouldn't have to recreate that logic as an end user. What you describe is how the current logic should work and if it doesn't then it needs to be fixed. I also have already set the priority of one crane over the other to test that functionality, but it is not working.

I was able to get a solution by selectively choosing the priority of Lower, Load, and Hoist as a Prioritized move and set the crane priority through process flow. I also left one crane prioritized over the other during normal traverse.

0 Likes 0 ·
Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered

So the basic Crane logic for collision was really written to be more of a template really. If you have specific logic that you need your cranes to follow, you'll have to figure out what you need and write the logic yourself. I believe the two cranes are getting hung up in the later half of the Crane collision code. If you'll look there you'll see that there is some fairly complex layers of checks involving preemption and priority.

This happens because technically, if the two cranes had the exact same priority your model would be deadlocked. Crane 2 is trying to get to the pickup and Crane 1 is trying to get to the other side, so they'd be stuck. So the basic FlexSim crane collision script wrote that last half of the code, to try and guess what priority you want the cranes to have, and to preempt their current tasks, or the previously incurred task from before, to try and best capture that.

I'm not 100% certain, but I'm willing to bet the cross over of the cranes has to do with getting muddled up in this preemption logic portion of the code, that and potentially the timing interval of how often it's checking for collision. IE if your preemption suggests that it's the other guy's turn to get out of the way, and then you don't check collisions until after the fact that the cranes have crossed, then it's going to act as if the left crane was on the right and the right crane was on the left, and further push them away, once that collision actually fires.

I'm not sure I have a solid answer on what to do. (Because I don't know what you need for you model.) But I would play around with the collision timing, as well as look into either modifying or writing your own logic for that preemption half of the crane logic. You may want it so Crane 2 always gives in and gives priority to Crane 1, or you may want the loaded crane to have priority. You'll have to write logic for that to determine that.

· 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 Merschat avatar image Jason Merschat commented ·

Hi Sam,

Thanks for the reply. I had tried tinkering with the timing and other parameters. I also set a priority label for one crane but that's not working as desired either. I'll take a deeper look but may need to know what task prioritizations are happening behind the scenes.

Jason

0 Likes 0 ·

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.