## 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 Problem

James Howison james at howison.name
Mon Oct 6 08:18:52 PDT 2008

```On 6 Oct 2008, at 8:03 AM, Michael Lodemann wrote:

> Hello,
>
> first of all: Thank you for this great tool and the great support!
> I loved working with the pizza-ontology tutorial. It helped me to
> see a
> lot of things much clearer.
>
> I wonder if it is possible to model the following scenario:
>
> A 1-D road with a starting- and an end-point as float-values
> (kilometers)
> and a road sign along the road with a 1-d position attribute.

Note sure we have enough info.  Assuming a section of road between two
towns, and a sign facing a particular direction showing the remaining
distance to the destination town (so that a two way road would be
modeled as two separate :Roads), maybe:

rdfs:label "Interstate 34" ;
:length_km "20"^^xsd:float .

:town1 rdf:type :Town ;
rdfs:label "Start Town" .

:town2 rdf:type :Town ;
rdfs:label "End Town" .

:from :town1 ;
:to :town2 ;
:start_km "7.8"^^xsd:float ;
:end_km   "17.8"^^xsd:float .

:sign1 rdf:type :Sign ;
rdfs:label "7km to End Town" ;
:dist_to_dest_km "7"^^xsd:float ;
:targetTown :town2 .

:sign1placement rdf:type :SignPlacement ;
:forSign :sign1 ;
:position "10.8"^^xsd:float . // relative to :road1
//:placed_by
//:date_placed
//:placement_algorithm

> I want to reason, if the sign position is set correctly between the
> starting- and end-point of the road.
>
> Is it possible to model this with protege-owl? And how should I start?

It might help to think about what reasoner output are you going to use
to see a problem?  Inconsistency (interesting, but hard to trace)?

Or perhaps the reasoner can infer an additional type for a sign. eg

:CorrectPlacement rdf:type owl:Class ;
rdfs:subClassOf :SignPlacement ;
rdfs:comment "A placement is correct if the
position and the content of the sign match " .

:InCorrectPlacement rdf:type owl:Class ;
rdfs:subClassOf :SignPlacement ;
rdfs:comment "A placement is incorrect if the
position and the content of the sign do not match" .

:sign1placement rdf:type :CorrectPlacement .
:sign1 rdf:type :CorrectlyPlacedSign .  // define this as a :Sign
associated with a :CorrectPlacement

// Assume an incorrectly placed sign.
:sign2placement rdf:type :InCorrectPlacement .
:sign2 rdf:type :MisplacedSign .

Then you can think about what mechanism you might use to produce the
desired result.  Since this involves math you will probably need to
look at SWRL to generate the assertions about CorrectlyPlacedSigns.
Only some reasoners, like Pellet, cope with some SWRL constructions.
Protege offers the Jess Bridge which understands some extension built-
ins for SWRL, but you probably don't need those.

Remember you could also generate the additional types for the sign
using procedural means as well (via something like Jena).

--J

```