Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2Middleware
Commits
7d173747
Commit
7d173747
authored
May 23, 2018
by
Alexander David Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Model: Z^{n} instead of Z^{n,1}
parent
e8a29acd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/test/resources/ba/intersection/CollisionToStop.emam
src/test/resources/ba/intersection/CollisionToStop.emam
+8
-8
No files found.
src/test/resources/ba/intersection/CollisionToStop.emam
View file @
7d173747
...
...
@@ -8,10 +8,10 @@ component CollisionToStop<N1 n = 2,N1 x = 1>{
out
B
stopOut
[
n
];
implementation
Math
{
Z
^{
n
,
1
}
counter
;
Z
^{
x
,
1
}
indexLookup
;
Z
^{
n
}
counter
;
Z
^{
x
}
indexLookup
;
for
i
=
1
:
n
counter
(
i
,
1
)
=
0
;
counter
(
i
)
=
0
;
end
Z
k
=
1
;
...
...
@@ -19,13 +19,13 @@ component CollisionToStop<N1 n = 2,N1 x = 1>{
for
i
=
1
:
maxI
Z
minJ
=
i
+
1
;
for
j
=
minJ
:
n
counter
(
i
,
1
)
=
counter
(
i
,
1
)
+
1
;
counter
(
j
,
1
)
=
counter
(
j
,
1
)
+
1
;
counter
(
i
)
=
counter
(
i
)
+
1
;
counter
(
j
)
=
counter
(
j
)
+
1
;
//
always
stop
the
last
one
to
arrive
at
the
collision
point
if
aIsFasterIn
(
k
)
indexLookup
(
k
,
1
)
=
j
;
indexLookup
(
k
)
=
j
;
else
indexLookup
(
k
,
1
)
=
i
;
indexLookup
(
k
)
=
i
;
end
k
=
k
+
1
;
end
...
...
@@ -39,7 +39,7 @@ component CollisionToStop<N1 n = 2,N1 x = 1>{
if
active
for
i
=
1
:
x
if
collisionIn
(
i
)
Z
curIndex
=
indexLookup
(
i
,
1
);
Z
curIndex
=
indexLookup
(
i
);
stopOut
(
curIndex
)
=
true
;
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment