Running the Glue code
The
Distribution section provides a list and location of the distribution files mentioned below. To start a co-simulation, follow these steps:
a. Create a configuration script. You can create a configuration script manually with a text editor of your choice and set the options for cosim_ip and cosim_port if needed. If the models are run using different servers, you need to set cosim_ip equal to the machine's IP that runs the Glue code. You could also launch a simple GUI that will help you create the configuration script. To launch the GUI use the following command in Windows:
mdi.bat acsi
or
mdi.bat acsi configurationFileName
where mdi.bat is the standard script used to launch Adams products. The ACSI GUI will help you create a configuration script and it will prompt you to start the co-simulation. When working in Linux, the corresponding command is:
mdi -c acsi
or
mdi -c acsi configurationFileName
b. If the models' global reference frames are not coincident, select a co-simulation global reference frame. For example, the co-simulation reference frame may be coincident with the ground origin (Newtonian reference frame) of the Adams model. In the configuration script, use the options model_origin and model_orientation to setup the location and orientation of each model relative to the co-simulation global reference frame. Notice the values for model_origin must be in co-simulation units.
c. If the models have different units, select a set of arbitrary units for the ensemble co-simulation and add, in the configuration script, the set of options to set the conversion factors for each model. For example, if there is a Marc model using meters while all other models use millimeters, you may select millimeters for the co-simulation length units and use units_length = 1000 for the Marc model that uses meters. The conversion factor multiplies a value in model units to obtain a value in co-simulation units.
d. Complete the configuration script defining the topology of the co-simulation. In other words, define one process group per model. Inside each process group specify the needed options and define the interaction points.
e. If performing a stand-alone batch run, you may run the Glue code as follows in Windows:
mdi.bat acsi -glue configurationFileName
If using Linux do:
mdi -c acsi -glue configurationFileName
f. Optionally, you may launch the Glue code from the ACSI GUI. On the main menu bar, click the Run option and follow the prompts.