Run MotionSolve at the Command Prompt

Included in MotionSolve is a script which runs all three MotionSolve modules in sequence to solve the multi-body model and produce result files.

This script is called motionsolve.bat on Windows and motionsolve on Linux. It is located in the folder [install-path]\hwsolvers\scripts. You can use this script to run MotionSolve at the command prompt as follows.

  1. Open a command window [Windows] or terminal [Linux].
  2. At the command prompt, type: [install-path]\hwsolvers\scripts\motionsolve{.bat} <input_filename>.{xml|py|pyc|acf|mdl}.
    1. <input_filename>.xml - MotionSolve XML input file
    2. <input_filename>.py - MotionSolve PY input file (ASCII Python script)
    3. <input_filename>.pyc - MotionSolve compiled PY input file (binary)
    4. <input_filename>.acf - ADAMS solver command file
    5. <input_filename>.mdl - Simulink model file (for batch-mode co-simulation)
  3. To get a description of all possible command line options, type the following at the command prompt: motionsolve -help
    1. The -delay option delays the start of a MotionSolve run for the specified number of seconds. This functionality does not use licenses, computer memory, or CPU before the start of the run (the delay expires).
    2. The -delay option can only be used for a single job. Delays cannot be scheduled for multiple jobs in a queue.
    3. If the run is started using the Compute Console, the Schedule delay option should be used.
    Alternatively, you can also run MotionSolve via an executable, mbd_d{.exe}. The advantage of this method is that you can specify the MotionSolve environment variables directly, which you cannot when using motionsolve{.bat}. Usually, calling motionsolve{.bat} is the preferred method to run MotionSolve from command line.
  4. Locate the file mbd_d{.exe} in the folder [install-path]\hwsolvers\motionsolve\bin\<platform>.
  5. To run these modules, set the following environment variables as a minimum:
    1. NUSOL_DLL_DIR (Path to the MotionSolve bin directory)
    2. PATH (System path that should also include the MotionSolve bin directory)
    3. RADFLEX_PATH (Path to the license manager)
    4. LD_LIBRARY_PATH (Only on Linux machines)
    Terminating msolve{.exe} only terminates the solver module and automatically continues with the postprocess and writes the available results files (for example, .h3d, .abf, .plt); in other words, results that have been obtained until the time of termination. Terminating motionsolve{.bat} terminates all modules and no results are written. If you started MotionSolve using motionsolve{.bat} and want to terminate the simulation and continue writing result files (for example, h3d, .abf, .plt), you have to end the solver module (msolve) process directly.