Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
EMAM2Middleware
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2Middleware
Commits
c1f68254
Commit
c1f68254
authored
May 03, 2018
by
Alexander David Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Model: True -> true, False -> false
parent
c2471afc
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
13 deletions
+16
-13
src/test/resources/ba/intersection/CollisionToStop.emam
src/test/resources/ba/intersection/CollisionToStop.emam
+2
-2
src/test/resources/ba/intersection/FirstLineIntersection.emam
...test/resources/ba/intersection/FirstLineIntersection.emam
+6
-4
src/test/resources/ba/intersection/TimeCutoffFilter.emam
src/test/resources/ba/intersection/TimeCutoffFilter.emam
+3
-3
src/test/resources/ba/intersection/TrajectoryCollision.emam
src/test/resources/ba/intersection/TrajectoryCollision.emam
+2
-1
src/test/resources/ba/util/LineIntersection.emam
src/test/resources/ba/util/LineIntersection.emam
+2
-2
src/test/resources/ba/util/MultiOr.emam
src/test/resources/ba/util/MultiOr.emam
+1
-1
No files found.
src/test/resources/ba/intersection/CollisionToStop.emam
View file @
c1f68254
...
...
@@ -33,14 +33,14 @@ component CollisionToStop<N1 n = 2,N1 x = 1>{
for
i
=
1
:
n
stopOut
(
i
)
=
F
alse
;
stopOut
(
i
)
=
f
alse
;
end
if
active
for
i
=
1
:
x
if
collisionIn
(
i
)
Z
curIndex
=
indexLookup
(
i
,
1
);
stopOut
(
curIndex
)
=
T
rue
;
stopOut
(
curIndex
)
=
t
rue
;
end
end
end
...
...
src/test/resources/ba/intersection/FirstLineIntersection.emam
View file @
c1f68254
...
...
@@ -10,18 +10,20 @@ component FirstLineIntersection<N1 m1 = 9, N1 m2 = 45>{
out
Z
linexB
,
out
Q
^{
2
,
1
}
pos
;
//
TODO
:
bug
:
must
not
always
be
earliest
crash
pos
//
TODO
:
remove
:
filter
all
with
TimeCutoff
and
MultiOr
implementation
Math
{
Z
k
=
1
;
B
found
=
F
alse
;
B
found
=
f
alse
;
for
i
=
1
:
m1
for
j
=
i
:
m1
if
found
==
F
alse
if
found
==
f
alse
if
collisionIn
(
k
)
linexA
=
i
;
linexB
=
j
;
pos
=
pointsIn
(
k
);
found
=
T
rue
;
found
=
t
rue
;
end
k
=
k
+
1
;
end
...
...
@@ -31,4 +33,4 @@ component FirstLineIntersection<N1 m1 = 9, N1 m2 = 45>{
collisionOut
=
found
;
}
}
\ No newline at end of file
}
src/test/resources/ba/intersection/TimeCutoffFilter.emam
View file @
c1f68254
...
...
@@ -34,14 +34,14 @@ component TimeCutoffFilter<N1 m = 10>(adaptable Q timeCutoff){
Q
time2
=
distp2
/
dist2
*
(
trajectoryInB
(
3
,
indexInB
+
1
)
-
trajectoryInB
(
3
,
indexInB
));
if
time1
<=
time2
aIsFasterOut
=
T
rue
;
aIsFasterOut
=
t
rue
;
else
aIsFasterOut
=
F
alse
;
aIsFasterOut
=
f
alse
;
end
collisionOut
=
abs
(
time1
-
time2
)
<
timeCutoff
;
else
collisionOut
=
F
alse
;
collisionOut
=
f
alse
;
end
}
}
\ No newline at end of file
src/test/resources/ba/intersection/TrajectoryCollision.emam
View file @
c1f68254
...
...
@@ -16,6 +16,7 @@ component TrajectoryCollision<N1 m = 10, N1 m1 = 9, N1 m2 = 45>{
instance
DualSetCompareMatrix
<
4
,
1
,
9
,
45
>
dualSetCompare
;
instance
LineIntersection
lineIntersection
[
m2
];
instance
FirstLineIntersection
<
9
,
45
>
firstLineIntersection
;
//
TODO
:
filter
then
get
first
instance
TimeCutoffFilter
<
10
>(
2.0
)
timeCutoffFilter
;
connect
trajectoryA
->
trajectoryToLinesA
.
trajectoryIn
;
...
...
@@ -39,4 +40,4 @@ component TrajectoryCollision<N1 m = 10, N1 m1 = 9, N1 m2 = 45>{
connect
dualSetCompare
.
outA
[:]
->
lineIntersection
[:].
lineA
;
connect
dualSetCompare
.
outB
[:]
->
lineIntersection
[:].
lineB
;
}
\ No newline at end of file
}
src/test/resources/ba/util/LineIntersection.emam
View file @
c1f68254
...
...
@@ -16,7 +16,7 @@ component LineIntersection{
Q
n1
=
Ay
*
Bx
-
Ax
*
By
;
Q
cutoff
=
0.00000001
;
B
res
=
F
alse
;
B
res
=
f
alse
;
//
if
lines
are
not
parallel
(
ish
)
if
(
abs
(
n1
)
>
cutoff
)
...
...
@@ -24,7 +24,7 @@ component LineIntersection{
if
(
alpha
>=
cutoff
)
&&
(
alpha
<=
1
)
Q
beta
=
(
Ax
*
Cy
-
Ay
*
Cx
)
/
n1
;
if
(
beta
>=
cutoff
)
&&
(
beta
<=
1
)
res
=
T
rue
;
res
=
t
rue
;
point
(
1
,
1
)
=
lineA
(
1
,
1
)
+
alpha
*
Ax
;
point
(
2
,
1
)
=
lineA
(
2
,
1
)
+
alpha
*
Ay
;
end
...
...
src/test/resources/ba/util/MultiOr.emam
View file @
c1f68254
...
...
@@ -5,7 +5,7 @@ component MultiOr<N1 x = 2>{
out
B
boolOut
;
implementation
Math
{
B
flag
=
F
alse
;
B
flag
=
f
alse
;
for
i
=
1
:
x
flag
=
flag
||
boolIn
(
i
);
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