Suppose i have Event e, which hasStartTime t1 and hasEndTime t2. To calculate the duration using SWRL of the event in minutes i use this rule :

Event(?e)  ∧
hasStartTime(?e, ?t1)  ∧
hasEndTime(?e, ?t2)  ∧
temporal:duration(?d, ?t1, ?t2, temporal:Minutes)
  → hasDuration(?e, ?d)

?d is return value in a minute .

Advertisements