Skip to content

Commit

Permalink
Update nfinst tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed Jan 25, 2018
1 parent 5ab0f64 commit 5637847
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
23 changes: 23 additions & 0 deletions flattening/modelica/scodeinst/Comment1.mo
@@ -0,0 +1,23 @@
// name: Comment1
// keywords:
// status: correct
// cflags: -d=newInst
//

model Comment1 "class comment"
Real x "component comment";
equation
x = 1 "equation comment";
algorithm
x := 1 "statement comment";
end Comment1;

// Result:
// class Comment1 "class comment"
// Real x "component comment";
// equation
// x = 1.0 "equation comment";
// algorithm
// x := 1.0 "statement comment";
// end Comment1;
// endResult
6 changes: 3 additions & 3 deletions flattening/modelica/scodeinst/InStreamFlowThreshold.mo
Expand Up @@ -55,9 +55,9 @@ end InStreamFlowThreshold;
// a.s2.r = a.s3.r;
// a.s2.r = a.s1.r;
// (-a.s2.f) + (-a.s3.f) + (-a.s1.f) = 0.0;
// a.s1.s = (max(a.s3.f, 2.0) * a.s3.s + max(a.s2.f, 2.0) * a.s2.s) / (max(a.s3.f, 2.0) + max(a.s2.f, 2.0));
// a.s3.s = (max(a.s1.f, 2.0) * a.s1.s + max(a.s2.f, 2.0) * a.s2.s) / (max(a.s1.f, 2.0) + max(a.s2.f, 2.0));
// a.s2.s = (max(a.s1.f, 2.0) * a.s1.s + max(a.s3.f, 2.0) * a.s3.s) / (max(a.s1.f, 2.0) + max(a.s3.f, 2.0));
// a.s1.s = (max(a.s3.f, 2.0) * a.s3.s + max(a.s2.f, 2.0) * a.s2.s) / (max(a.s3.f, 2.0) + max(a.s2.f, 2.0)) " equation generated from stream connection";
// a.s3.s = (max(a.s1.f, 2.0) * a.s1.s + max(a.s2.f, 2.0) * a.s2.s) / (max(a.s1.f, 2.0) + max(a.s2.f, 2.0)) " equation generated from stream connection";
// a.s2.s = (max(a.s1.f, 2.0) * a.s1.s + max(a.s3.f, 2.0) * a.s3.s) / (max(a.s1.f, 2.0) + max(a.s3.f, 2.0)) " equation generated from stream connection";
// a.s1.f = 0.0;
// a.s2.f = 0.0;
// a.s3.f = 0.0;
Expand Down
6 changes: 3 additions & 3 deletions flattening/modelica/scodeinst/InStreamNominalThreshold.mo
Expand Up @@ -55,9 +55,9 @@ end InStreamNominalThreshold;
// a.s2.r = a.s3.r;
// a.s2.r = a.s1.r;
// (-a.s2.f) + (-a.s3.f) + (-a.s1.f) = 0.0;
// a.s1.s = (max(a.s3.f, 1e-07) * a.s3.s + max(a.s2.f, 1e-07 * 2000.0) * a.s2.s) / (max(a.s3.f, 1e-07) + max(a.s2.f, 1e-07 * 2000.0));
// a.s3.s = (max(a.s1.f, 1e-07 * 0.001) * a.s1.s + max(a.s2.f, 1e-07 * 2000.0) * a.s2.s) / (max(a.s1.f, 1e-07 * 0.001) + max(a.s2.f, 1e-07 * 2000.0));
// a.s2.s = (max(a.s1.f, 1e-07 * 0.001) * a.s1.s + max(a.s3.f, 1e-07) * a.s3.s) / (max(a.s1.f, 1e-07 * 0.001) + max(a.s3.f, 1e-07));
// a.s1.s = (max(a.s3.f, 1e-07) * a.s3.s + max(a.s2.f, 1e-07 * 2000.0) * a.s2.s) / (max(a.s3.f, 1e-07) + max(a.s2.f, 1e-07 * 2000.0)) " equation generated from stream connection";
// a.s3.s = (max(a.s1.f, 1e-07 * 0.001) * a.s1.s + max(a.s2.f, 1e-07 * 2000.0) * a.s2.s) / (max(a.s1.f, 1e-07 * 0.001) + max(a.s2.f, 1e-07 * 2000.0)) " equation generated from stream connection";
// a.s2.s = (max(a.s1.f, 1e-07 * 0.001) * a.s1.s + max(a.s3.f, 1e-07) * a.s3.s) / (max(a.s1.f, 1e-07 * 0.001) + max(a.s3.f, 1e-07)) " equation generated from stream connection";
// a.s1.f = 0.0;
// a.s2.f = 0.0;
// a.s3.f = 0.0;
Expand Down
1 change: 1 addition & 0 deletions flattening/modelica/scodeinst/Makefile
Expand Up @@ -97,6 +97,7 @@ ClassExtendsBuiltin2.mo \
ClassExtendsMissing1.mo \
ClassMod1.mo \
ClassMod2.mo \
Comment1.mo \
CompAsFunc.mo \
ComponentAsTypeError.mo \
ComponentAttributes1.mo \
Expand Down

0 comments on commit 5637847

Please sign in to comment.