'SWRL Rules in Protege 5.5.0

I have 2 Classes(Agent and Penalty). Also, I have hasPoint(Penalty) and hasWeight(Agent) data properties. When I write this SWRL Rule, I got an error:

Agent(?a) ^ hasWeight(?a,?x) ^ Penalty(?p) ^ hasPoint(?p,?y) ^ swrlb:add(?z,?x,?y) -> hasWeight(?a,?z)

After this rule, my Reasoner doesn't work. But if I write like this, it works:

Agent(?a) ^ hasWeight(?a,100) ^ Penalty(?p) ^ hasPoint(?p,200) ^ swrlb:add(?z,100,200) -> hasWeight(?a,?z)

But I have created some instances. I don't need to put values manually. I want to add automatically. How can I solve it?

ERROR 15:36:25 An error occurred during reasoning: GC overhead limit exceeded. java.lang.OutOfMemoryError: GC overhead limit exceeded

WARN 15:36:43 Protege terminated reasoner.

ERROR 15:36:43 Internal reasoner error: {} java.lang.OutOfMemoryError: GC overhead limit exceeded

ERROR 15:37:28 Uncaught Exception in thread 'AWT-EventQueue-0' java.lang.OutOfMemoryError: GC overhead limit exceeded

ERROR 15:37:32 Uncaught Exception in thread 'AWT-EventQueue-0' java.lang.OutOfMemoryError: GC overhead limit exceeded



Solution 1:[1]

Assigning more memory could be a solution. If you are using a windows machine:

Steps:

  1. Open the run.sh file in choice of text editor.
  2. Try increasing the value associated with -Xmx (Describes the initial memory that will be allocated).

For more details check the "Start Protege from the command line" section on this link: https://protegewiki.stanford.edu/wiki/Setting_Heap_Size

Hope this helps!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1