Skip to content

Commit

Permalink
Enable test AppendElement.mo
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund authored and OpenModelica-Hudson committed Feb 27, 2018
1 parent 77367d9 commit 3e14bd2
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 18 deletions.
85 changes: 68 additions & 17 deletions flattening/modelica/arrays/AppendElement.mo
Expand Up @@ -48,23 +48,74 @@ end AppendElement;

// Result:
// class AppendElement
// Real PA[1, 3] = [1, 2, 3];
// Real PB[3, 1] = [1; 2; 3];
// Real q[3] = {1, 2, 3};
// Real XA1[1, 4];
// Real XA2[1, 4];
// Real XA3[1, 4];
// Real XA4[1, 4];
// Real XB1[4, 1];
// Real XB2[4, 1];
// Real y[4];
// Real PA[1,1];
// Real PA[1,2];
// Real PA[1,3];
// Real PB[1,1];
// Real PB[2,1];
// Real PB[3,1];
// Real q[1];
// Real q[2];
// Real q[3];
// Real XA1[1,1];
// Real XA1[1,2];
// Real XA1[1,3];
// Real XA1[1,4];
// Real XA2[1,1];
// Real XA2[1,2];
// Real XA2[1,3];
// Real XA2[1,4];
// Real XA3[1,1];
// Real XA3[1,2];
// Real XA3[1,3];
// Real XA3[1,4];
// Real XA4[1,1];
// Real XA4[1,2];
// Real XA4[1,3];
// Real XA4[1,4];
// Real XB1[1,1];
// Real XB1[2,1];
// Real XB1[3,1];
// Real XB1[4,1];
// Real XB2[1,1];
// Real XB2[2,1];
// Real XB2[3,1];
// Real XB2[4,1];
// Real y[1];
// Real y[2];
// Real y[3];
// Real y[4];
// equation
// XA1 = [PA, 4];
// XA2 = cat(2, PA, {{4}});
// XB1 = [PB; 4];
// XB2 = cat(1, PB, {{2}});
// y = cat(1, q, {4});
// XA3 = [(-1), zeros(1, 2), 1];
// XA4 = cat(2, {{(-1)}}, zeros(1, 2), {{1}});
// PA = {{1.0, 2.0, 3.0}};
// PB = {{1.0}, {2.0}, {3.0}};
// q = {1.0, 2.0, 3.0};
// XA1[1,1] = PA[1,1];
// XA1[1,2] = PA[1,2];
// XA1[1,3] = PA[1,3];
// XA1[1,4] = 4.0;
// XA2[1,1] = PA[1,1];
// XA2[1,2] = PA[1,2];
// XA2[1,3] = PA[1,3];
// XA2[1,4] = 4.0;
// XB1[1,1] = PB[1,1];
// XB1[2,1] = PB[2,1];
// XB1[3,1] = PB[3,1];
// XB1[4,1] = 4.0;
// XB2[1,1] = PB[1,1];
// XB2[2,1] = PB[2,1];
// XB2[3,1] = PB[3,1];
// XB2[4,1] = 2.0;
// y[1] = q[1];
// y[2] = q[2];
// y[3] = q[3];
// y[4] = 4.0;
// XA3[1,1] = -1.0;
// XA3[1,2] = 0.0;
// XA3[1,3] = 0.0;
// XA3[1,4] = 1.0;
// XA4[1,1] = -1.0;
// XA4[1,2] = 0.0;
// XA4[1,3] = 0.0;
// XA4[1,4] = 1.0;
// end AppendElement;
// endResult
2 changes: 1 addition & 1 deletion flattening/modelica/arrays/Makefile
Expand Up @@ -3,6 +3,7 @@ TEST=../../../rtest -v
TESTFILES=\
ABCDsystem.mo \
AdvancedDimensions.mo \
AppendElement.mo \
Array10.mo \
Array11.mo \
Array12.mo \
Expand Down Expand Up @@ -160,7 +161,6 @@ XPowers3.mo \
# test that currently fail. Move up when fixed.
# Run make testfailing
FAILINGTESTFILES=\
AppendElement.mo \
Array5.mo \
Array6.mo \
ArraySlice.mo \
Expand Down

0 comments on commit 3e14bd2

Please sign in to comment.