A system for jointly controlling vehicles, comprising: a memory configured to store a traffic configuration of a zone of intersection of a first road and a second road, wherein the intersection zone includes a sequencing zone and a control zone specified in the traffic configuration , wherein the sequencing zone includes a section of the first road and a section of the second road in proximity to the intersection, and wherein the control zone includes a section of the first road and a section of the second road between the intersection and the corresponding sections of the sequencing zone ; a processor configured to group vehicles traveling on the first road and on the second road within the sequencing zone into a set of groups of the vehicles; constrain a maximum number of vehicles allowed in the control zone by preventing the vehicles of different groups to travel simultaneously in the control zone such that the first vehicle of the following group cannot pass the last vehicle of the preceding group, in order to ensure that the vehicles of different groups arrive at the intersection sequentially; determine optimal motion trajectories for the vehicles of the same group traveling in the control zone on the first and the second roads to pass the intersection by solving an optimization problem with computational complexity constrained by the maximum number of vehicles in the control zone; and transmit the optimal motion trajectories to the corresponding vehicles; wherein at least one group of the set of the groups of the vehicles includes vehicles traveling on the first road and vehicles traveling on the second road; and wherein the intersection is a highway merging point. a memory configured to store a traffic configuration of a zone of intersection of a first road and a second road, wherein the intersection zone includes a sequencing zone and a control zone specified in the traffic configuration , wherein the sequencing zone includes a section of the first road and a section of the second road in proximity to the intersection, and wherein the control zone includes a section of the first road and a section of the second road between the intersection and the corresponding sections of the sequencing zone ; a processor configured to group vehicles traveling on the first road and on the second road within the sequencing zone into a set of groups of the vehicles; constrain a maximum number of vehicles allowed in the control zone by preventing the vehicles of different groups to travel simultaneously in the control zone such that the first vehicle of the following group cannot pass the last vehicle of the preceding group, in order to ensure that the vehicles of different groups arrive at the intersection sequentially; determine optimal motion trajectories for the vehicles of the same group traveling in the control zone on the first and the second roads to pass the intersection by solving an optimization problem with computational complexity constrained by the maximum number of vehicles in the control zone; and transmit the optimal motion trajectories to the corresponding vehicles; wherein at least one group of the set of the groups of the vehicles includes vehicles traveling on the first road and vehicles traveling on the second road; and wherein the intersection is a highway merging point. <EOS>