swrl reasoning using time

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

swrl reasoning using time

lynsie
Hello,
I want to create a rule (swrl) which can help to make a decision whether a
robot can executes task or no.
Each time a robot performs a task, I record the state of that robot (busy)
and the date and time of execution. At the arrival of a new task I want to
know if the robot is available at that time to perform the new task.
Could you give me some suggestions, please?



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: swrl reasoning using time

Lorenz Buehmann
without seeing the ontology, what do you expect as answer here? And never forget, reasoning in SWRL is monotonic i.e. it will not undo/negate existing facts

Hello,
I want to create a rule (swrl) which can help to make a decision whether a
robot can executes task or no.
Each time a robot performs a task, I record the state of that robot (busy)
and the date and time of execution. At the arrival of a new task I want to
know if the robot is available at that time to perform the new task. 
Could you give me some suggestions, please? 



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: swrl reasoning using time

Michael DeBellis-2
In reply to this post by lynsie
Lynsie, You may know this already but there is a very rich set of built-ins in SWRL for reasoning about time. They are documented here:  https://github.com/protegeproject/swrlapi/wiki/ModellingTime  

As Lorenz said SWRL is monotonic which is very different than most rule languages and virtually all programming languages. It can be a bit of a pain sometime because things that seem so obvious in a programming language (change the value of x from 1 to 2) can't be done. But it sounds to me like you've hit on one of the ways around that which is to timestamp your data. So you can't use SWRL to change the hasState property of a Robot from Available to Active but you can do things like have the state be maintained by an ordered list of tuples that include the time and the state at that time. For example you could create a class like State with 3  properties: one a data property (call it hasTimeStamp with range xsd:dateTime), the second an object property that points to the object the state is for (isStateFor, the inverse of hasState) and the third an object property called hasAvailability with range Availability which is an enumerated class with perhaps 2 values: {Busy, Available}. The current state of any Robot is just the hasState value it has with the most recent timestamp. 

I would recommend you also check out the following paper, I think you can find a PDF by googling but if you want it and can't find it let me know, I'm pretty sure I have a copy on my iPad:

"A Method for Representing and Querying Temporal Information in OWL" M. J. O'Connor and A. K. Das. Biomedical Engineering Systems and Technologies (Selected Papers), Springer Verlag, CCIS 127, 97-110, 2011.

Michael



On Thu, Jul 4, 2019 at 2:29 AM lynsie <[hidden email]> wrote:
Hello,
I want to create a rule (swrl) which can help to make a decision whether a
robot can executes task or no.
Each time a robot performs a task, I record the state of that robot (busy)
and the date and time of execution. At the arrival of a new task I want to
know if the robot is available at that time to perform the new task.
Could you give me some suggestions, please?



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: swrl reasoning using time

tomekldc
Hi,

I'm working on a similar project as Lynsie and I'm asking myself if
ontologies would face high latency while reasonning on a lot of individuals
/State/.
In other words : is it risky to use ontologies when adding this kind of
temporal dimension, because of performance issue ?

Thank you for your help,

Thomak



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: swrl reasoning using time

Igor Toujilov-2
Hi Thomak,
Also I see other people asking similar questions about "dynamic ontologies".
This is essentially about bringing OWL reasoning into running applications.
Currently I am not aware of examples of such applications. However I think we are just about to enter the ontological era in the main-stream software engineering when such applications will become widespread.
The reasoning performance/scalability is a serious challenge. But I have a feeling that, carefully designing domain-specific application architectures with restricted reasoning, we can overcome this issue.
Other issues might be even more challenging: a lack of low-level tools/utilities for reasoning (OS drivers and kernels), insufficient education in OWL-DL, etc.

Cheers,
Igor


> Sent: Thursday, July 11, 2019 at 1:17 PM
> From: "tomekldc" <[hidden email]>
> To: [hidden email]
> Subject: Re: [protege-user] swrl reasoning using time
>
> Hi,
>
> I'm working on a similar project as Lynsie and I'm asking myself if
> ontologies would face high latency while reasonning on a lot of individuals
> /State/.
> In other words : is it risky to use ontologies when adding this kind of
> temporal dimension, because of performance issue ?
>
> Thank you for your help,
>
> Thomak
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: swrl reasoning using time

Michael DeBellis-2
In reply to this post by tomekldc
In reply to Thomak's question, and this is just my opinion, there are people on the list who have more experience and knowledge than I do. But I don't think performance is the main issue (in spite of what I said in an earlier message). I think the main question is do you understand the Open World Assumption and the fact that (as a result of OWA) OWL doesn't support negation as failure and that because you are using a subset of First Order Logic (Description Logic) you don't have non-monotonic reasoning. 

When I think about reasoning about the state of something my first thought is I just have a variable that keeps track of the state, say for each Robot and that I have a predefined set of possible states: Active, Available, Offline, etc. Then when I have my methods (or any type of code) do something like assign a robot to a task I change the state. You can't do that with SWRL. There have been several examples described by people for more complex solutions. They are mostly variants of something that is a very old idea in AI. When you do temporal reasoning you keep track of state at time T rather than just change the state variable. But this is a slightly more complex architecture than just writing a method where the robot changes it's internal state variable (and there will be more overhead because every change in state is now recorded, although that can also be a big benefit for debugging or exploring parallel alternative hypothetical "worlds" in a simulation). 

I think the rich knowledge representation of OWL often means it's worth doing the extra work. And it's not that difficult, but it does take some time, either to make the more complicated architecture or also to use something like SPARQL or Apache Jena where you aren't bound by these same restrictions. So there's a bigger learning curve than say just starting to write objects in a language like Java. But over the long term the ability to have the classifier, all the things you can represent very elegantly by property hierarchies, inverses, transitive properties, etc. All that stuff can be very powerful and often worth the effort. 

That last one about properties is one thing I think many people who use OWL don't fully appreciate. When you understand that properties are relations as in FOL and that they can be in hierarchies just like any other set you can do a lot of reasoning just by setting up some properties correctly. In one ontology I developed I started using that a lot. For example I would have properties like participatesIn for all Agents that participate in an Event and responsibleFor which was a sub-property of the property participatesIn. Some Agent's were responsibleFor an Event (i.e., they caused it) but others were just effected by it. I recommend doing the Manchester FHKB tutorial it really highlights this capability. 

Michael

On Thu, Jul 11, 2019 at 5:17 AM tomekldc <[hidden email]> wrote:
Hi,

I'm working on a similar project as Lynsie and I'm asking myself if
ontologies would face high latency while reasonning on a lot of individuals
/State/.
In other words : is it risky to use ontologies when adding this kind of
temporal dimension, because of performance issue ?

Thank you for your help,

Thomak



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: swrl reasoning using time

Mike Bergman

Hi Michael,

Excellent point, and I agree often overlooked:

On 7/12/2019 5:57 PM, Michael DeBellis wrote:

That last one about properties is one thing I think many people who use OWL don't fully appreciate. When you understand that properties are relations as in FOL and that they can be in hierarchies just like any other set you can do a lot of reasoning just by setting up some properties correctly. In one ontology I developed I started using that a lot. For example I would have properties like participatesIn for all Agents that participate in an Event and responsibleFor which was a sub-property of the property participatesIn. Some Agent's were responsibleFor an Event (i.e., they caused it) but others were just effected by it. I recommend doing the Manchester FHKB tutorial it really highlights this capability.

Mike


Michael

On Thu, Jul 11, 2019 at 5:17 AM tomekldc <[hidden email]> wrote:
Hi,

I'm working on a similar project as Lynsie and I'm asking myself if
ontologies would face high latency while reasonning on a lot of individuals
/State/.
In other words : is it risky to use ontologies when adding this kind of
temporal dimension, because of performance issue ?

Thank you for your help,

Thomak


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user