I want to write a NetLogo program to combine car lanes. Vehicles are located in 4 tracks divided by 3.5 meters (each patch is 1 m). The center coordinates of each band are ycor-3.75, -7.25, -10.75 and -14.25.
Vehicles have random values xcorwith values ycorin the center of one of the lanes and are sent to the right. I want the traffic to merge, so that cars moving to the center of the map ( distancexy 0 0 <50) move in the same lane by ycor = -14.25, as shown in the figure. Thus, the car already in this lane continues forward, but cars in other lanes turn 45 degrees to switch lanes, and then turn 45 degrees to the left when they reach pycor = -14.25.

Cars turn right. However, the conditions that I set to leave the car again when it reaches ycor = -14.25 do not work. Instead, the car continues to move forward, crossing the lane, as in the following figure.

My code is:
ifelse ycor = -14.25
[ fd speed ]
[ rt 45
fd speed
ifelse ycor = -14.25
[ lt 45
fd speed ]
[ fd speed ]
]
]