A cyber-physical system for a vehicle, the vehicle including a drivetrain containing an electric motor coupled to a propulsion system, at least one electric generator connected to an engine for delivering electrical energy to the drivetrain, an energy storage system for storing and retrieving energy, and a handling system for performing autonomous or semi-autonomous moving of the vehicle along a closed cycle path in a cyclic mode using at least sensor data, wherein the closed cycle path defines a complete round-trip for the vehicle, wherein the closed cycle path is determined based on geographical or route data, the cyber-physical system comprising:
- a sensing system, the sensing system comprising a plurality of on-board sensors for providing the sensor data for use with autonomous or semi-autonomous moving of the vehicle in a cyclic mode along a predefined closed cycle path known to the cyber-physical system;
- and
- and a control system;
- wherein the cyber-physical system is configured to equalize energy levels of the energy storage system at a closure of said closed cycle path, determined by a complete round-trip performed by the vehicle, subject to constraints on rates of change of power constraints of the energy storage system during autonomous or semi-autonomous moving of the vehicle along said closed cycle path.