Commit d947286a authored by Michael Günther Beyer's avatar Michael Günther Beyer

Merge branch 'ML_clustering' of...

Merge branch 'ML_clustering' of https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAM2Middleware into ML_clustering
parents a36e131b e36a9b05
Pipeline #93814 failed with stages
in 5 minutes and 54 seconds
......@@ -54,13 +54,13 @@
<dependency>
<groupId>net.sourceforge</groupId>
<artifactId>javaml</artifactId>
<version>0.1.7</version>
<version>0.1.5</version>
</dependency>
<dependency>
<!--dependency>
<groupId>be.abeel</groupId>
<artifactId>ajt</artifactId>
<version>2.9</version>
</dependency>
</dependency-->
<dependency>
<groupId>com.github.haifengl</groupId>
<artifactId>smile-core</artifactId>
......
......@@ -26,6 +26,11 @@
<mirrorOf>external:*</mirrorOf>
<url>https://nexus.se.rwth-aachen.de/content/groups/public</url>
</mirror>
<mirror>
<id>icm-repository</id>
<mirrorOf>icm</mirrorOf>
<url>http://maven.icm.edu.pl/artifactory/repo/</url>
</mirror>
</mirrors>
<profiles>
......@@ -57,6 +62,12 @@
<releases><enabled /></releases>
<snapshots><enabled /></snapshots>
</repository>
<repository>
<id>icm</id>
<url>http://maven.icm.edu.pl/artifactory/repo/</url>
<releases><enabled /></releases>
<snapshots><enabled /></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
......
......@@ -29,8 +29,8 @@ public class AutomaticClusteringHelper {
int index1 = subcompLabels.get(sourceCompOpt.get().getFullName());
int index2 = subcompLabels.get(targetCompOpt.get().getFullName());
res[index1][index2] = 1.0d;
res[index2][index1] = 1.0d;
res[index1][index2] = getTypeCostHeuristic(con.getSourcePort());
res[index2][index1] = getTypeCostHeuristic(con.getSourcePort());
} else {
Log.error("0xADE65: Component of source or target not found!");
}
......@@ -92,7 +92,6 @@ public class AutomaticClusteringHelper {
}
public static double getTypeCostHeuristic(MCTypeReference<? extends MCTypeSymbol> typeReference) {
//TODO: structs
if (typeReference.getName().equals("CommonMatrixType")){
double value = getTypeCostHeuristicHelper(
((ASTCommonMatrixType)((MCASTTypeSymbolReference)typeReference).getAstType()).getElementType().getName());
......
......@@ -54,11 +54,11 @@ public class AutomaticClusteringTest extends AbstractSymtabTest{
//sorted by full name: alex, combine, dinhAn, michael, philipp
double[][] expRes = {{0,1,0,0,0}
,{1,0,1,1,1}
,{0,1,0,0,0}
,{0,1,0,0,0}
,{0,1,0,0,0}};
double[][] expRes = {{0,10,0,0,0}
,{10,0,10,10,10}
,{0,10,0,0,0}
,{0,10,0,0,0}
,{0,10,0,0,0}};
for(int i = 0; i< expRes.length; i++){
for(int j = 0; j < expRes[i].length;j++){
......
package lab;
component OverallSystem{
ports in Q input[4],
out Q output[4];
instance System system1;
instance System system2;
connect input[1] -> system1.rosIn[1];
connect input[2] -> system1.rosIn[2];
connect input[3] -> system1.rosIn[3];
connect input[4] -> system1.rosIn[4];
connect system1.rosOut -> system2.rosIn[1];
connect system1.rosOut -> system2.rosIn[2];
connect system1.rosOut -> system2.rosIn[3];
connect system1.rosOut -> system2.rosIn[4];
connect system2.rosOut -> output[1];
connect system2.rosOut -> output[2];
connect system2.rosOut -> output[3];
connect system2.rosOut -> output[4];
}
\ No newline at end of file
package test;
import tests.struct.Position.Position;
component CostHeuristic{
ports in Q inQ,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment