ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
Which sphere collided?
Hi to all,
Is there a way to learn which collision sphere coused a colliding? I know there is a thissphere variable determined in handle collision page but I dont know how to use it. I'm modeling an AGV system. I want to make AGV's to stop if there is another AGV infront of current AGV. I drawed two spheres for each AGV. If I make stop the AGV when a colliding occurs, two of them stops. To stop only the AGV placed behind I have to know which sphere coused the collision. Or is there another way to make it? Thanks. |
#2
|
||||
|
||||
Hi Enver (is that your first name?),
try a network an close / open network edges on arrival and exit.
__________________
kind regards Nico. |
#3
|
|||
|
|||
Thank you very much Nico.
But the network is quite large. And I also want to do this to make AGV's dont override eachother when an AGV waiting for something. PS. Yes Enver is my first name. |
#4
|
||||
|
||||
Here is a sample model using collision detection to simulate vehicle moving in one lane. The code adding collision member is in the OnExit of the source object. When the collision occurs, the one behind will be stopped. But it is not perfect. I just trying to give you the basic idea on the collision handling. Sophistic code may be required to get better result. Good luck!
__________________
Best, Alan |
The Following User Says Thank You to AlanZhang For This Useful Post: | ||
Pablo Concha (01-15-2014) |
#5
|
||||
|
||||
Hi Enver,
first you get two references to both objects(thisobject and otherobject). simply compare their positions und their destinations to travel to. After that you can decide which one should stop its traveltask. PS.: for an accurate position you probably need an repaintall() before your query. |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
Enver Burak KORCAK (09-11-2008) |
#6
|
||||
|
||||
Hi Enver,
so if you want a to modell a agv system on large network, and you want it to behave like the real system (or close to it) you have to cut the network into very small pieces and plan the path the vehicle is driving genericaly. Which means the AGV arrives , looks at the current conditions and is then send to the next short piece of drivingcourse. Be careful with driving speeds an curves, as sutch things are not reducing speed in flexsim automaticaly, but do in reality. Driving speed, acceleration and other restriction as blocking of AGV by AGV has great impact on the performance of the system and so assumptions in the model must be comunicated clearly to the customer.
__________________
kind regards Nico. |
The Following User Says Thank You to Nico Zahn For This Useful Post: | ||
Enver Burak KORCAK (09-11-2008) |
#7
|
||||
|
||||
@ Joerg Vogel
I like to add here that in my eyes a repaintall() is not enough. I guess what you have to do if you want to use locations of moving objects (transporter in a model, operator in a model, items on a conveyor) you should always use updatelocations() before reading the locations. Otherwise you might get problems with higher runspeeds. At least that’s my understanding and experience.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions." |
The Following 2 Users Say Thank You to Tom David For This Useful Post: | ||
RalfGruber (09-01-2009) |
#8
|
|||
|
|||
Hi to all.
I've solved my problem and I want to share my solution. Please find in attach the model. I used the rotations and coordinations of each object to decide which one is at front. It is enough to take a look at the handle collision code to understand how I solved it. I want to thank you Jörg Vogel your idea worked well. But sometimes the transporter at behind cuts the network and goes directly to destination after waiting. It is not allways happens but sometimes it does. How can I solve this problem? |
#9
|
|||
|
|||
Can anyone help me about the problem I marked my previous post?
The AGV's cuts the network and goes directly to the destination after collision ends. How can I make them to follow network after collision? Please find the model in attach of my last post. Thanks. |
#10
|
||||
|
||||
A reply here: http://www.flexsim.com/community/for...ead.php?t=1056
|
The Following User Says Thank You to Anthony Johnson For This Useful Post: | ||
Brandon Peterson (10-01-2009) |