[TASK] Fire CarTireWearEvent only when car is moving.

This commit is contained in:
Jan Philipp Timme 2016-10-10 15:48:13 +02:00
parent d3b47eb9ce
commit 19ca2bd989
1 changed files with 2 additions and 0 deletions

View File

@ -399,6 +399,7 @@ public class RentACarSimulation implements Runnable {
+ "FROM <"+RentACarSimulation.DOMAIN_KNOWLEDGE_GRAPH_IRI+"> " + "FROM <"+RentACarSimulation.DOMAIN_KNOWLEDGE_GRAPH_IRI+"> "
+ "WHERE { " + "WHERE { "
+ " ?e rdf:type car:CarStatusEvent . " + " ?e rdf:type car:CarStatusEvent . "
+ " ?e car:speed ?speed . "
+ " ?e car:relatedCar ?car . " + " ?e car:relatedCar ?car . "
+ " ?car car:isCarModel ?carModel . " + " ?car car:isCarModel ?carModel . "
+ " ?carModel car:minimumTirePressure ?minTirePressure . " + " ?carModel car:minimumTirePressure ?minTirePressure . "
@ -406,6 +407,7 @@ public class RentACarSimulation implements Runnable {
+ " ?e car:tirePressure2 ?tpress2 . " + " ?e car:tirePressure2 ?tpress2 . "
+ " ?e car:tirePressure3 ?tpress3 . " + " ?e car:tirePressure3 ?tpress3 . "
+ " ?e car:tirePressure4 ?tpress4 . " + " ?e car:tirePressure4 ?tpress4 . "
+ " FILTER(?speed > 0) "
+ " FILTER(?tpress1 < ?minTirePressure || ?tpress2 < ?minTirePressure || ?tpress3 < ?minTirePressure || ?tpress4 < ?minTirePressure) " + " FILTER(?tpress1 < ?minTirePressure || ?tpress2 < ?minTirePressure || ?tpress3 < ?minTirePressure || ?tpress4 < ?minTirePressure) "
+ "}"; + "}";
QueryContainer queryContainer = new QueryContainer("getTireWear", query, true); QueryContainer queryContainer = new QueryContainer("getTireWear", query, true);