A computer program product comprising program code stored in a non-transitory computer-readable medium readable by a computer, said computer program product used to achieve a shifting from a low range position to a high range position, wherein the hybrid powertrain comprises an internal combustion engine;
- a gearbox with an input shaft and an output shaft;
- a range gearbox connected to the output shaft;
- a first planetary gear connected to the input shaft;
- a second planetary gear connected to the first planetary gear;
- a first electrical machine connected to the first planetary gear;
- a second electrical machine connected to the second planetary gear;
- at least one gear pair connected with the first planetary gear and the output shaft;
- and at least one gear pair connected with the second planetary gear and the output shaft, wherein the internal combustion engine is connected with the first planetary gear via the input shaft, said computer program code comprising computer instructions to cause one or more computer processors to perform the operations of:
- a) engaging a gear by way of connecting two rotatable components in the first planetary gear;
- b) connecting the at least one gear pair connected with the second planetary gear and the output shaft;
- c) connecting a sixth gear pair arranged between a countershaft and the range gearbox to the countershaft, so that the countershaft is connected with the out-put shaft via the range gearbox;
- d) controlling the range gearbox from a low range position to a neutral state, in which no torque transmission occurs through the range gearbox;
- e) controlling towards achieving a synchronous rotational speed between two rotatable components in the range gearbox with the assistance of the first electrical machine;
- f) connecting the rotatable components via a shiftable third clutch device;
- and
- g) engaging a gear by way of connecting two rotatable components in the second planetary gear.