These are functions provided by the JessTab plugin to Protégé
(http://www.ida.liu.se/~her/JessTab/) which allows it to pull in the model
you build in Protégé via modeling in OWL or another ontology language and
operate on it with Jess.

It's billed as a kind of OO extension to Jess and I haven't personally
played around with it, but my suspicion is, like pretty much any generated
code system, if you want performance you're not going to want to use some
thing with a large amount of layers and lots o' layers is kind of inevitable
with this kind of system.


On 9/11/07 5:51 AM, "Wolfgang Laun" <[EMAIL PROTECTED]> wrote:

> velven wrote:
> 
>> Hi everyone, I'm new to Jess and I have some questions
>> 
>> 1) I'm using (mapclass) to map my protege classes into jess, but I found
>> 
> What is (mapclass), please?
> 
>> that the function maps all userdefined slots to be multislots although i
>> have set them to be required single cardinality and integer type in protege.
>> ie.  the generated is (multislot :X-coordinate) when what i need is (slot
>> :X-coordinate (type INTEGER))
>> The trouble occurs when i need to get the value to Java and it is identified
>> as a list and I cannot use (slot-get) as only the facts were being modified
>> during runtime (...slot-set is too costly)
>> 
> What is (slot-get) or (slot-set)?
> 
>> Though conversion is possible, I'm just wondering if theres a better way to
>> do it as the conversion seems abit wasteful and costly to my simulation's
>> execution.
>> 
>> 2)I have this rule
>> 
>> (defrule moving_aside
>> 
>> ?node1<-(object (is-a Agent)(:NAME ?n1)(:X-coordinate ?x1)(:Y-coordinate
>> ?y1)(:Behaviour ?b1&~"move_aside"&~"look_for_leader"))
>> ?node2<-  (object (is-a Agent)(:NAME ?n2&~?n1)(:X-coordinate ?x2&:(>= 1
>> (abs (- ?x2 ?x1))))(:Y-coordinate ?y2&:(>= 1  (abs (- ?y2 ?y1)))))
>> =>
>> 
>> (modify ?node1 (:Behaviour "move_aside"))
>> 
>> )
>> 
>> Basically this rule checks for another agent beside it and set its behaviour
>> to another state if present.
>> According to my test case, though this rule is never fired, its presence
>> alone slowed down the simulation with 200 agents.
>> 
> The checks resulting from the LHS are exercised each time "object" facts
> are asserted or modified. The *firing* of this rule with its simple RHS
> isn't the expensive part.
> 
> Since you write that X-coordinates are INTEGER, a comparison using
> (:X-coordinate ?x2&~?x1) might be a little faster. (But isn't either
> x-coordinate differs *or* y-coordinate differs sufficient to warrant the
> change of :Behaviour? As it stands now, *both* must differ.)
> 
> -Wolfgang
> 
> 
>> Is this due to the way i have written my rule such that for each agent,
>> atleast
>> (:X-coordinate ?x2&:(>= 1 (abs (- ?x2 ?x1))))
>> had to be checked by jess with another 199 agents? or something else?
>> 
>> welcome any suggestions to optimise, Thank you for your time
>> 
>> 
>>  
>> 
> 
> --------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the list
> (use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to