Re: [rules-users] VCRP - Distance calculation in getMilliDistance

2014-03-03 Thread Geoffrey De Smet
If you have enough memory, you can cache the distance from every location to every other location before Solver.solve() or in Solution.getProblemFacts(). The machineReassignment example has a similar big 2 dimensional grid for the cost of every machine to every other machine. Don't go blindly

Re: [rules-users] kie-sprind xsd for spring 4

2014-03-03 Thread Stephen Masters
Hi Mark, Thanks for getting back to me about this. Actually, when I mentioned that I was making the project public a bit prematurely, the source of the knowledge base was one of the main reasons. At the moment the rules are hard-coded in that class path location for a couple of reasons.

[rules-users] Simple aggregation problem

2014-03-03 Thread Raja Sekhar
Hi, I am using the following rule package com.demo; import com.sample.model.Product; import com.sample.model.Products; import java.util.List; import java.util.Set; dialect mvel rule Product_0 no-loop when Product(id: hlId) accumulate (e :Product(hlId == id), $sum1 : sum(e.t1) ) then

Re: [rules-users] Simple aggregation problem

2014-03-03 Thread Davide Sottara
Raja, it is not clear what you are trying to achieve. The rule might be well written or not, we don't know your requirements. If id is what it should be - an identifier - your accumulate constraint would match a single object for each Product (the original product itself), which looks suspicious.

Re: [rules-users] Simple aggregation problem

2014-03-03 Thread Raja Sekhar
Hi Davide, I am trying to group by Hild. Here first i will get the hlld into id and segregate the results by hild and sum the value t1 If you take an sql select sum(t1),hlid from product group by hild so i will get if the data is hlid t1 110 110 2 10 2 10 the result would be hiid t1 1

Re: [rules-users] NullPointerException when calling Scan manually

2014-03-03 Thread Brecht De Rooms
Dear, thanks for the quick response, I lost track of this entry due to some deadlines. I was planning to compile a package with all the necessary code but as mentioned, the issue only shows up periodically and currently I can not reproduce it anymore. A while back I wrote a hack that simply

Re: [rules-users] Guvnor - Importing Drl file and rule display order

2014-03-03 Thread mattmadhavan
Hello, I have a long drl file that was generated from a custom rule engine(due to historica reasons). I have a long list of rules - in certain order . I imported the drl file from the Gunnor GUI. I did a Create New from the knowledge Base view and chose the import drl file option. My problem is

Re: [rules-users] Guvnor - Importing Drl file and rule display order

2014-03-03 Thread Wolfgang Laun
You might be able to hack the import mechanism. (Rearranging according to sorted rule names is a poor option anyway.) But the quickest solution is, I think, to prefix each rule name in the original DRL with a generic key, e.g. 000 to 999 or similar, and to import again. Probably doesn't take more

Re: [rules-users] Guvnor - Importing Drl file and rule display order

2014-03-03 Thread mattmadhavan
Humm, Is there any other Cleaner way please? Thanks Matt'M -- View this message in context: http://drools.46999.n3.nabble.com/Guvnor-Importing-Drl-file-and-rule-display-order-tp4028432p4028460.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] Guvnor - Importing Drl file and rule display order

2014-03-03 Thread Michael Anstis
No. We sort by name within the UI. Sent on the move On 3 Mar 2014 18:48, mattmadhavan mmadha...@facs.org wrote: Humm, Is there any other Cleaner way please? Thanks Matt'M -- View this message in context:

[rules-users] How to set a the Kiebase generated by a scanner to streaming modus?

2014-03-03 Thread Brecht De Rooms
Dear Drools Users, When you create you own KieBase you can set the KieBase to streaming as follows: KieBaseConfiguration config = KieServices.Factory.get().newKieBaseConfiguration(); config.setOption( EventProcessingOption.STREAM ); However, when you use a scanner

[rules-users] accumulate Map()

2014-03-03 Thread Gopu Shrestha
This accumulate is not working.. any advice? $headers : Map() from accumulate(RulesHeader($headerName : name in ( some_ErrorInfo), $headerValue : valueAsString not in (null, )), init(Map headers = new HashMap();) action(headers.put($headerName,

Re: [rules-users] accumulate Map()

2014-03-03 Thread Wolfgang Laun
Guessing game time, huh? On 03/03/2014, Gopu Shrestha gshres...@tmghealth.com wrote: This accumulate is not working.. any advice? $headers : Map() from accumulate(RulesHeader($headerName : name in ( some_ErrorInfo), $headerValue : valueAsString not in (null, )),

Re: [rules-users] accumulate Map()

2014-03-03 Thread Gopu Shrestha
Sorry, Here is the complete code: rule map accumulate when $headers : Map() from accumulate(RulesHeader($headerName : name in (some_ErrorInfo), $headerValue : valueAsString not in (null, )), init(Map headers = new HashMap();) action(headers.put($headerName,

Re: [rules-users] accumulate Map()

2014-03-03 Thread Wolfgang Laun
Is there an import java.util.Map import java.util.HashMap in the DRL? -W On 03/03/2014, Gopu Shrestha gshres...@tmghealth.com wrote: Sorry, Here is the complete code: rule map accumulate when $headers : Map() from accumulate(RulesHeader($headerName : name in (some_ErrorInfo),

Re: [rules-users] accumulate Map()

2014-03-03 Thread grules
Thanks W, From: laune [via Drools] [mailto:ml-node+s46999n4028466...@n3.nabble.com] Sent: Monday, March 03, 2014 3:34 PM To: Gopu Shrestha Subject: Re: [rules-users] accumulate Map() Is there an import java.util.Map import java.util.HashMap in the DRL? -W On 03/03/2014, Gopu Shrestha

[rules-users] Embedding Workbench Docs Updated

2014-03-03 Thread Alexandre Porcelli
For those interested on embedding workbench editors/perspectives into your own applications, here is the doc related to it that I just pushed to our docs github repository: Embedding Workbench In Your Application As we already know, Workbench provides a set of editors to author assets in

Re: [rules-users] Embedding Workbench Docs Updated

2014-03-03 Thread Michael Anstis
Great stuff Alexandre, Could you please add the same brief text to the User Guide when you get a moment. Thanks Sent on the move On 3 Mar 2014 20:50, Alexandre Porcelli porce...@redhat.com wrote: For those interested on embedding workbench editors/perspectives into your own applications,

[rules-users] OptaPlanner - best strategy for variable number of planning entities?

2014-03-03 Thread Nadim
Hi, I'm new to OptaPlanner, and reading through the planning examples in the documentation left me with a question. One problem I'm trying to model involves a variable number of planning entities, which I didn't really see addressed by any of the examples; they all seemed to me more focused on

Re: [rules-users] Simple aggregation problem

2014-03-03 Thread Davide Sottara
Drools does not have groupBy, the rule you have written will react to each Product. You need something like: rule Acc when // get all Ids accumulate( Product( $id : id ), $ids : collectSet( $id ) ) // for each

[rules-users] Drools Guvnor : Rule validation fails - Not finding any of the fields from the Fact

2014-03-03 Thread mattmadhavan
Hello, I have imported bunch of rules (.drl file) into the Guvnor. Then I imported the Jar file containing the Facts and my Custom Operator and also the static methods into the same Guvnor package of the rules. When I try to validate the rules, I am getting errors saying that it is not able to

Re: [rules-users] High availability with a drools cluster

2014-03-03 Thread Mark Proctor
Edson will be working on building a clustered HA execution server during the spring and summer period. No details yet, he’s just starting this now. We’ll be taking a slightly different approach. Master will run and produce a incremental journal of non-reproducable state changes; such as the

Re: [rules-users] Drools Guvnor : Rule validation fails - Not finding any of the fields from the Fact

2014-03-03 Thread mattmadhavan
Humm, All my fields in the FACT/record are public fields with *No Getters and Setters*. Not sure if this is an issue! Could some one answer this please? Had a long day,, giving up and going home. will pick it up tomorrow. Thanks Matt'M -- View this message in context:

Re: [rules-users] Best Solution found but latest solution does not work

2014-03-03 Thread moltenice
Hi Ge0ffrey, thanks for your quick reply. Actually I'm quite sure it's my code, I just used brute force to enable completeness on my small problem. I've attached my problem this time just using a first fit heuristic. If you run my code you will see that the solver hits a 0hard/0soft score which

Re: [rules-users] kie-sprind xsd for spring 4

2014-03-03 Thread Mark Proctor
We do need to make it easier to unit test things. One idea is to allow annotations in a unit test to declare the subset of rules in scope for testing. The annotation could specify a package, a rule or even 1..n qualifiers. If rules have qualifier annotations on them, they would be sucked in. I

[rules-users] How to configure to reload the drools knowledge session when server(tomcat) restart using Spring

2014-03-03 Thread scarlettxu
Hi Expert, I have posted a problem about the drools session persistence in StackOverflow, but have not got answer for 10 days. http://stackoverflow.com/questions/21928187/how-to-configure-to-reload-the-drools-knowledge-session-when-servertomcat-rest/22162188#22162188 I would like to re-post the