Cancel
Showing results for 
Search instead for 
Did you mean: 

finding the fastest route with sensors

Pioneer
Pioneer

Hello, I was wondering is there any little (or big) trick so that the vehicle can change lanes (from A to B) imediatly?

In my case now the vehicle drives until the end of the track turn and switch lanes. I would like to see that it is beamed from sensor on a tranck A to a sensor on a track B that is on same position. Hope it makes sense.

 

 

6 REPLIES

Re: finding the fastest route with sensors

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you need to calculate the position on the other lane, but then it works e.g. from lane A to B as sensorControl:

 

param SensorID: integer, Bug: boolean
@.move(?.B,?.A.length-?.A.sensorID(sensorID).position)

 

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: finding the fastest route with sensors

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello,

 

one thing I noticed about your model is that it takes some time to start a simulation with it. This is due to the fact that there are methods running in the background that slow it down considerably. You can optimize it by a couple of alterations. First you are often iterating through your table files, which are quite large, to find a value in a single column. You can speed that process up by using a row index and copying the values of that single column into this row index. After activating "Fast index access" in the formatting options of that row index you will see an increase in speed that almost halves the time which your simulation needs to run. Also try to keep expressions that don`t change at each iteration outside of loops and rather pass such as variables into the loop if needed. What also helps to increase performance is to use inbuilt functions to read or write from a table file instead of making own ones, as these are optimized in performance. Attached is your model with a couple of these suggestions implemented.

Kind regards,

Igor
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution


Re: finding the fastest route with sensors

Pioneer
Pioneer

Igor thank you a lot. Didn't know SimTalk have this function. This will also help in the future for sure.

Re: finding the fastest route with sensors

Pioneer
Pioneer

Is there any trick that if sensors are set Activate Only when destination that i can check them like they are activate Always? 

Re: finding the fastest route with sensors

Pioneer
Pioneer

OKey, I know I am anoying you all, but Smiley Happy Now I tried different approach. I did many different twoLaneTracks. And connect them all on many times. (Lane A with Lane A, Lane A with Lane B and Lane B with Lane A) and now vehicle is driving funny - he is skipping from one lane to antoher.

 

Why is that?


So far I just did one hall like that - the RIGHT ONE


Re: finding the fastest route with sensors

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello,

 

as far as I can see the small two lane tracks in your model are connected in such a way, that the end/beginning of one track is connected to the end/beginning of the next track, thus skipping a track. This is very likely causing the skipping, when you delete these connections, as done in the model attached, the transporter drives smoothly through the tracks.

Kind regards,

Igor
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution