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 control a hybrid powertrain, in order to achieve a shift 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 with 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 with the countershaft so that the countershaft is connected with the output shaft via the range gearbox;
- d) synchronizing the rotational speed between two rotatable components in the range gearbox with the help of a synchronization device;
- e) connecting the rotatable components via a shiftable third clutch device;
- and
- f) engaging a gear by way of connecting two rotatable components in the second planetary gear.