forked from cxbrooks/fmusdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial cut at port to fmusdk1.0.2 from http://www.qtronic.de/doc/fmu…
- Loading branch information
Showing
98 changed files
with
5,822 additions
and
4,393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
all: | ||
(cd src; $(MAKE)) | ||
|
||
clean: | ||
(cd src; $(MAKE) clean) | ||
|
||
distclean: clean | ||
rm -f bin/fmusim_cs* bin/fmusim_me* | ||
rm -rf fmu | ||
find . -name "*~" -exec rm {} \; | ||
find . -name "#*~" -exec rm {} \; |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
# Run a co-simulation or model exchange fmu file | ||
# Usage: fmusim cs|me model.fmu | ||
|
||
if [ $# -ne 6 ]; then | ||
cat <<EoF | ||
Usage: $0 fmi model.fmu tEnd h loggingOn csvSeparator | ||
fmi ........... cs for co-simulation or me for model exchange, required | ||
model.fmu ..... path to FMU, relative to current dir or absolute, required | ||
tEnd .......... end time of simulation, optional, defaults to 1.0 sec | ||
h ............. step size of simulation, optional, defaults to 0.1 sec | ||
loggingOn ..... 1 to activate logging, optional, defaults to 0 | ||
csvSeparator .. c for comma, s for semicolon, optional, defaults to c | ||
Try: | ||
$0 me fmu/me/bouncingBall.fmu 5 0.1 0 s | ||
EoF | ||
exit 2 | ||
fi | ||
|
||
csOrMe=$1 | ||
fmuFile=$2 | ||
|
||
# Error checking | ||
if [ "$csOrMe" != "me" -a "$csOrMe" != "cs" ]; then | ||
echo "$0: first argument must be either 'me' or 'cs', not $csOrMe" | ||
exit 3 | ||
fi | ||
|
||
if [ ! -f $fmuFile ]; then | ||
echo "$0: file '$fmuFile' does not exist?" | ||
exit 4 | ||
fi | ||
|
||
set -x | ||
bin/fmusim_${csOrMe} $2 $3 $4 $5 $6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
@echo off | ||
rem ------------------------------------------------------------ | ||
rem To run a simulation, start this batch in this directory. | ||
rem Example: fmusim fmu/dq.fmu 0.3 0.1 1 | ||
rem To build bin\fmusim.exe | ||
rem and the demo FMUs, run source\build_all.bat | ||
rem Example: fmusim me fmu/me/dq.fmu 0.3 0.1 1 c | ||
rem To build simulators bin\*.exe and FMUs, run src\build_all.bat | ||
rem ------------------------------------------------------------ | ||
|
||
set FMUSDK_HOME=. | ||
bin\fmusim.exe %1 %2 %3 %4 | ||
if %1==me (bin\fmusim_me.exe %2 %3 %4 %5 %6) else bin\fmusim_cs.exe %2 %3 %4 %5 %6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@echo off | ||
|
||
rem ------------------------------------------------------------ | ||
rem This batch simulates all FMUs of the FmuSDK and stores | ||
rem simulation results in CSV files, one per simulation run. | ||
rem (c) 2011 QTronic GmbH | ||
rem ------------------------------------------------------------ | ||
|
||
echo ----------------------------------------------------------- | ||
echo Runnig all FMUs of the FmuSDK ... | ||
|
||
echo ----------------------------------------------------------- | ||
call fmusim me fmu\me\bouncingBall.fmu 4 0.01 0 c | ||
move /Y result.csv result_me_bouncingBall.csv | ||
|
||
echo ----------------------------------------------------------- | ||
call fmusim cs fmu\cs\bouncingBall.fmu 4 0.01 0 c | ||
move /Y result.csv result_cs_bouncingBall.csv | ||
|
||
echo ----------------------------------------------------------- | ||
call fmusim me fmu\me\vanDerPol.fmu 5 0.1 0 c | ||
move /Y result.csv result_me_vanDerPol.csv | ||
|
||
echo ----------------------------------------------------------- | ||
call fmusim cs fmu\cs\vanDerPol.fmu 5 0.1 0 c | ||
move /Y result.csv result_cs_vanDerPol.csv | ||
|
||
echo ----------------------------------------------------------- | ||
call fmusim me fmu\me\dq.fmu 1 0.1 0 c | ||
move /Y result.csv result_me_dq.csv | ||
|
||
echo ----------------------------------------------------------- | ||
call fmusim cs fmu\cs\dq.fmu 1 0.1 0 c | ||
move /Y result.csv result_cs_dq.csv | ||
|
||
echo ----------------------------------------------------------- | ||
call fmusim me fmu\me\inc.fmu 15 15 0 c | ||
move /Y result.csv result_me_inc.csv | ||
|
||
echo ----------------------------------------------------------- | ||
call fmusim cs fmu\cs\inc.fmu 15 0.5 0 c | ||
move /Y result.csv result_cs_inc.csv | ||
|
||
echo ----------------------------------------------------------- | ||
call fmusim me fmu\me\values.fmu 12 12 0 c | ||
move /Y result.csv result_me_values.csv | ||
|
||
echo ----------------------------------------------------------- | ||
call fmusim cs fmu\cs\values.fmu 12 0.3 0 c | ||
move /Y result.csv result_cs_values.csv |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.