fmusim.bat 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. @echo off
  2. rem ------------------------------------------------------------
  3. rem To run a simulation, start this batch in this directory.
  4. rem Example: fmusim me10 fmu10/fmu/me/dq.fmu 0.3 0.1 1 c
  5. rem Example: fmusim cs20 fmu20/fmu/cs/x64/dq.fmu 0.3 0.1 1 c -win64
  6. rem To build simulators and FMUs, run install.bat
  7. rem Copyright QTronic GmbH. All rights reserved.
  8. rem ------------------------------------------------------------
  9. setlocal
  10. set FMUSDK_HOME=.
  11. rem first parameter is the type of FMI simulation to run
  12. set SIM_TYPE=%1
  13. rem get all command line argument after the %1
  14. set SIM_OPTIONS=
  15. rem set x64 no none, by default we are on win32
  16. set x64=
  17. rem shift all arguments down by one
  18. SHIFT
  19. :loop1
  20. if "%1"=="-win64" (set x64=x64\) else (
  21. if "%1"=="" goto after_loop
  22. set SIM_OPTIONS=%SIM_OPTIONS% %1
  23. )
  24. shift
  25. goto loop1
  26. :after_loop
  27. if %SIM_TYPE%==me10 (bin\%x64%fmu10sim_me.exe %SIM_OPTIONS%
  28. ) else (if %SIM_TYPE%==cs10 (bin\%x64%fmu10sim_cs.exe %SIM_OPTIONS%
  29. ) else (if %SIM_TYPE%==me20 (bin\%x64%fmu20sim_me.exe %SIM_OPTIONS%
  30. ) else (if %SIM_TYPE%==cs20 (bin\%x64%fmu20sim_cs.exe %SIM_OPTIONS%
  31. ) else (echo Use one of cs10 cs20 me10 me20 as first argument))))
  32. endlocal