0 Votes

Getting started with Co-Simulation

Last modified by superadmin on 2025/01/14 17:42

Previous (setup_MATLAB)     |     Back to Start     |     Next (Setup_ICE-model)

Running the simulations

To start the co-simulation, the total time should be setup in ICE under the Simulation tab in the Custom Simulation and should be of the same length as that used in the Python script or MATLAB. The startup period should be set to 0 in ICE or you can use a periodic simulation with only one period. 

Make sure to run the 64-bit solver in ICE, the “run 32-bit solver” under Options->Preferences->General should be unchecked. 

The Python script must be started first, it will write out the output of the first step and then wait for the IDA ICE model. The IDA ICE model can be started in the ordinary way by clicking the custom run button.   

MATLAB is dictating the timestep and usually starts much faster than ICE. The custom simulation is first started inside ICE until it can be seen that ICE is waiting (the simulation is not supposed to start, and the simulation progress box is opened). Then the MATLAB code can be run. 

!Note: This has been tested with Python 3.8.3 64-bit version only and IDA ICE 5.0, it might not work with other versions.

Previous (setup_MATLAB)     |     Back to Start     |     Next (Setup_ICE-model)