Hi, all:
    I am a new user of the Jess. I want to write a simple clip file to
run in Jess. I wonder how I can write a function to sum up the specific
field values across all the facts. For example, I have:
(deftemplate project_plan 
        (slot Activity (type STRING))
        (slot Init_Milestone (type STRING))
        (slot Fin_Milestone (type STRING))
        (slot Actual_Finish (type STRING))
        (slot Start_Value (type INTEGER))
        (slot Earned_value (type INTEGER)))
(assert (project_plan (Activity "objectives defined")(Init_Milestone
"10-2-99")(Fin_Milestone "10-5-99")(Actual_Finish "10-5-99")(Start_Value
1) (Earned_value 1)))

(assert (project_plan (Activity "requirement documents")(Init_Milestone
"10-6-99") (Fin_Milestone "10-8-99")(Actual_Finish "10-8-99")(Start_Value
1)(Earned_value 1)))

(assert (project_plan (Activity "inspect requirements")(Init_Milestone
"10-9-99")(Fin_Milestone "10-12-99")(Actual_Finish "10-12-99")(Start_Value
1)(Earned_value 1)))

(assert (project_plan (Activity "cost-budget agreement")(Init_Milestone
"10-13-99")(Fin_Milestone "10-16-99")(Actual_Finish
"10-17-99")(Start_Value 1)(Earned_value  0)))

(assert (project_plan (Activity "volume predicted")(Init_Milestone
"10-17-99")(Fin_Milestone "10-20-99")(Actual_Finish
"10-20-99")(Start_Value 1)(Earned_value 1)))

.....

   In the above facts, I want to get summation of Earned_values in all
the facts, how I should write a clip function to do it so that it can run
in Jess ?

   Thank you very much for your help.

        Yong

---------------------------------------------------------------------
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