On Nov 16, 2007, at 11:46 AM, Mohd. Noor wrote:

Thanks

>Jess lets you define new rules, and remove old ones, while a system
>is running, and facts (like the "property" facts) can come and go all
>the time, as well.

How about the template - can we redefine the template as well as update the existing one?

Templates currently can't be redefined without removing all the rules that use them. But that's why I introduced the "property" template, you see: instead of adding a new slot to the "computer" template, you can just assert new "property" facts, linked to the "computer" facts by some identifier used as a foreign key. You'd use the same system to store arbitrary properties in a relational database, right?


Do we need install jess-engine in each broker? or it can be embedded with Java?


Jess is a programmer's library, embeddable in any kind of Java code. It's extremely flexible in that regard.


cheers



On Nov 16, 2007 3:40 PM, Ernest Friedman-Hill < [EMAIL PROTECTED]> wrote:
Hi,

I'm not sure how this conversation drifted into a discussion of
*alternatives* to Jess; I don't see any problem with doing this
application in Jess itself.

If you need to have properties like "service" come and go in a
running system, then the way to do that is the same way you'd do it
in any database-like system: make the property names into data. So,
for example

(deftemplate computer (slot name))
(deftemplate property (slot computer) (slot name) (slot value))
(deftemplate user-wants (slot name) (slot value))

(assert (computer (name A))
        (property (computer A) (name RAM) (value 1GB))
        (property (computer A) (name service) (value BLAST)))

The rules look a little different, but not much

(defrule find-something
    (computer (name ?c))
    (property (computer ?c) (name ?p) (value ?v))
    (user-wants (name ?p) (value ?v))
    =>
    (printout t "Computer " ?c " fits the user criteria " ?p " = " ?
v crlf))

Jess lets you define new rules, and remove old ones, while a system
is running, and facts (like the "property" facts) can come and go all
the time, as well.

In a real system, you'd probably use multiple user-wants facts at a
time, and you could use the "forall" conditional element to match
computers which meet all of them.



On Nov 16, 2007, at 2:54 AM, Mohd. Noor wrote:

> let me extend my example
>
> say
>
> > Computer A:
> >            CPu =100
> >            RAM = 1GB
> >            s/w = c++
> > Computer B:
> >           CPU =20
> >           RAM = 512M
> >           S/w =spps
> > Computer C
> >           CPU =12
> >           RAM = 2GB
> >           s/w = mathlab
> >>>       service = bioInformatic service(BLAST) - this is a new
> service
>
> with refers to Computer C, it just introduced/published in the
> broker a new attribute/property namely service. I wonder how this
> infrormation  being made available in Jess/JHCR/any other
> techniques on the fly- with that, the "user-wants" could be easily
> satisfied.
> in this case - user-wants might be "run my application with mathlab
> and use the BLAST tools" - which not priory available on the
> origional rules/facts declaration. My  requirement  is  -  my new
> rules/facts must be able be updated and evaluated of there is any
> request related at particular time.
>
> Any ideas/comments are very much welcome.
>
> mnoor
>
>
>
>
> On Nov 15, 2007 11:15 PM, Hal Hildebrand <[EMAIL PROTECTED]
> > wrote:
> The rules are compiled into classes, so yes, they are hard coded in
> that sense.  But you can compile on the fly and create new systems
> of rules.
>
> However, the question comes down to what are the constraints you
> are trying to solve?  Is it true that the constraints are changing
> and therefore you need to create a new system of constraints?  Or
> is the data changing and the system remains unchanged.   If you do
> have to change the constraint system/rules, then under what
> conditions?  Are you changing the constraint system when you could
> be modeling this as data that the constraint system uses (thus
> eliminating the need to change the constraints)?  If not, then how
> often does the constraint system change?  For example, is it a time
> based policy, like 8am - 4pm, these constraint rules are used, but
> 5pm - 7am, we use a different set?  If so, then the life cycle
> doesn't change - merely the equations/rules.  You can therefore
> create a model where you can switch in the constraint system to
> satisfy.
>
> You can also use object oriented techniques with constraints
> ( http://tinyurl.com/2rfdck ).  This would allow you to subclass,
> use polymorphism, etc, which may allow you to have an extensible
> system which doesn't require changing the constraints.
>
> There's a lot of modeling choices out there...
>
> On Nov 15, 2007, at 2:46 PM, Mohd. Noor wrote:
>
>> Yes, - I noticed that we have to consider the state of resource at
>> certain point of time.
>>  I go through the examples of JCHR, it look like that we have to
>> hardcoded the rules. Am I right/wrong?.
>>
>> Cheers
>>
>>
>>
>> On Nov 15, 2007 7:35 PM, Hal Hildebrand
>> <[EMAIL PROTECTED]> wrote:
>> There's a life cycle involved, so you're never going to get a
>> system with continuously varying state (nor would you really want
>> to), thus it has to be sampled discretely.  The result is a system
>> which triggers when the sampled values change.  Some values, like
>> hardware configuration, will change slowly.  Others, like CPU
>> load, I/O utilization, etc, will change faster.   But regardless,
>> the essential life cycle remains the same:
>>
>> sample the data - event driven, perhaps
>> set up your equations - canned, template or rule driven
>> get your solutions - multiple solutions are possible
>> choose your solution - rule driven, perhaps
>> effect the system change based on the solution
>>
>> Rinse and repeat.
>>
>> On Nov 15, 2007, at 10:38 AM, Mohd. Noor wrote:
>>
>>> Dear All
>>>
>>> Thanks for the kind replies
>>> What I am concerned is, my rules is always dynamically changes
>>> over time(e.g. CPU availability/utilisation) -with that, I cannot
>>> hard coded on the programming coding.
>>> Even their template/"deftemplate" might be changes( e.g. new
>>> software properties/a totally new hardware-such as any new
>>> instrument attached to the computer system)
>>>
>>> Is that possible with JCHR?
>>>
>>> Any suggestions are welcome
>>>
>>> Cheers
>>> mnoor
>>>
>>>
>>> On Nov 15, 2007 5:09 PM, Hal Hildebrand
>>> <[EMAIL PROTECTED]> wrote:
>>> What you are describing is constraint programming.  You can do
>>> this with Jess, but it's not exactly the best (imho) tool for the
>>> job due to what is involved.  The combinatorics are nasty in all
>>> but the simplest examples.
>>>
>>> For a constraint solver that runs (with minor tweaks) in Jess,
>>> see http://tinyurl.com/yvz98m
>>>
>>> This technique might do what you want, but you might want to look
>>> into constraint systems in Java like JCHR or even Genetic
>>> Algorithms, which are particularly good at searching large sparse
>>> spaces for solutions to constraints.
>>>
>>> On Nov 15, 2007, at 8:45 AM, Mohd. Noor wrote:
>>>
>>>> let say the user want to select the computer (resources) in
>>>> which suite their requirement- in this case user wants to run
>>>> mathlab simulation in computer(clusters) that have more than 20
>>>> CPUs available. Let consider the attributes such as CPU and
>>>> software are treated differently(whereby we can migrate the
>>>> software and licenses to the node that most appropriate with
>>>> users' resources requirements- in this case;). This rules
>>>> (contains the node A, B and C's properties/attributes) suppose
>>>> made available in the brokerage level.
>>>>
>>>> In this case the user may select the mathlab from node C and run
>>>> on node B.
>>>>
>>>> How do we transform the resources properties into the rules?
>>>> How we are going to infer the rules?
>>>> How we can apply a forward chaining and backward chaining?
>>>>
>>>> Cheers,
>>>> mnoor
>>>>
>>>>
>>>>
>>>> On Nov 15, 2007 2:42 PM, Motaz K. Saad <[EMAIL PROTECTED]>
>>>> wrote:
>>>> Could you explain more!.
>>>> Do you want to make a rule to determine computer specifications
>>>> for a given software.?
>>>>
>>>>
>>>> On Nov 15, 2007 1:48 PM, Mohd. Noor < [EMAIL PROTECTED] > wrote:
>>>> dear jess
>>>> how to make a rule from this scenario
>>>>
>>>> Computer A:
>>>>            CPu =100
>>>>            RAM = 1GB
>>>>            s/w = c++
>>>> Computer B:
>>>>           CPU =20
>>>>           RAM = 512M
>>>>           S/w =spps
>>>> Computer C
>>>>           CPU =12
>>>>           RAM = 2GB
>>>>           s/w = mathlab
>>>>
>>>> The user will request to run a software mathlab - how do the
>>>> rules look like
>>>>
>>>> cHEERS
>>>>
>>>> On Nov 15, 2007 11:44 AM, Mohd. Noor < [EMAIL PROTECTED]> wrote:
>>>> dear jess
>>>> how to make a rule from this scenario
>>>>
>>>> Computer A:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Motaz K. Saad
>>>> Computer Science Dept.
>>>> College of IT
>>>> http://motaz.saad.googlepages.com
>>>>
>>>
>>>
>>
>>
>
>

---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550                 http://www.jessrules.com

--------------------------------------------------------------------
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 owner-jess- [EMAIL PROTECTED]
--------------------------------------------------------------------



---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550                 http://www.jessrules.com

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