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