Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] Modeling "for-each" in swrl

Michael Lodemann milo at
Mon Oct 13 04:42:58 PDT 2008

Well for two road_sections belonging to a road the following SWRL-rule
works fine:

belongsTo(?roadSec1, ?road)  ∧
to(?roadSec1, ?to_km1)  ∧
from(?roadSec1, ?from_km1)  ∧
swrlb:subtract(?roadSecLength1, ?to_km1, ?from_km1)  ∧
belongsTo(?roadSec2, ?road)  ∧
to(?roadSec2, ?to_km2)  ∧
from(?roadSec2, ?from_km2)  ∧
swrlb:subtract(?roadSecLength2, ?to_km2, ?from_km2)  ∧
swrlb:add(?totalRoadSecLength, ?roadSecLength1, ?roadSecLength2)  ∧
road_length(?road, ?road_length1)  ∧
swrlb:equal(?road_length1, ?totalRoadSecLength)
  → CorrectRoadLength(?road)

but it doesn't work for more than two road_sections. Can anyone give me a
hint how to rewrite the rule in order to perform well for n road_sections?

More information about the protege-owl mailing list