how to implement instance relations on the class level

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

how to implement instance relations on the class level

Abel tan
Hi,


Say I have a class called Cat, and a class called Fish.

All Cats eat Fish.  Eats is a property of Cat. It has a value of Fish.


Now I have an instance of Cat called My_Cat. And I have an instance of Fish called My_Fish. My_Cat eats Fish, so it eats My_Fish by default.

However when I create the property : Eats on the Cat class, then My_Fish is not in the Indirect_Eats of My_Cat.

How do I implement that "My_Cat eats My_Fish" without having to explicitly set the property Eats on My_Cats?
Reply | Threaded
Open this post in threaded view
|

Re: how to implement instance relations on the class level

Jiba
Administrator
Hi,

You defined the relation at the class level, so it is not directly accessible at the instance level.

If you want to "propagate" the relation to the instance level, you may run the reasoner, with the infer_property_values=True argument.

Jiba