File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
test/extensions/fmus/SimpleAdder Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ SimpleAdder.fmu is a v2 FMU built using OpenModelica. The file ` SimpleAdder.mo ` contains the
2
+ modelica source code for the model. The file ` buildFMU.mos ` is the OpenModelica script used
3
+ to build the FMU.
Original file line number Diff line number Diff line change
1
+ block SimpleAdder
2
+ parameter Real value = 1.0 ;
3
+ input Real a;
4
+ input Real b;
5
+ Real c(start = 1.0 , fixed = true );
6
+ output Real out;
7
+ output Real out2;
8
+ equation
9
+ der (c) = out;
10
+ out = a + b + value;
11
+ out2 = 2 * c;
12
+ end SimpleAdder;
Original file line number Diff line number Diff line change
1
+ OpenModelica.Scripting.loadFile("SimpleAdder.mo"); getErrorString();
2
+
3
+ installPackage(Modelica);
4
+
5
+ setCommandLineOptions("-d=newInst"); getErrorString();
6
+ setCommandLineOptions("-d=initialization"); getErrorString();
7
+ setCommandLineOptions("-d=-disableDirectionalDerivatives"); getErrorString();
8
+
9
+ cd("output"); getErrorString();
10
+ buildModelFMU(SimpleAdder, version = "2.0", fmuType = "me_cs"); getErrorString();
11
+ system("unzip -l SimpleAdder.fmu | egrep -v 'sources|files' | tail -n+3 | grep -o '[A-Za-z._0-9/]*$' > BB.log")
12
+
You can’t perform that action at this time.
0 commit comments