[rules-users] Combining Drools Expert and Planner

Phani Saripalli saripalli.phani at gmail.com
Mon Sep 24 09:27:33 EDT 2012


Hi.

Thank you for the reply. I am at the moment trying with defined classes.
But got stuck at solver configuration, setting up the selectors. However I
am doing a very simple problem, just like I mention in the question earlier.

I have attached the sources of my project - solver configuration through
Java API.
I am getting errors related to Selectors & Acceptors. My solver
configuration does not have these.

My model is based on a simple rule - x > 4 and x < 6. I have set my
planning variable, value range etc.

Can you please tell me how I should handle the whole concept of
MoveFactory, selector etc.

Thank you :)

On 20 September 2012 18:17, ge0ffrey [via Drools] <
ml-node+s46999n4019878h36 at n3.nabble.com> wrote:

>
> Op 20-09-12 15:59, Phani Saripalli schreef:
>
> > Hi.
> >
> > Is it possible to combine Drools expert and planner to solve NP problems
> (or
> > some kind of model checking).
> >
> > For example, I have a model described as a .drl file
> >
> > declare Project
> > x : int
> > end
> Classes declared in the drl file aren't supported yet in Planner :(
> Feel free to make a jira for it.
>
> > And, then I have a constraint (or rule) - something like this -
> >
> >
> > rule " Rule on x"
> > agenda-group "Group 2"
> > dialect "mvel"
> > no-loop true
> >   when
> > P : Project(P.x > 5 && P.x < 7)
> > then
> > System.out.println("Rule satisfied");
> > end
> that's can be easily converted into a score rule, just replace the
> System.out with the insertLogical of the ConstraintOccurrence (see
> planner manual for more info)
> > Is it possible to obtain a value propagation mechanism by combining with
> > Planner, by which I finally get a value for x as 6 ?
> you would define a range of values for x and based on the constraint,
> planner will end up with value 6 for that Project,
> but that's not really efficient.
>
> Planner is really build to solve a case like this where you have 3
> projects Project needs an x:
>
>   when
> $p : Project(P.x > 5 && P.x < 9)
> then ...
>
> and where there are some other constraints such as:
>
>   when
> $a : Project(id == "A")
> $b : Project(id == "B", x < $a.x)
> then ...
>
>
> that result in an optimal solution of project A with x = 7, project B
> with x = 6 and project C with x= 8.
>
> > I am working on model checking for models that have various constraints,
> on
> > boolean, int, real, strings, container types and also on types that are
> > similar to C structs. There is hardly any reasoner/solver that does
> model
> > checking for constraints on such a varied types of datatypes.
> >
> > I checked planner, but defining planning variables and stuff on score
> > generation seemed to me a bit new and confusing.
> >
> > Thank you :)
> >
> >
> >
> > --
> > View this message in context:
> http://drools.46999.n3.nabble.com/Combining-Drools-Expert-and-Planner-tp4019871.html
> > Sent from the Drools: User forum mailing list archive at Nabble.com.
> > _______________________________________________
> > rules-users mailing list
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4019878&i=0>
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
> _______________________________________________
> rules-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4019878&i=1>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://drools.46999.n3.nabble.com/Combining-Drools-Expert-and-Planner-tp4019871p4019878.html
>  To unsubscribe from Combining Drools Expert and Planner, click here<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4019871&code=c2FyaXBhbGxpLnBoYW5pQGdtYWlsLmNvbXw0MDE5ODcxfC0xNTE2NTk4NDk0>
> .
> NAML<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 

Best Regards
Phani Saripalli


CompoundOne.java (208 bytes) <http://drools.46999.n3.nabble.com/attachment/4019915/0/CompoundOne.java>
DroolsTest.java (4K) <http://drools.46999.n3.nabble.com/attachment/4019915/1/DroolsTest.java>
Project.java (2K) <http://drools.46999.n3.nabble.com/attachment/4019915/2/Project.java>
PSolution.java (1K) <http://drools.46999.n3.nabble.com/attachment/4019915/3/PSolution.java>
Rules.drl (622 bytes) <http://drools.46999.n3.nabble.com/attachment/4019915/4/Rules.drl>




--
View this message in context: http://drools.46999.n3.nabble.com/Combining-Drools-Expert-and-Planner-tp4019871p4019915.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120924/22a8080e/attachment.html 


More information about the rules-users mailing list