# QB4 MobOLAP: A Vocabulary Extension for Mobility OLAP on the Semantic Web
## 4 Results and Discussion
### Defining MD Data Instance in QB4 MobOLAP
FILTER ((?oName!= 'Factory') && (?year = 2019))]  
GROUP BY?lplate  
Query#5: Compute the average queue time in Palm Oil Mills (POM) by each truck owner in 2019. The query involves some operations roll-up along the Truck dimension, computation of the queue time, and slicing operations performed for the Time dimension. The truck timespan, in a radius of 100 m from the loading ramp POM, defines the queue time. SELECT?oName  
(AVG(jsfn:Duration(jsfn:insideRadius(?drroute,?PMOGeo,100)))) as  
?AverageQueueTime)  
WHERE {  
?obs rdf:type qb:Observation;  
ffb:truckKey?truckKey;  
ffb:dateKey?dateKey;  
ffb:Route?drroute;  
ffb:plantationKey?plantationKey. ?dateKey qb4o:memberOf ffb:date;  
ffb:year?year. ?plantationKey qb4o:memberOf ffb:plantation;  
ffb:plantationGeo?plantationGeo;  
ffb:PMOGeo?PMOGeo. ?truckKey qb4o:memberOf ffb:truck;  
ffb:ownerName?oName. FILTER (?year = 2019)  
GROUP BY?oName  
Query#6: Compute the total Palm FFB harvest of each adfeling and block in the year between 2017 and 2019. This query involves some roll-up operations along the spatial dimension (afdeling and block), spatial computation of insideGeometry, slicing operations for periods, and spatial slice function. SELECT  
?afdelingName?blockName  
(SUM(jsfn:AtTimeStamp(?dload,(jsfn:EndTime  
(jsfn:GetTime(jsfn:insideGeometry(?droute,?blockGeo))))))-  
jsfn:AtTimeStamp(?dload,(jsfn:StartTime  
(jsfn:GetTime(jsfn:insideGeometry(?droute,?blockGeo))))) as?PSum)  
WHERE{  
?obs rdf:type qb:Observation;  
ffb:truckKey?truckKey;  
ffb:datekey?dateKey;  
ffb:Load?dload;  
ffb:Route?droute. ?dateKey qb4o:memberOf ffb:date;  
ffb:year?year. ?afdelingKey qb4o:memberOf ffb:afdeling;  
ffb:adfelingGeo?afdelingGeo;  
ffb:addelingName?afdelingName. ?blockKey qb4o:memberOf ffb:block;  
ffb:blockGeo?blockGeo;  
ffb:blockName?blockName. FILTER((?year >=2017)&&(?year  
<=2019)&gego:sfWithin(?blockGeo,?afdelingGeo))  
GROUP BY?afdelingName?blockName  
The prefixes used in this query are:  
* jsfn: <[[http://www.ontotext.com/jsf](http://www.ontotext.com/jsf)]([http://www.ontotext.com/jsf](http://www.ontotext.com/jsf))>
* rdf: <[[http://www.w3.org/1999/02/22-rdf-syntax-ns#](http://www.w3.org/1999/02/22-rdf-syntax-ns#)]([http://www.w3.org/1999/02/22-rdf-syntax-ns#](http://www.w3.org/1999/02/22-rdf-syntax-ns#))>
* qb: <[[http://purl.org/linked-data/cube#](http://purl.org/linked-data/cube#)]([http://purl.org/linked-data/cube#](http://purl.org/linked-data/cube#))>
* ffb: <[[http://www.uaiy.ac.id/ffbi/](http://www.uaiy.ac.id/ffbi/)]([http://www.uaiy.ac.id/ffbi/](http://www.uaiy.ac.id/ffbi/))>
* qb4o: <[[http://www.w3.org/2001/XMLSchema#](http://www.w3.org/2001/XMLSchema#)]([http://www.w3.org/2001/XMLSchema#](http://www.w3.org/2001/XMLSchema#))>
* geof: <[[http://www.opengis.net/def/function/geosparql/](http://www.opengis.net/def/function/geosparql/)]([http://www.opengis.net/def/function/geosparql/](http://www.opengis.net/def/function/geosparql/))>
* ffbi: <[[http://www.uaiy.ac.id/ffbi/instance#](http://www.uaiy.ac.id/ffbi/instance#)]([http://www.uaiy.ac.id/ffbi/instance#](http://www.uaiy.ac.id/ffbi/instance#))>  
Table 3 shows the experimental results for the six queries after five executions. Queries were executed many times to ensure optimal cache usage. It was shown that the Mobility DW on the SW has a convenient, simple model and expressive performance (below 3 s for regular OLAP query, below 1 min for spatiotemporal OLAP query with spatial slice combination, and approximately 2 min for OLAP query with extensive spatial slice combination). The spatial operations made the queries take a longer time. The usage of mobility fact measures in the DW adds query expressiveness and prevents extensive joining, as was the case for the previous segment trajectories proposal. Developing a detailed performance analysis as a comprehensive set of experiments is outside the scope of this paper and is planned in future work.