Hi Together,
I recently started using owlready and build ontologies. Now I want to infer multiple facts which are modeled and are feasible, but the reasoner returns just one, even if other should be possible.
(The questions are below the code)
Here the code snippet:
=========================================================================
onto = get_ontology("
http://test.org/onto.owl")
with onto:
class Cause(Thing):
def infer(self):
print("None")
class Deviation(Thing):
pass
class NoFlow(Deviation):
pass
class Vacuum(Deviation):
pass
class HighPressure(Deviation):
pass
class isCauseOf(Cause >> Deviation):
python_name = "is_cause_of"
class SuctionValveClosed(Cause):
equivalent_to = [Cause & isCauseOf.some(NoFlow | Vacuum)]
def infer(self):
print("SuctionValveClosed")
class DischargeValveClosed(Cause):
equivalent_to = [Cause & isCauseOf.some(NoFlow | HighPressure)]
def infer(self):
print("DischargeValveClosed")
deviation = NoFlow(None)
cause = Cause(is_cause_of=[deviation])
sync_reasoner()
cause.infer()
=========================================================================
And the result:
* Owlready2 * HermiT took 1.135000467300415 seconds
DischargeValveClosed
=========================================================================
How is it possible to receive both classes (DischargeValveClosed and SuctionValveClosed) since both are valid results?
Or is my way to model these coherences with owl wrong by default?
Thanks for your help in advance.
jayson