A computer program comprising computer program code stored on a non-transitory computer-readable medium, said computer program product used for controlling a vehicle powertrain to overcome, or avoid, a cog-to-cog condition during gear shifting, the method performed by a control device, the powertrain comprising:
- a propulsion unit;
- and a gearbox comprising:
- an input shaft;
- a lay shaft connected to the input shaft;
- a main shaft connected to the lay shaft;
- a first gear wheel configured to be engaged to the main shaft by a first coupling sleeve, the first coupling sleeve being axially movable and rotatably fixed to the main shaft;
- and a synchromesh arrangement comprising a second coupling sleeve and configured to engage the first gear wheel and/or a second gear wheel to the input shaft, said computer program code comprising computer instructions to cause one or more control devices to perform the following operations:
- when the input shaft is rotating, controlling the synchromesh arrangement so as to induce and/or increase a difference in rotational speed between the first gear wheel and the first coupling sleeve by at least partly engaging the first gear wheel or the second gear wheel to the input shaft.