TBC-ME 3.2.2; configured for SPIN Inference; incremental inference: on; single pass only (no iteration): off; file based OWL models
I need to aggregate area quantity up a part-of hierarchy and I am having issues getting the 3rd layer of aggregations to work. I am using SPIN rules to compute the aggregate quantities at each interior node layer of the hierarchy up to the root of the hierarchy. My concern is I am trying to chain SPIN rules together in a way that is inappropriate for SPIN inference or the SPIN inference configuration needs to be altered. A follow-up question is would it be better to templatize the spin rules for computing all of the multitude of aggregate statistics I need to compute? Thanks Arthur Background The hierarchy in English: A Well has Stages; Stages have Perforation Clusters and Perforation Clusters have Perforations which have area Well :wellStages Stage :stageClusters PerforationCluster SPIN Rules 0) SPIN Rule to compute cluster length 1) SPIN rules to compute the number of perforations in a cluster based on cluster length and perforations/ft parameter - OK 2) SPIN rule to compute aggregate perforated area of a perforation cluster based on the number of Perforations computed by (1) and the perforation diameter - OK. 3) SPIN rule to aggregate the PerforationCluster perforatedArea onto the Stage and it has no effect. 4) SPIN rule to aggregate Stage Perforated Area to Well to be written based on (3) if I get (3) to work I assume I can forward chain SPIN rules together like this as long as I don't introduce cycles and SPIN inference iterates. The chaining from 0) to 1) to 2) works but not from 2) to 3). I have a SPARQL query that is identical to a SPIN rule (3) with ?stage substituted for the ?this and it works but the SPIN rule does not assert the triples for the aggregates. //This SPARQL query of SPIN Rule (3) returns the correct aggregated triples in the SPARQL Tab CONSTRUCT { ?stage OR:stagePerforatedArea ?stagePerforatedArea . } WHERE { { SELECT ?stage (SUM(?area) AS ?stagePerforatedArea) WHERE { ?stage OR:stageClusters ?cluster . ?cluster OR:clusterPerforatedArea ?area . } GROUP BY ?stage } . } //This SPIN rule (3) defined on Stage does nothing CONSTRUCT { ?this OR:stagePerforatedArea ?stagePerforatedArea . } WHERE { { SELECT ?this (SUM(?area) AS ?stagePerforatedArea) WHERE { ?this OR:stageClusters ?cluster . ?cluster OR:clusterPerforatedArea ?area . } GROUP BY ?this } . } For completeness, here are my other SPIN rules defined on PerforationCluster for computing Area based on number of holes 0) Compute clusterLength CONSTRUCT { ?this OR:clusterLength ?clusterLength . } WHERE { ?this OR:clusterDeepPerforation ?clusterToe . ?this OR:clusterShallowPerforation ?clusterHeel . LET (?clusterLength := (?clusterToe - ?clusterHeel)) . } 1) Compute numberHoles CONSTRUCT { ?this OR:clusterNumberHoles ?numberHoles . } WHERE { ?this OR:clusterLength ?clusterLength . ?stage OR:stageClusters ?cluster . ?stage OR:stagePerfShotsPerFoot ?shotsPerFoot . LET (?numberHoles := (?clusterLength * ?shotsPerFoot)) . } 2) Compute cluster perforated Area CONSTRUCT { ?this OR:clusterPerforatedArea ?perforationArea . } WHERE { ?this OR:clusterNumberHoles ?numberHoles . ?stage OR:stageClusters ?this . ?stage OR:stagePerfHoleSize ?perforationDiameter . LET (?perforationArea := ((?numberHoles * afn:pi()) * math:square((?perforationDiameter / 2)))) .--
You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group.
To post to this group, send email to topbraid-composer-us...@googlegroups.com.
To unsubscribe from this group, send email to topbraid-composer-users+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/topbraid-composer-users?hl=en.