Re: [rules-users] problem in sliding window
no, actually i think the problem is because, i create a new session once in 10 seconds and dispose it off. so when i create the first two files in first 10 seconds , the session is disposed, and in the next session the next two files are created and disposed.. like this it goes.. so when i create more than 4 files all at the same instant it falls under the same session and the sliding window works.. could this be the problem? On Mon, Mar 17, 2014 at 5:28 PM, Davide Sottara dso...@gmail.com wrote: It is possible to declare sliding windows A possible problem (I didn't check the logic) is that you are not inserting the new Events you create. On 03/17/2014 12:13 PM, Sandhya Sree wrote: i found this type of declaration in a site and thought this is allowed.. also it doesnt throw any compilation error and works the same way as declared like this: accumulate( $e :Event (name == new file added) *over window : time(1m)*, count($e) On Mon, Mar 17, 2014 at 4:23 PM, Wolfgang Laun wolfgang.l...@gmail.comwrote: On 17/03/2014, Sandhya Sree sandhyachinna...@gmail.com wrote: declare window Ticks Event() over window:time(1m ) end Is there any documentation snippet that says you can declare a fact (not even an event) like this, restricting its existence? If not, why does this not cause an compilation error? -W ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing listrules-users@lists.jboss.orghttps://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
[rules-users] physical resource allocation problem
Hello, We have a resource allocation problem. Could this be solved with OptaPlanner? Here it is: There are N projects located in various places that need work done with machines (just one machine type for all machine work). Work can be parallelized, e.g. 6 work days can be done in 6 calendar days by one machine or in 3 calendar days by two, or in 4 calendar days by 2 machines (one works 4, other 2). How to best allocate machines to projects? Looking at planned project work, how many machines are needed for each calendar day? How many machines should we buy, and how many to rent, and when? Details For each project, the work can must be done only in some selected calendar periods. Machine locations are always known. Machine costs: * moving from location A to location B (per km). Moving also takes time, and a machine can be moved a maximum amount of km per day. * operating (per day) * staying in a project location (per day) * staying in a hangar (per day) * being rented for one day from location L (total cost = transport from rent location to project location and back, and daily rent) * being purchased A machine also needs an operator, but for now that can be considered a single unit. Ideally, also take into accounting weather for each project location. Weather might be known with 2 weeks in advance. Just re-plan by blocking the rainy days for some projects? Thanks, Scott ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Broken KIE-WB binary for Tomcat 7
Hello, I just tried to install the KIE-Workbench on Tomcat 7 out of the downloaded file kie-drools-wb-distribution-6.0.1.Final.zip with authentication. It turns out that obviously the web.xml inside the WAR in binaries/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war is wrong. It is missing some elements which have to do with authentication so that the whole installation process, described in the README.txt does not work. In 6.1.0.Beta1, that problem is fixed. On the other hand, the kie-tomcat-integration-6.1.0.Beta1.jar seems to be broken, at least I can't start my tomcat with that one in the lib folder. This problem can be circumvented by using kie-tomcat-integration-6.0.1.Final.jar instead, that one works. In total: Only the .war from 6.1.0.Beta1 together with kie-tomcat-integration from 6.0.1.Final is a working combination on a Tomcat 7.0.26. That seems a bit sad, given that this combination should not be the most uncommon one (running KIE-WB on Tomcat). You guys are making it really hard to switch to Drools 6 ... Regards Dominik … mit freundlichen Grüßen / kind regards Dominik Sandjaja Fon: +49 (0) 203 60878 183 Fax: +49 (0) 203 60878 222 e-mail: dominik.sandj...@it-motive.de it-motive AG Zum Walkmüller 6 47269 Duisburg i...@it-motive.de http://www.it-motive.de …… Vorsitzender des Aufsichtsrats: Dr.-Ing. Jürgen Sturm Vorstand: Horst-Dieter Deelmann (Vors.), Matthias Heming, Christoph Tim Klose HRB 9207, Amtsgericht Duisburg ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Efficiency questions about DSL
Hi, I was wondering how to use efficiently DSL with my rules and I have several questions about it : - First, I have the impression that we can use DSL files only in the same package of the DSLR file. When I tried to load DSL files by the kmodule.xml (specifying the different packages in the packages attribute of kbase) it does not work. Do I have to load each DSL files programmatically or is there a way to load it automatically by the kmodule.xml (and if it is the case, how can we handle the parsing order of these files ?) ? - An underlying question is is this a good practice to divide DSL files ? I would like to translate all my rules in french and to put the generic translations in a unique DSL file to reuse it in all of my different DSLR files. - I noted that we can use more than one DSL file for one DSLR file (it works at the runtime) but when it is the case the DRL viewer of the DSL rule editor does not work and I don't have autocompletion. I tried to put several expander instructions but it fails. Is there a way to make it work ? I think DSL stuff is underestimate at this moment by the community and for my last question I would like to know what is the future plans about this feature ? Maybe I could help to develop it. Regards -- View this message in context: http://drools.46999.n3.nabble.com/Efficiency-questions-about-DSL-tp4028774.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] physical resource allocation problem
On 18-03-14 09:24, Scott Danner wrote: Hello, We have a resource allocation problem. Could this be solved with OptaPlanner? Here it is: There are N projects located in various places that need work done with machines (just one machine type for all machine work). Work can be parallelized, e.g. 6 work days can be done in 6 calendar days by one machine or in 3 calendar days by two, or in 4 calendar days by 2 machines (one works 4, other 2). Take a look at these examples: Cloud Balancing https://www.youtube.com/watch?v=xhCtuM-Hiic use as less machines as possible Project Job Scheduling https://www.youtube.com/watch?v=_2zweB9JD7c in case the work has dependencies on other work items Vehicle routing with Time Windows https://www.youtube.com/watch?v=BxO3UFmtAPg When a work gets assigned to a machine, use shadow variables to capture when the work will be done. See docs about variable listeners How to best allocate machines to projects? Looking at planned project work, how many machines are needed for each calendar day? How many machines should we buy, and how many to rent, and when? Details For each project, the work can must be done only in some selected calendar periods. Machine locations are always known. Machine costs: * moving from location A to location B (per km). Moving also takes time, and a machine can be moved a maximum amount of km per day. * operating (per day) * staying in a project location (per day) * staying in a hangar (per day) * being rented for one day from location L (total cost = transport from rent location to project location and back, and daily rent) * being purchased These are all just constraints, I don't see any special stuff there. To make them easy to write, the domain classes will need a (shadow) variable that says when a work starts. A machine also needs an operator, but for now that can be considered a single unit. Ideally, also take into accounting weather for each project location. Weather might be known with 2 weeks in advance. Just re-plan by blocking the rainy days for some projects? Yes, see docs on repeated planning. Thanks, Scott ___ 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] Creating selection filter for PlanningEntity with 4 planning variables
Hello again, o) I completed the changes that you suggested last year concerning the issue that I am encountering with opta planner with our application. Note that I have at most one or two planning entities in the Solution (in my test case). Setting cacheType=PHASE on UnionMoveSelector level or cacheType=STEP on UnionMoveSelector level results in: java.lang.IllegalStateException: The selector (Union([ChangeMoveSelector(Filtering(FromSolutionEntitySelector(CloudPlacement)), FromSolutionPropertyValueSelector(offeredCPU)), ChangeMoveSelector(FromSolutionEntitySelector(CloudPlacement), FromSolutionPropertyValueSelector(offeredDisk)), ChangeMoveSelector(FromSolutionEntitySelector(CloudPlacement), FromSolutionPropertyValueSelector(offeredMemory)), ChangeMoveSelector(FromSolutionEntitySelector(CloudPlacement), FromSolutionPropertyValueSelector(offeredVolume))]))'s non-last childMoveSelector (ChangeMoveSelector(Filtering(FromSolutionEntitySelector(CloudPlacement)), FromSolutionPropertyValueSelector(offeredCPU))) has neverEnding (true) with randomSelection (false). Setting cacheType=PHASE for each change move selector results in: Caused by: java.lang.IllegalStateException: The selector (Caching(ChangeMoveSelector(Filtering(FromSolutionEntitySelector(CloudPlacement)), FromSolutionPropertyValueSelector(offeredCPU has a childMoveSelector (ChangeMoveSelector(Filtering(FromSolutionEntitySelector(CloudPlacement)), FromSolutionPropertyValueSelector(offeredCPU))) with neverEnding (true). o) Number of moves: I obtained the number of evaluated moves from solver and I obtain a number above 7 000 000. I also added logs to the MoveFilter that I implement. Different values are being proposed. But, the MoveFilter is repeatedly invoked (20 times) with the same set of planning values. Since this set broke constraints the MoveFilter returns false each time. Then bailing out error occurs: o) Change Move Filter configuration My planning entity CloudPlacement has four planning variables as indicated in the included config file. I tried the modifications you suggested over this basic version. Could you please check that the configuration is correct? 2014.03.14_Config_file.xml http://drools.46999.n3.nabble.com/file/n4028776/2014.03.14_Config_file.xml Regards -- View this message in context: http://drools.46999.n3.nabble.com/Creating-selection-filter-for-PlanningEntity-with-4-planning-variables-tp4026575p4028776.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] Creating selection filter for PlanningEntity with 4 planning variables
On 18-03-14 11:24, maciekpob wrote: Hello again, o) I completed the changes that you suggested last year concerning the issue that I am encountering with opta planner with our application. Note that I have at most one or two planning entities in the Solution (in my test case). Setting cacheType=PHASE on UnionMoveSelector level or cacheType=STEP on UnionMoveSelector level results in: java.lang.IllegalStateException: The selector (Union([ChangeMoveSelector(Filtering(FromSolutionEntitySelector(CloudPlacement)), FromSolutionPropertyValueSelector(offeredCPU)), ChangeMoveSelector(FromSolutionEntitySelector(CloudPlacement), FromSolutionPropertyValueSelector(offeredDisk)), ChangeMoveSelector(FromSolutionEntitySelector(CloudPlacement), FromSolutionPropertyValueSelector(offeredMemory)), ChangeMoveSelector(FromSolutionEntitySelector(CloudPlacement), FromSolutionPropertyValueSelector(offeredVolume))]))'s non-last childMoveSelector (ChangeMoveSelector(Filtering(FromSolutionEntitySelector(CloudPlacement)), FromSolutionPropertyValueSelector(offeredCPU))) has neverEnding (true) with randomSelection (false). So the union needs to do original selection, but one of his childs is neverEndering. That's never a good thing. Setting cacheType=PHASE for each change move selector results in: Caused by: java.lang.IllegalStateException: The selector (Caching(ChangeMoveSelector(Filtering(FromSolutionEntitySelector(CloudPlacement)), FromSolutionPropertyValueSelector(offeredCPU that's the caching PHASE one wrapping the child. has a childMoveSelector (ChangeMoveSelector(Filtering(FromSolutionEntitySelector(CloudPlacement)), FromSolutionPropertyValueSelector(offeredCPU))) with neverEnding (true). Hmm, why is this child neverEnding? Is the entitySelector or valueSelector explicitly set to selectionOrder RANDOM? This would make no sense: changeMoveSelector cacheTypePHASE/cacheType valueSelector selectionOrderRANDOM/selectionOrder!-- What's the point of making it RANDOM if it's wrapped in a move cacheType PHASE? -- ... /valueSelector /changeMoveSelector this would make more sense to shuffle on the phase level: changeMoveSelector cacheTypePHASE/cacheType selectionOrderSHUFFLED/selectionOrder valueSelector ... /valueSelector /changeMoveSelector o) Number of moves: I obtained the number of evaluated moves from solver and I obtain a number above 7 000 000. I also added logs to the MoveFilter that I implement. Different values are being proposed. But, the MoveFilter is repeatedly invoked (20 times) with the same set of planning values. Since this set broke constraints the MoveFilter returns false each time. Then bailing out error occurs: o) Change Move Filter configuration My planning entity CloudPlacement has four planning variables as indicated in the included config file. I tried the modifications you suggested over this basic version. Could you please check that the configuration is correct? 2014.03.14_Config_file.xml http://drools.46999.n3.nabble.com/file/n4028776/2014.03.14_Config_file.xml Regards -- View this message in context: http://drools.46999.n3.nabble.com/Creating-selection-filter-for-PlanningEntity-with-4-planning-variables-tp4026575p4028776.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] Efficiency questions about DSL
Hum, actually for the first point it doesn't work only when DSL files come from a dependent maven project (I have generic DSL files in a separate maven project). -- View this message in context: http://drools.46999.n3.nabble.com/Efficiency-questions-about-DSL-tp4028774p4028779.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] CompositiveClassLoader$CachingLoader$load method intermittently hangs
I cannot easily reproduce an issue that I'm seeing. This is an intermittent issue that happens probably 3% of the time or less. This is observed behavior in * Drools v5.6.0.Final, using * Janino compiler v2.5.16 transitively Drools brings * mvel2 v2.1.8.Final We have an environment that loads around 10 different KnowledgeBases into a list. Then one-by-one a single StatefulKnowledgeSession is created for a single KnowledgeBase, facts are inserted, and then fireAllRules is called. Every so often, we noticed that we were getting what seemed to be ininite looping behavior for during either insertion time or fireAllRules time. When we subsequently re-run the *same* session with the *same* KnowledgeBase and the *same* facts inserted, it was successful and finished in milliseconds (the average for our successful runs). We have repeatedly seen this behavior of 1 failure, followed by a re-run that is successful. We were able to attach a profiler to several of these hung sessions to determine what was happening. It turns out that in both the scenario where we saw a hang up on fact insertion and on fireAllRules call, the thread dump was the same. The stack looks like: ``` main - Thread t@1 java.lang.Thread.State: RUNNABLE at java.util.HashMap.getEntry(HashMap.java:347) at java.util.HashMap.containsKey(HashMap.java:335) at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:244) at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237) at org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.mvel2.ParserConfiguration.checkForDynamicImport(ParserConfiguration.java:163) at org.mvel2.ParserConfiguration.hasImport(ParserConfiguration.java:191) at org.mvel2.ParserContext.hasImport(ParserContext.java:360) at org.mvel2.ParserContext.isVariableVisible(ParserContext.java:715) at org.mvel2.compiler.ExpressionCompiler.verify(ExpressionCompiler.java:394) at org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:250) at org.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:62) at org.mvel2.MVEL.compileExpression(MVEL.java:810) at org.drools.base.mvel.MVELCompilationUnit.compile(MVELCompilationUnit.java:417) at org.drools.base.mvel.MVELCompilationUnit.getCompiledExpression(MVELCompilationUnit.java:238) at org.drools.rule.constraint.MvelConstraint.createMvelConditionEvaluator(MvelConstraint.java:224) at org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:208) at org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:175) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:133) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:302) at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:254) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:366) at org.drools.common.SimpleBeliefSystem.insert(SimpleBeliefSystem.java:38) at org.drools.common.TruthMaintenanceSystem.addLogicalDependency(TruthMaintenanceSystem.java:207) at org.drools.common.TruthMaintenanceSystem.addLogicalDependency(TruthMaintenanceSystem.java:179) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:247) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:950) at org.drools.base.DefaultKnowledgeHelper.insertLogical(DefaultKnowledgeHelper.java:263) at org.drools.base.DefaultKnowledgeHelper.insertLogical(DefaultKnowledgeHelper.java:228) at org.drools.base.DefaultKnowledgeHelper.insertLogical(DefaultKnowledgeHelper.java:223) application-stack at some.drools.generated.rule.package.Rule_drools-generated2 at some.drools.generated.rule.package.Rule_drools-generated1 at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1282) - locked 656dd9a0 (a org.drools.common.DefaultAgenda) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1216) - locked 656dd9a0 (a org.drools.common.DefaultAgenda) at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1451) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:756) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:718) at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230) facts-inserted-previously ``` We were able to get the same hung thread dump
[rules-users] KnowledgeAgent, when to stop notifier/scanner services?
Hy all I have seen a few references warning that the change notifier and change scanner services must be stopped or a memory leak can occur, but where would I stop them? The knowledge base needs to live on and be updated as new knowledge sessions are created from it. So the only place I would be stopping these services and disposing of the knowledge agent, would be when the server is restarted. Is this incorrect? If so, *when* would be an appropriate time to stop these services? Thanks for your help. Kind regards, Peter ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Reloading DRL files from a web interface + incoming requests
Hello. I am new to Drools and have seen similar questions to mine, but I need some more detail and would love to see some insight from a Drools pro for our particular scenario :-) We are testing Drools as part of our web application backend. We want Drools to make some decisions based on a number (let's say 10) parameters we find in the incoming HttpRequest. Also, we are building a web admin interface that allows users to make changes to the Drools files that contain the business logic. We created a simple interface that allows users to create filtering rules. We store those rules in the database (field, operator, compare_against_vales, etc). Every time a user makes a change to a rule in the web admin interface (add rule, delete rule, add condition, delete condition, update condition, etc) the DRL file(s) must be regenerated and re-fed to Drools. I have a couple of questions about this: 1. How do we reload DRL files in the most efficient way? (A small code sample or a link would be great) 2. Could we create multiple small DRL files instead of one big one and would we get better performance when we only reload the (small) changed files into Drools as opposed to putting everything in one file and regenerating and reloading that? 3. Do we run the risk of Drools being busy with reloading DRLs while we have new Drools jobs (HttpRequests) waiting and what would happen, would we suffer a delay or do we run the risk of Drools being unavailable? The app is business critical. It doesn't have a super high load at the moment, but load could grow in the future and we want to plan for the worst: - a user in the web admin makes a number of changes to conditions and submits those, so we have to reload DRLs - at the exact same moment 5 incoming requests need to be evaluated by Drools 4. Can Drools manage this worst case scenario? Thanks very much for your time. -- View this message in context: http://drools.46999.n3.nabble.com/Reloading-DRL-files-from-a-web-interface-incoming-requests-tp4028782.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] Programmatically load rules classloader NullPointerException
Hello, I was trying to build a kie module and programmatically load DRL rules at runtime. But I found for any new event type I wanted to monitor, I had to add @rule(event) when I 1st created the module. If I didn't, I would get the following exception when I tried to updateToVersion. My java file is also attached. Would some one please let me know what caused my problem? And anyway to get around this problem? We really need to get the programmatically loading rules working in our project. Thanks a lot. PlayGround1.java http://drools.46999.n3.nabble.com/file/n4028783/PlayGround1.java Exception in thread main java.lang.NullPointerException at org.drools.core.common.ProjectClassLoader$InternalTypesClassLoader.defineClass(ProjectClassLoader.java:230) at org.drools.core.common.ProjectClassLoader.defineType(ProjectClassLoader.java:141) at org.drools.core.common.ProjectClassLoader.defineClass(ProjectClassLoader.java:152) at org.drools.compiler.kie.builder.impl.KieContainerImpl.updateToVersion(KieContainerImpl.java:191) at com.some.app.PlayGround1.runRules(PlayGround1.java:72) at com.some.app.PlayGround1.main(PlayGround1.java:34) -- View this message in context: http://drools.46999.n3.nabble.com/Programmatically-load-rules-classloader-NullPointerException-tp4028783.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 Case Based Reasoning
This sounds like something that could be accomplished with Planner. Is that the case or am I completely off the mark here? My company is looking at technologies to do case base planning and since we already use drools for other business rules figure I would poke around -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784.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 Case Based Reasoning
CBR as in http://en.wikipedia.org/wiki/Case-based_reasoning? If the number of identical variables, added with weights, is the target function, a simple search strategy should be sufficient for finding the best past case. -W On 18/03/2014, gboro54 gbor...@gmail.com wrote: This sounds like something that could be accomplished with Planner. Is that the case or am I completely off the mark here? My company is looking at technologies to do case base planning and since we already use drools for other business rules figure I would poke around -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784.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 Case Based Reasoning
That is correct and that is my thought. My company I feel likes to over complicate things at times. My thought would be to use drools queries to handle the searching of previous cases for the solution. Does that seem like a reasonable approach? laune wrote CBR as in http://en.wikipedia.org/wiki/Case-based_reasoning? If the number of identical variables, added with weights, is the target function, a simple search strategy should be sufficient for finding the best past case. -W On 18/03/2014, gboro54 lt; gboro54@ gt; wrote: This sounds like something that could be accomplished with Planner. Is that the case or am I completely off the mark here? My company is looking at technologies to do case base planning and since we already use drools for other business rules figure I would poke around -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784p4028786.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 Case Based Reasoning
On 18/03/2014, gboro54 gbor...@gmail.com wrote: That is correct and that is my thought. My company I feel likes to over complicate things at times. My thought would be to use drools queries to handle the searching of previous cases for the solution. Does that seem like a reasonable approach? I'd have to see a few solid use cases before I really pledge my reputation. I'm not sure how queries can rescue the day, but I think I could come up with a nice set of technical rules (but see 1st sentence). -W laune wrote CBR as in http://en.wikipedia.org/wiki/Case-based_reasoning? If the number of identical variables, added with weights, is the target function, a simple search strategy should be sufficient for finding the best past case. -W On 18/03/2014, gboro54 lt; gboro54@ gt; wrote: This sounds like something that could be accomplished with Planner. Is that the case or am I completely off the mark here? My company is looking at technologies to do case base planning and since we already use drools for other business rules figure I would poke around -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784p4028786.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 Case Based Reasoning
Agreed and understood. I am not throwing out any solid conclusions about an approach. I can also see a case for technical rules. laune wrote On 18/03/2014, gboro54 lt; gboro54@ gt; wrote: That is correct and that is my thought. My company I feel likes to over complicate things at times. My thought would be to use drools queries to handle the searching of previous cases for the solution. Does that seem like a reasonable approach? I'd have to see a few solid use cases before I really pledge my reputation. I'm not sure how queries can rescue the day, but I think I could come up with a nice set of technical rules (but see 1st sentence). -W laune wrote CBR as in http://en.wikipedia.org/wiki/Case-based_reasoning? If the number of identical variables, added with weights, is the target function, a simple search strategy should be sufficient for finding the best past case. -W On 18/03/2014, gboro54 lt; gboro54@ gt; wrote: This sounds like something that could be accomplished with Planner. Is that the case or am I completely off the mark here? My company is looking at technologies to do case base planning and since we already use drools for other business rules figure I would poke around -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784p4028786.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784p4028788.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] physical resource allocation problem
Thanks Geoffrey! On Tue, Mar 18, 2014 at 11:51 AM, Geoffrey De Smet ge0ffrey.s...@gmail.comwrote: On 18-03-14 09:24, Scott Danner wrote: Hello, We have a resource allocation problem. Could this be solved with OptaPlanner? Here it is: There are N projects located in various places that need work done with machines (just one machine type for all machine work). Work can be parallelized, e.g. 6 work days can be done in 6 calendar days by one machine or in 3 calendar days by two, or in 4 calendar days by 2 machines (one works 4, other 2). Take a look at these examples: Cloud Balancing https://www.youtube.com/watch?v=xhCtuM-Hiic use as less machines as possible Project Job Scheduling https://www.youtube.com/watch?v=_2zweB9JD7c in case the work has dependencies on other work items Vehicle routing with Time Windows https://www.youtube.com/watch?v=BxO3UFmtAPg When a work gets assigned to a machine, use shadow variables to capture when the work will be done. See docs about variable listeners How to best allocate machines to projects? Looking at planned project work, how many machines are needed for each calendar day? How many machines should we buy, and how many to rent, and when? Details For each project, the work can must be done only in some selected calendar periods. Machine locations are always known. Machine costs: * moving from location A to location B (per km). Moving also takes time, and a machine can be moved a maximum amount of km per day. * operating (per day) * staying in a project location (per day) * staying in a hangar (per day) * being rented for one day from location L (total cost = transport from rent location to project location and back, and daily rent) * being purchased These are all just constraints, I don't see any special stuff there. To make them easy to write, the domain classes will need a (shadow) variable that says when a work starts. A machine also needs an operator, but for now that can be considered a single unit. Ideally, also take into accounting weather for each project location. Weather might be known with 2 weeks in advance. Just re-plan by blocking the rainy days for some projects? Yes, see docs on repeated planning. Thanks, Scott ___ rules-users mailing listrules-users@lists.jboss.orghttps://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] problem in sliding window
All the context of a session, including the windows, goes away when the session is disposed. In general, please try to post all your DRL and as much information you can on how the sessions are built and managed. That makes it easier to understand what is going on. Thanks! On 03/18/2014 07:20 AM, Sandhya Sree wrote: no, actually i think the problem is because, i create a new session once in 10 seconds and dispose it off. so when i create the first two files in first 10 seconds , the session is disposed, and in the next session the next two files are created and disposed.. like this it goes.. so when i create more than 4 files all at the same instant it falls under the same session and the sliding window works.. could this be the problem? On Mon, Mar 17, 2014 at 5:28 PM, Davide Sottara dso...@gmail.com mailto:dso...@gmail.com wrote: It is possible to declare sliding windows A possible problem (I didn't check the logic) is that you are not inserting the new Events you create. On 03/17/2014 12:13 PM, Sandhya Sree wrote: i found this type of declaration in a site and thought this is allowed.. also it doesnt throw any compilation error and works the same way as declared like this: accumulate( $e :Event (name == new file added) *over window : time(1m)*, count($e) On Mon, Mar 17, 2014 at 4:23 PM, Wolfgang Laun wolfgang.l...@gmail.com mailto:wolfgang.l...@gmail.com wrote: On 17/03/2014, Sandhya Sree sandhyachinna...@gmail.com mailto:sandhyachinna...@gmail.com wrote: declare window Ticks Event() over window:time(1m ) end Is there any documentation snippet that says you can declare a fact (not even an event) like this, restricting its existence? If not, why does this not cause an compilation error? -W ___ 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 ___ 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 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] Pojos not visible in Guided DT
That is strange. Can you provide steps to reproduce? Have you tried 6.1.0.Beta1? Sent on the move On 18 Mar 2014 22:30, Joe White joe.wh...@recondotech.com wrote: In the workbench has anybody seen a case where you can create a decision table with the Wizard and it sees your classes. But the non- wizard decision table definition fails? I get this exception when creating a table without using the wizard and none of my objects show up in the dropdown for column definition. If I use the wizard and select my imports everything works as expected. 1. java.lang.NullPointerException: *null* 2. at org.drools.compiler.kie.builder.impl.KieBuilderSetImpl. registerInitialErrors(KieBuilderSetImpl.java:50) ~[drools-compiler-6.0.1. *Final*.jar:6.0.1.*Final*] 3. at org.drools.compiler.kie.builder.impl.KieBuilderSetImpl. init(KieBuilderSetImpl.java:42) ~[drools-compiler-.0.1.*Final*.jar:6.0.1. *Final*] 4. at org.drools.compiler.kie.builder.impl.KieBuilderImpl. createFileSet(KieBuilderImpl.java:703) ~[drools-compiler-6.0.1.*Final*.jar :6.0.1.*Final*] 5. at org.guvnor.common.services.builder.Builder.addResource(Builder.java :245) ~[guvnor-project-builder-6.0.1.*Final*.jar:6.0.1.*Final*]at org. guvnor.common.services.builder.Builder.updateResource(Builder.java:319) ~[ guvnor-project-builder-6.0.1.*Final*.jar:6.0.1.*Final*] 6. at org.guvnor.common.services.builder.BuildServiceImpl. updatePackageReso 7. urce(BuildServiceImpl.java:192) ~[guvnor-project-builder-6.0.1.*Final* .jar:6.0.1.*Final*] 8. at org.guvnor.common.services.builder.BuildServiceImpl $Proxy$_$$_WeldClientProxy.updatePackageResource( BuildServiceImpl$Proxy$_$$_WeldClientProxy.java) 9. [guvnor-project-builder-6.0.1.*Final*.jar:6.0.1.*Final*] 10. at org.guvnor.common.services.builder. ResourceChangeIncrementalBuilder$4.run(ResourceChangeIncrementalBuilder. java:237)[guvnor-project-builder-6.0.1.*Final*.jar:6.0.1.*Final*] 11. at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1145) [na:1.7.0_45] 12. at java.util.concurrent.ThreadPoolExecutor$Worker.run( ThreadPoolExecutor.java:615) [na:1.7.0_45] 13. at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45] 14. 2014-03-18 13:31:02,953 [pool-9-thread-8] ERROR *null* 15. org.guvnor.common.services.shared.exceptions.GenericPortableException: *null* 16. at org.guvnor.common.services.backend.exceptions. ExceptionUtilities.handleException(ExceptionUtilities.java:24) ~[guvnor- services-api-6.0.1.*Final*.jar:6.0.1.*Final*] 17. at org.guvnor.common.services.builder.BuildServiceImpl. updatePackageResource(BuildServiceImpl.java:200) ~[guvnor-project-builder- 6.0.1.*Final*.jar:6.0.1.*Final*] 18. at org.guvnor.common.services.builder.BuildServiceImpl $Proxy$_$$_WeldClientProxy.updatePackageResource( BuildServiceImpl$Proxy$_$$_WeldClientProxy.java)~[guvnor-project-builder- 6.0.1.*Final*.jar:6.0.1.*Final*] 19. at org.guvnor.common.services.builder. ResourceChangeIncrementalBuilder$4.run(ResourceChangeIncrementalBuilder. java:237) ~[guvnor-project-builder-6.0.1.*Final*.jar:6.0.1.*Final*] 20. at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1145) [na:1.7.0_45] 21. at java.util.concurrent.ThreadPoolExecutor$Worker.run( ThreadPoolExecutor.java:615) [na:1.7.0_45] 22. at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45] ___ 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