Re: [rules-users] Drools Planner : multiple planning entities
I have choosen the SolutionInitializer way, and am trying to make it work. However I still have two questions that will need some help from you : 1 - A variable of a planning entity class can be itself a planning entity ? I take actually the cloudBalancing for example : It's possible to make of the cloudComputer class a planning entity class with a variable ( State which change the cpuPower instead of being constant ) ? this variable takes values via /ValueRangeFromPlanningEntityProperty/ from a list defined in the computerCloud. 2 - My second question is related to the first question example, the list defined as /ValueRangeFromPlanningEntityProperty/ has to be added in the facts of the solution ? if yes, how can I do that, given that each cloudComputer has his proper list. I hope that you see clearly what I need. Thank you so much !! -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Planner-multiple-planning-entities-tp3878013p3899054.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Guvnor Uploads without Eclipse
Hi I am currently looking at building a custom maven task that uploads BPMN definitions from a project to a remote Guvnor installation. I was looking at the current Eclipse Guvnor plugin and noticed lots of code around Eclipse (which makes sense :)) . I was wondering whether there was any generic code that I could take a look at without using eclipse dependencies? Any help would be appreciated. Thanks ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using accumulate function-Performace Issues
Hi , I have used the modify function. It works, but its time consuming.Since the fact gets modified at RHS ,the rule engine reprocess the same.But the time taken for execution is more. If any body have better idea please help. Regards Sanal.P /*#From row number: 21*/ rule Package Rate_21 salience 65515 when $objOrderedComponents:AccumulatedComponent() $packageDefinition:PackageDefinition($packageId:packageId) $orderedComponent:OrderedComponent($id1:componentKey,$qty:componentQty) from $objOrderedComponents.getOrderedComponentList() and $accumulatedQty:Number() from accumulate ( $accQtyComponent:OrderedComponent(packageChargeRecordId==$packageId, $AccQty : componentQty) from $objOrderedComponents.getOrderedComponentList(),sum($AccQty ) ) and $pkgComps:PackageComponent(componentKey==$id1,(quantityLmt =($qty+$accumulatedQty.intValue( from $packageDefinition.getPackageComponentList() then $orderedComponent.setIsComponentApplicable(true); $orderedComponent.setPackageChargeRecordId($packageId); modify ($objOrderedComponents){}; end -- View this message in context: http://drools.46999.n3.nabble.com/Using-accumulate-function-tp3896078p3899398.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Drools assertBehaviour IDENTITY vs EQUALITY
I am wondering how drools identifies what the IDENTITY of an object is for insertion? Additionally are there any known performance differences between one and the other? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-assertBehaviour-IDENTITY-vs-EQUALITY-tp3899456p3899456.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Using Decision Tables as Lookup Tables
Hello, I'm trying to figure out how I can use a Decision Table as a lookup table. I did come across http://drools.46999.n3.nabble.com/Rules-with-Lookup-Tables-td56996.html however, it asking about using a database. Typical Senario: Where [value from lookup table] is the value retrieved from the Decision Table. The reason I'm looking at a Decision Table rather than using a database is because the number of conditions needs to be changeable by end users. rule Calculate Value when $c : Company() $r : Region() $val : Double() from accumulate (Region($score : score) , sum($score * [value from lookup table])) then // Do Something end Thanks. -- View this message in context: http://drools.46999.n3.nabble.com/Using-Decision-Tables-as-Lookup-Tables-tp3899689p3899689.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using accumulate function-Performace Issues
Your posts use several terms others aren't familiar with. It's difficult to imagine the data model behind this rule snippet, and that's why you don't receive any answers. -W On 10/04/2012, sanal sana...@icthealth.com wrote: Hi , I have used the modify function. It works, but its time consuming.Since the fact gets modified at RHS ,the rule engine reprocess the same.But the time taken for execution is more. If any body have better idea please help. Regards Sanal.P /*#From row number: 21*/ rule Package Rate_21 salience 65515 when $objOrderedComponents:AccumulatedComponent() $packageDefinition:PackageDefinition($packageId:packageId) $orderedComponent:OrderedComponent($id1:componentKey,$qty:componentQty) from $objOrderedComponents.getOrderedComponentList() and $accumulatedQty:Number() from accumulate ( $accQtyComponent:OrderedComponent(packageChargeRecordId==$packageId, $AccQty : componentQty) from $objOrderedComponents.getOrderedComponentList(),sum($AccQty ) ) and $pkgComps:PackageComponent(componentKey==$id1,(quantityLmt =($qty+$accumulatedQty.intValue( from $packageDefinition.getPackageComponentList() then $orderedComponent.setIsComponentApplicable(true); $orderedComponent.setPackageChargeRecordId($packageId); modify ($objOrderedComponents){}; end -- View this message in context: http://drools.46999.n3.nabble.com/Using-accumulate-function-tp3896078p3899398.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools assertBehaviour IDENTITY vs EQUALITY
On 10/04/2012, gboro54 gbor...@gmail.com wrote: I am wondering how drools identifies what the IDENTITY of an object is for insertion? java.util.IdentityHashMap java.lang.System.identityHashCode(.) Additionally are there any known performance differences between one and the other? Don't think so. -W -- View this message in context: http://drools.46999.n3.nabble.com/Drools-assertBehaviour-IDENTITY-vs-EQUALITY-tp3899456p3899456.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using Decision Tables as Lookup Tables
Hmmm... the only way I can see this is possible (i.e. with the use of accumulate) is to use transient facts:- *This can be set-up with a decision table quite easily (and ValuedRegion can be a declarative type that extends Region adding the value field) * rule setup ValuedRegions - using a decision table when $Region( $score : score ) then insertLogical( new ValuedRegion( $score, [a value] ) ); end *Your rule * rule Calculate Value when $c : Company() $r : Region() $val : Double() from accumulate (ValuedRegion($score : score, $value : value ) , sum($score * $value)) then // Do Something end On 10 April 2012 14:51, Davout davout1...@gmail.com wrote: Hello, I'm trying to figure out how I can use a Decision Table as a lookup table. I did come across http://drools.46999.n3.nabble.com/Rules-with-Lookup-Tables-td56996.html however, it asking about using a database. Typical Senario: Where [value from lookup table] is the value retrieved from the Decision Table. The reason I'm looking at a Decision Table rather than using a database is because the number of conditions needs to be changeable by end users. rule Calculate Value when $c : Company() $r : Region() $val : Double() from accumulate (Region($score : score) , sum($score * [value from lookup table])) then // Do Something end Thanks. -- View this message in context: http://drools.46999.n3.nabble.com/Using-Decision-Tables-as-Lookup-Tables-tp3899689p3899689.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using Decision Tables as Lookup Tables
Be advised that the approach you are intending has a dangerous blind spot you should guard against. What if Calculate Value doesn't provide a match for a company/region combination? You'll need an additional rule detecting the missing ones. A lookup table F( x, y ) can also be implemented by inserting facts of type F, and this can be done by a single rule firing with high priority, with a RHS containing all required inserts. -W 2012/4/10 Michael Anstis michael.ans...@gmail.com: Hmmm... the only way I can see this is possible (i.e. with the use of accumulate) is to use transient facts:- This can be set-up with a decision table quite easily (and ValuedRegion can be a declarative type that extends Region adding the value field) rule setup ValuedRegions - using a decision table when $Region( $score : score ) then insertLogical( new ValuedRegion( $score, [a value] ) ); end Your rule rule Calculate Value when $c : Company() $r : Region() $val : Double() from accumulate (ValuedRegion($score : score, $value : value ) , sum($score * $value)) then // Do Something end On 10 April 2012 14:51, Davout davout1...@gmail.com wrote: Hello, I'm trying to figure out how I can use a Decision Table as a lookup table. I did come across http://drools.46999.n3.nabble.com/Rules-with-Lookup-Tables-td56996.html however, it asking about using a database. Typical Senario: Where [value from lookup table] is the value retrieved from the Decision Table. The reason I'm looking at a Decision Table rather than using a database is because the number of conditions needs to be changeable by end users. rule Calculate Value when $c : Company() $r : Region() $val : Double() from accumulate (Region($score : score) , sum($score * [value from lookup table])) then // Do Something end Thanks. -- View this message in context: http://drools.46999.n3.nabble.com/Using-Decision-Tables-as-Lookup-Tables-tp3899689p3899689.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using Decision Tables as Lookup Tables
Thanks guys. I'll give it a shot. -- View this message in context: http://drools.46999.n3.nabble.com/Using-Decision-Tables-as-Lookup-Tables-tp3899689p3900129.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] [Drools Planner] Proof-of-Concept Stock-planning System
Thank you for all the tips. In the mean time I was able to locate the source of serious performance killer. These 3 rules: http://nopaste.info/3f89c43eee_nl.html I tried to reorganize and re-optimize them at least 10 times to no avail. I'd appreciate, if anyone could suggest me how to change them to get the performance up. Until now I have tried: - reducing variable bindings (e.g. resource == $resource to resource == $maxLoad.resource) - moving accumulate from constraint rules to insert momentary load - joining sum for TUs and Picks in one accumulate - and number of other less useful changes still, if I add these rules the calculate count goes down from approx 5300 to 2000 per second which is more than a half. Thanks and kind regards, Reinis On 04/06/2012 01:50 PM, Geoffrey De Smet wrote: I just realized that the graph only prints out values (the soft score) of the hard score = 0. Since you don't reach feasibility early on, the graph will be zero. Try to tmp hack it to get the graph by disabling soft constraints and putting the hard constraints values in the soft score. With kind regards, Geoffrey De Smet Op 06-04-12 13:46, Geoffrey De Smet schreef: 32 hours, that is very long, especially if you're talking about feasibility. Feasibility much be attained within seconds or maybe 2 minutes. So either your problem is very, very constrained (unlikely) or there is much room for optimization. Run the Benchmarker and enable the statistic BEST_SOLUTION_CHANGED. Verify that you have a good graph, and not a bad graph. See this issue to see the difference: https://issues.jboss.org/browse/JBRULES-3451 Op 06-04-12 13:33, dro...@orbit-x.de schreef: Thank you, Geoffrey! This is the answer I was hoping for and it confirms my understanding of this problem. Indeed it looks like it will be a standard implementation (since it is (A) and (C)). The reason I was willing to ask the community is that current (non-optimizied prototype solution) takes approx. 32 hours to complete. But I am pretty sure that optimized move factory, rule definitions and engine configuration will move the completion time down to expected 6 hours. -Original-Nachricht- Von: Geoffrey De Smetge0ffrey.s...@gmail.com An: rules-users@lists.jboss.org Datum: 05-04-2012 11:34 Betreff: Re: [rules-users] [Drools Planner] Proof-of-Concept Stock-planning System Op 03-04-12 23:10, Reinis schreef: Hello, I want to ask you, guys, if you could guess if it is possible or probable to build such a System with Drools Planner: The system shall plan the best time where the transport unit (TU) has to be input into stock system to reach set delivery deadlines, utilization of resources and load balancing of bottle necks (all expressed as rules). Most of things (resource capacity, route within the stock system, etc.) are given and constant facts. Actually there is only one planning variable - time interval of a transport unit characterizing retention period within a given Resource. Like this: TU#1 is in Resource #A from 11:00 till 11:30- the optimal interval has to be planned Is the value range something like this: (A) - 10:00 till 10:30 - 10:30 till 11:00 - 11:00 till 11:30 - 11:30 till 12:00 Or like this? (B) - 11:00 till 11:15 - 11:01 till 11:16 - 11:02 till 11:17 - 11:03 till 11:18 ... From reading further, I presume (A). TU#1 is in Resource #B from 11:45 till 12:00- the optimal interval has to be planned TU#1 is in Resource #C from 12:30 till 13:00- the optimal interval has to be planned I have following problem size and constraints: - TUs per day: 160'000 - Amount of resources a TU travel through: 3 Do the TU need to go through it's 3 resources in a specific order? (C) No (D) Yes I presume it can not go through 2 resources at the same time. - Average smallest time interval: 15 Min - Planning period: 09:00 - 16:00 = 8 hours = 32 intervals - Initial planning window: 4-6 hours - continuous planning multiple batch execution time during the day after addition and/or retraction of number of TUs: 20 minutes (E) This is repeated planning (see documentation manual if you haven't already). So the problem size would be(?): (TUs * resources) ^ intervals = (160'000 * 3) ^ 32 = 6.305500958×10¹⁸¹ That's not a big search space. In some examples I 've seen 10^6800. Of course, the search space isn't the only metric to take into account (but I haven't found a good way to measure the other metrics, such as how-constrained-is-the-problem, how-big-is-the-snowball-effect, ...). I know there is no one answer to this question. I would like only to get your feeling on this problem. Would you take on solving this sort of problem with drools planner? Definitely :) If it's (A) and (C), it should be an easy, standard implementation. If it's (B) and (D), then it becomes interesting :) The only part I expect some rough edges is (E). I suspect you'll be
Re: [rules-users] debug
Hello I just downloaded the eclipse helios 3.6.2 (instead of 3.7.2) installed the drools plugin corresponding to this eclipse version (add new software in local) and the debug mode works fine now. maybe a pb of version? too recent? bruno grandjean -- View this message in context: http://drools.46999.n3.nabble.com/debug-tp3889772p3900351.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] https://issues.jboss.org/browse/GUVNOR-579
I see this case has been marked as resolved but without any comment. I am about to start a new project based on fusion but I need a UI such as guvnor. How are we supporting fusion in Guvnor? I could find reference documents on this topic. Does anyone have experience here? Thanks Sean Sent from my iPad ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] https://issues.jboss.org/browse/GUVNOR-579
Yes CEP is supported in Guvnor. See the Release Notes for 5.2 herehttps://hudson.jboss.org/hudson/job/droolsjbpm-knowledge/lastSuccessfulBuild/artifact/droolsjbpm-introduction-docs/target/docbook/publish/en-US/html_single/index.html#d0e2019 . There is also a blog post herehttp://blog.athico.com/2011/06/cep-operators-in-guvnor.html . On 10 April 2012 20:55, Sean Su sean.x...@gmail.com wrote: I see this case has been marked as resolved but without any comment. I am about to start a new project based on fusion but I need a UI such as guvnor. How are we supporting fusion in Guvnor? I could find reference documents on this topic. Does anyone have experience here? Thanks Sean Sent from my iPad ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] https://issues.jboss.org/browse/GUVNOR-579
Thanks. I will check that out. Sean Sent from my iPad On Apr 10, 2012, at 4:07 PM, Michael Anstis michael.ans...@gmail.com wrote: Yes CEP is supported in Guvnor. See the Release Notes for 5.2 here. There is also a blog post here. On 10 April 2012 20:55, Sean Su sean.x...@gmail.com wrote: I see this case has been marked as resolved but without any comment. I am about to start a new project based on fusion but I need a UI such as guvnor. How are we supporting fusion in Guvnor? I could find reference documents on this topic. Does anyone have experience here? Thanks Sean Sent from my iPad ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] maven drools compiler (plugin)
Am 06.04.2012 15:35, schrieb Sean Su: Ansgar, I tried the plugin yesterday before sending the email to the list but did not succeed. The problem, I believe, is the repository specification inside my pom. Could you send it over so that I can be sure? Hi Sean, could you paste the respective repo specification you're currently using? You should be using this URL: http://lightful.de/mvnrepo/public/ inside a pluginRepository stanza in your settings.xml Best regards Ansgar Thanks Sean On Fri, Apr 6, 2012 at 2:32 AM, Geoffrey De Smet ge0ffrey.s...@gmail.com mailto:ge0ffrey.s...@gmail.com wrote: Hey Ansgar, Your plugin is by far the best maven plugin for drools out there. Nice work. Would you be interested in moving the code into https://github.com/droolsjbpm/droolsjbpm-tools next to drools-ant? Advantages: - It would be released together with the rest of the drools, using the latest drools version - It would be automatically synced to maven central - It would get more exposure, as it will be documented in our documentation - Others (including us) will start improving it too Disadvantages: - At first, you 'd have to fork it and create pull requests to get your changes back into blessed (but I can guarantee I 'll merge any non-conflicting pull requests frequently and won't let them go stale) - We 'd need at least a few lines of documentation in: https://github.com/droolsjbpm/drools/tree/master/drools-docs/drools-expert-docs We can worry about the more advanced features (such as aether usage) later, just getting an official maven plugin for drools out there will help a lot of people. Op 05-04-12 23:01, Ansgar Konermann schreef: Am 05.04.2012 21:48 schrieb Sean Su sean.x...@gmail.com mailto:sean.x...@gmail.com: Hello, guys, I did some search online and it seems we do not have any official plugin that allows us to compile Drools rules as part of the maven build. There is already a jira issue for it: https://issues.jboss.org/browse/JBRULES-1273 Result so far: http://passion.forco.de/content/maven-drools-plugin Feel free to try it and let me know if you miss anything. Best regards, Ansgar Is this the case or I have not found it yet? Thanks for the help. Sean -- But beware of the Dark Side. Anger, fear, aggression - the Dark Side of the Force are they. -Yoda ___ rules-users mailing list rules-users@lists.jboss.org mailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org mailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- With kind regards, Geoffrey De Smet ___ rules-users mailing list rules-users@lists.jboss.org mailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- But beware of the Dark Side. Anger, fear, aggression - the Dark Side of the Force are they. -Yoda ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] drools process flow not firing all rule flow group
I have segregated my rules in two ruleflow-groups 1. mandatoryRulesGroup and 2. businessRulesGroup, and I want to use them in same given order. details is below --- 1. #business rule: 09 rule Earth Station attached to uplinked carriers ruleflow-group mandatoryRulesGroup when $es: EarthStation($esId: id, $esPolarizationId: earthStationType.feedPolarisationTypeUUIDRef.id) $cxr: Carrier( $cxrId: id, $cxrPtxpId: potentialTransponderUUIDRef.id) CarrierCarrierTransmitEarthStationCrossAggregateUUIDAssociation(earthStationId == $esId) from $cxr.carrierTransmitEarthStationAssociations then insert(new EsLinkedUplinkCxr($es, $cxr)); // end -- 2. Rule Carriers transmitted to transponders on same satellite ruleflow-group businessRulesGroup when $cxr: Carrier() then System.out.println(Carriers transmitted fired); end - the problem is if I add only carriers fact then second group execute, but if I add earth station and Carriers fact second group doesn't execute. looks like only one group executes my test file is like below - kbuilder.add(ResourceFactory.newClassPathResource(mandatoryRules.drl), ResourceType.DRL); kbuilder.add(ResourceFactory.newClassPathResource(businessRules.drl), ResourceType.DRL); kbuilder.add(ResourceFactory.newClassPathResource(ruleFlowProcess.bpmn), ResourceType.BPMN2); kSession.insert(testData.cxrRxesTxpSatCons003); //Carrier1 kSession.insert(testData.cxrHpaLimitCons1004); // Carrier2 kSession.insert(testData.esRxesTxpSatCons001);// EarthStation(If I add this businessRulesGroup not fired!!) kSession.startProcess(ruleFlowProcess); kSession.fireAllRules(new AgendaFilter() {}); - ruleFlow.bpmn: process processType=Private isExecutable=true id=ruleFlowProcess name=ruleFlowProcess tns:packageName=ruleFlowProcess startEvent id=_1 name=Start / businessRuleTask id=_2 name=graphBuilderRuleTask g:ruleFlowGroup=graphBuilderRulesGroup /businessRuleTask businessRuleTask id=_4 name=mandatoryRuleTask g:ruleFlowGroup=mandatoryRulesGroup /businessRuleTask businessRuleTask id=_5 name=businessRuleTask g:ruleFlowGroup=businessRulesGroup /businessRuleTask endEvent id=_6 name=End terminateEventDefinition/ /endEvent businessRuleTask id=_7 name=filterRulesTask g:ruleFlowGroup=filterRulesGroup /businessRuleTask --- I am not able to figure out why both groups not are not being executed even after I am inserting data to satisfy all of the rules. I would be grateful, if someone could help me to get the clue. Thanks very much. -Ravi -- View this message in context: http://drools.46999.n3.nabble.com/drools-process-flow-not-firing-all-rule-flow-group-tp3901171p3901171.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users