A method comprising: analyzing, by a device (200, 1210, 1230), a model, the model being a model of an electrical system, a mechanical system and/or another physical system, the model being executed in co-simulation by one or more execution engines for simulating or generating a behavior of the system, the model including a first co-simulation component (104, 304, 504, 802) and a second co-simulation component (106, 306, 506, 804), the first co-simulation component (104, 304, 504, 802) and the second co-simulation component (106, 306, 506, 804) being components of the model used in the co-simulation, the first co-simulation component (104, 304, 504, 802) outputting data to the second co-simulation component (106, 306, 506, 804) via a connection (116, 314, 518, 806), determining, by the device (200, 1210, 1230), that the data is communicated from the first co-simulation component (104, 304, 504, 802) to the second co-simulation component (106, 306, 506, 804) via the connection (116, 314, 518, 806) at a discrete rate based on analyzing the model; automatically identifying, by the device (200, 1210, 1230), that an error is introduced into execution of the model when the device (200, 1210, 1230) determines that the data is communicated from the first co-simulation component (104, 304, 504, 802) to the second co-simulation component (106, 306, 506, 804) via the connection (116, 314, 518, 806) at the discrete rate based on analyzing the model, and if the device (200, 1210, 1230) determines, based on analysing the model, that the connection (116, 314, 518, 806) is declared to have or represent a value that varies continuously with time; determining, by the device (200, 1210, 1230), a location in the model to insert a compensator (524, 528) that compensates for the error, the location being determined to be inside the second co-simulation component (106, 306, 506, 804) or between the first co-simulation component (104, 304, 504, 802) and the second co-simulation component (106, 306, 506, 804) based on at least one of: information available to the one or more execution engines, used to execute the model, via an application programming interface for the second co-simulation component (106, 306, 506, 804), or computational operations applied to the data by the second co-simulation component; and inserting, by the device (200, 1210, 1230), the compensator (524, 528) at the location in the model, wherein the compensator is an algorithm to compensate for the intermediate data points generated by the first co-simulation component (104, 304, 504, 802) that are lost and/or communicated at a later time during co-simulation. analyzing, by a device (200, 1210, 1230), a model, the model being a model of an electrical system, a mechanical system and/or another physical system, the model being executed in co-simulation by one or more execution engines for simulating or generating a behavior of the system, the model including a first co-simulation component (104, 304, 504, 802) and a second co-simulation component (106, 306, 506, 804), the first co-simulation component (104, 304, 504, 802) and the second co-simulation component (106, 306, 506, 804) being components of the model used in the co-simulation, the first co-simulation component (104, 304, 504, 802) outputting data to the second co-simulation component (106, 306, 506, 804) via a connection (116, 314, 518, 806), determining, by the device (200, 1210, 1230), that the data is communicated from the first co-simulation component (104, 304, 504, 802) to the second co-simulation component (106, 306, 506, 804) via the connection (116, 314, 518, 806) at a discrete rate based on analyzing the model; automatically identifying, by the device (200, 1210, 1230), that an error is introduced into execution of the model when the device (200, 1210, 1230) determines that the data is communicated from the first co-simulation component (104, 304, 504, 802) to the second co-simulation component (106, 306, 506, 804) via the connection (116, 314, 518, 806) at the discrete rate based on analyzing the model, and if the device (200, 1210, 1230) determines, based on analysing the model, that the connection (116, 314, 518, 806) is declared to have or represent a value that varies continuously with time; determining, by the device (200, 1210, 1230), a location in the model to insert a compensator (524, 528) that compensates for the error, the location being determined to be inside the second co-simulation component (106, 306, 506, 804) or between the first co-simulation component (104, 304, 504, 802) and the second co-simulation component (106, 306, 506, 804) based on at least one of: information available to the one or more execution engines, used to execute the model, via an application programming interface for the second co-simulation component (106, 306, 506, 804), or computational operations applied to the data by the second co-simulation component; and information available to the one or more execution engines, used to execute the model, via an application programming interface for the second co-simulation component (106, 306, 506, 804), or computational operations applied to the data by the second co-simulation component; and inserting, by the device (200, 1210, 1230), the compensator (524, 528) at the location in the model, wherein the compensator is an algorithm to compensate for the intermediate data points generated by the first co-simulation component (104, 304, 504, 802) that are lost and/or communicated at a later time during co-simulation.