Remove simulator model(only 3 Components), add spectral to daimler model eval

parent d69df847
Pipeline #108789 failed with stages
......@@ -21,13 +21,7 @@ public class EvaluationTest {
DistributedTargetGeneratorCli.main(new String[]{"./src/test/resources/config/evaluation/supermario.json"});
}
@Ignore("Spectral: isolated vertex")
@Test
public void testSimulatorModel() {
DistributedTargetGeneratorCli.main(new String[]{"./src/test/resources/config/evaluation/simulatormodel.json"});
}
@Ignore("Spectral: isolated vertex")
@Ignore("Very long runtime(30min+)")
@Test
public void testDaimlerModel() {
DistributedTargetGeneratorCli.main(new String[]{"./src/test/resources/config/evaluation/daimler.json"});
......
......@@ -13,11 +13,7 @@
},
{
"name":"SpectralClustering",
"numberOfClusters":6
},
{
"name":"SpectralClustering",
"numberOfClusters":19
"numberOfClusters":10
},
{
"name":"Markov"
......
{
"modelsDir": "src/test/resources/simulatorModel/",
"outputDir": "target/evaluation/simulatormodel/",
"rootModel": "simulatorModel.mainController",
"generators": ["cpp"],
"writeTagFile":true,
"clusteringParameters":{
"flatten":true,
"algorithmParameters":[
{
"name":"SpectralClustering",
"numberOfClusters":3
}, {
"name":"Markov"
},
{
"name":"AffinityPropagation"
}
]
}
}
\ No newline at end of file
package simulatorModel;
import SteeringController;
import VelocityController;
import StatusController;
component MainController{
ports
in Q(0m:200m) fl,
in Q(0m:200m) fr,
in Q(0m:200m) slf,
in Q(0m:200m) slb,
in Q(0m:200m) srf,
in Q(0m:200m) srb,
in Q(0s:oos) time,
in Q(0m/s:25m/s) velocity,
in Q(-200m:200m) x,
in Q(-200m:200m) y,
out Q(-2m/s^2:2m/s^2) acceleration,
out Q(-180:180) steering,
out B status;
instance SteeringController steeringController;
instance VelocityController velocityController;
instance StatusController trigger;
connect time->velocityController.time;
connect velocity->velocityController.velocity;
connect fl->steeringControllerler.fl;
connect fr->steeringController.fr;
connect slf->steeringController.slf;
connect slb->steeringController.slb;
connect srf->steeringController.srf;
connect srb->steeringController.srb;
connect x->trigger.x;
connect y->trigger.y;
connect time ->trigger.time;
connect velocityController.acceleration->acceleration;
connect steeringController.steering->steering;
}
\ No newline at end of file
package simulatorModel;
component StatusController {
port
in Q(-200m:200m) x,
in Q(-200m:200m) y,
out B status;
implementation Math{
// the track boundaries
B boundariesX = (x > 200m) || (x < -200m);
B boundariesY = (y > 120m) || (y < -50m);
status = boundariesX || boundariesY;
}
}
\ No newline at end of file
package simulatorModel;
stream StatusControllerTest for StatusController {
x: 0m tick 200m tick -200m tick 250m;
y: 0m tick 120m tick -50m tick 50m;
status: false tick false tick false tick true;
}
\ No newline at end of file
package simulatorModel;
component SteeringController {
port
in Q(0m:200m) fl,
in Q(0m:200m) fr,
in Q(0m:200m) slf,
in Q(0m:200m) slb,
in Q(0m:200m) srf,
in Q(0m:200m) srb,
in Q(0m:200m) br,
in Q(0m:200m) bl,
out Q(-180:180) steering;
implementation Math{
Q(0m:1m) threshold = 0.1m;
Q(-1m:0m) thresholdN = -0.1m;
B comp1 = (((fl-fr) > threshold) && ((slf-slb) > threshold)) && ((srb-srf) > threshold);
B comp2 = (((fl-fr) < thresholdN) && ((slf-slb) < thresholdN)) && ((srb-srf) < thresholdN);
B comp3 = (slf<slb) && (srf<srb);
if (comp3)
steering = -1;
else
steering = 0;
end
if (comp2)
steering = 5;
end
if (comp1)
steering = -5;
end
}
}
\ No newline at end of file
package simulatorModel;
stream StatusControllerTest for StatusController {
fl: 70m tick 30 tick 32m;
fr: 70m tick 32 tick 30m;
slf: 5m tick 4m tick 5m;
slb: 5m tick 5m tick 4m;
srf: 5m tick 5m tick 4m;
srb: 5m tick 4m tick 5m;
br: 50m tick 90m tick 90m;
bl: 50m tick 90m tick 90m;
steering: 0deg tick -5deg tick 5deg;
}
\ No newline at end of file
package simulatorModel;
component VelocityController {
port
in Q(0m/s : 25m/s) velocity,
in Q(0s:oos) time,
out Q(-2m/s^2:2m/s^2) acceleration;
implementation Math{
if (velocity > 10 m/s)
acceleration = 0m/s^2;
else
acceleration = 1m/s^2;
end
}
}
\ No newline at end of file
package simulatorModel;
stream VelocityControllerTest for VelocityController {
velocity: 0m/s tick 10m/s tick 11m/s;
time: 0s tick 10s tick 11s;
acceleration: 1m/s^2 tick 1m/s^2 tick 0m/s^2;
}
\ No newline at end of file
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