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.
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)
freelance simulation specialist
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.
OKey, I know I am anoying you all, but 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
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.