Drools Planner: what if possible values of a PlanningVariable are dependent of another one?
by Willem van Asperen
Hi All,
I have a PlanningEntity that has several planning variables, say A and
B. Now, if A is O then B can be X or Y and when A is P then B can be Y or Z.
I see two routes:
* create a solution property that generates X, Y and Z as alternatives
for B and rely on the score rules to dismiss improper values,
depending on the value of A
* create an entity property that only generates the possible values
for B (i.e. X,Y for A=O and Y,Z for A=P)
What is the best route?
(Alternatively I do not use the constructionHeuristic and just start of
my solution with a randomly (but correct) generated solution)
Regards,
Willem
10 years, 6 months
OptaPlanner scalability
by Rupesh M G
Hi,
I tested Optaplanner successfully for a fleet planning application.
Upto 1200 trips with around 80 vehicles for 3 days is fine.
I'm reaching the target of 0 hard constraints in less than 30 minutes.
But my target is to plan for a month with 12000 trips using 80 vehicles.
This time it didn't complete even after 12 hours.
I found the memory (< 500 MB) and CPU (25%) usage is less.
So tried running 3 solver threads and grouping the vehicles.
Now CPU usage increases.
I followed the vehicle routing sample application and the config xml is very similar.
I used late acceptance (200) and accept count (1000).
I'm using incremental score calculation; and applied change & swap filters in the config xml.
Requesting experts for some thoughts on how Optaplanner can scale on similar situations.
Thanks & Regards,
Rupesh
DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect."
10 years, 6 months
Spring, KnowledgeAgent, and Guvnor
by paulB
I'm having a problem connecting my KnowledgeAgent to a package in Guvnor.
I'm using Spring to instantiate the KnowledgeAgent. The agent initializes
perfectly well when I point to a local change-set that in-turn points to a
local rule. However, even though I have the same rule in a package in
Guvnor, the KnowledgeAgent fails with the following exception when I point
to the package's change-set in Guvnor:
The code at KnowledgeBaseImpl.java:148 is (using 5.3.0.Final):
Here is the simple rule in the Guvnor as returned by the URL for the package
source URL:
Here is the local change-set definition. The line that is commented is the
failing resource, whereas the local file resource works fine:
Guvnor is residing on a Tomcat server.
I could not find anything related to this on the forum. Thank you for any
hints.
-Paul
--
View this message in context: http://drools.46999.n3.nabble.com/Spring-KnowledgeAgent-and-Guvnor-tp3500...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 6 months
OptaPlanner: Solver.isEveryProblemFactChangeProcessed() return true before the last fact change is processed
by Hagai
Using OptaPlanner 6.0.1.Final and following the documentation for real-time
planning:
"Alternatively, you can subscribe to the BestSolutionChangedEvent.
A BestSolutionChangedEvent doesn't guarantee that every ProblemFactChange
has been
processed already, so check Solver.isEveryProblemFactChangeProcessed() and
ignore any
BestSolutionChangedEvent fired while that method returns false."
However, Solver.isEveryProblemFactChangeProcessed() return true before the
last fact change is processed.
This is documented in the code DefaultSolver.java: *// TODO bug: the last
ProblemFactChange might already been polled, but not processed yet*
I believe this can be fixed using the following code in
DefaultSolver.checkProblemFactChanges:
ProblemFactChange problemFactChange =
problemFactChangeQueue*.peek()*;
while (problemFactChange != null) {
score = doProblemFactChange(problemFactChange);
*problemFactChangeQueue.poll();*
count++;
problemFactChange = problemFactChangeQueue*.peek()*;
}
This way the queue will not be empty until the fact change is processed.
--
View this message in context: http://drools.46999.n3.nabble.com/OptaPlanner-Solver-isEveryProblemFactCh...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months
Integrate jBPM with OptaPlanner
by jjn
Hi, how can I integrate jBPM with OptaPlanner. I have solved a problem using
OptaPlanner, where there are a number of requests which are optimally
assigned to particular employees, based on certain constraints. Now I want
to create a dispatcher in jBPM, where certain employees(actors) can solve
certain requests(process instances). Any idea how I can go about this
problem ?
--
View this message in context: http://drools.46999.n3.nabble.com/Integrate-jBPM-with-OptaPlanner-tp40293...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months
Rule Orchestration
by swaroop
Hi,
Iam using Drools 5.6 , developing rules on guvnor. I have a scenario where i
have two decision tables , One is supposed to execute after the other.
I want to ensure that DT Two should be executed only after all the
executions in DT one happen . Because IN DT Two the list is being checked if
set of values are not present, currently when i have two Customer objects in
Working memory each having matching rows in Decision Table One .Once the
match is found for a customer object then as per the action a Product fact
is inserted which leads to fire the DT Two and the list is evaluated if set
of d are not present , the rule is fired in DT Two as the list is not
populated for the other customer object and matching rows which is being
checked in DT Two eval list column. Which is not desired . I tried with
salience , ruleflow group with not much of a help
Is there a way to can handle this
<http://drools.46999.n3.nabble.com/file/n4029371/DTIssue.png>
*Decision Table One*
Condition Condition Condition Action
c:Customer
a==$param b in ($param) c == $param "list(Global
Variable).add(d);
insert(Product())"
*Decision Table Two*
Condition Condition Condition
Action
p:Product
a==$param eval(list doesnt not contain ($param)) c == $param
response.setMessage($param);
Regards
Oggu
--
View this message in context: http://drools.46999.n3.nabble.com/Rule-Orchestration-tp4029371.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months
Drools 6 Junit Random Failures
by richardhands
I've written a base class to do the heavy lifting of creating all the Kie
resources etc and to give me a stateless session back that my unit tests can
all use. Each test calls the method in this base class to set up stuff, and
then adds facts and globals and does a fireall.
however, i get random unit test failures. sometimes the suite will work
perfectly, sometimes rule x will fail, sometimes rule f will fail etc. I'm
convinced it's got to be something to do with the way i'm setting up the
initial resources, and maybe they're getting re-used incorrectly from one
test to another (i expect a brand new clean statelesssession on each test)
but i can't see what i'm doing wrong. The documentation around the new Kie
stuff is still being built around how i'm trying to do stuff, so i'm a bit
lost. Each unit test class is designed to test all the rules in on .drl
file, but there can be many .drl files in one package so i don't want to use
the api's for loading a package, i am having to create a filesystem and load
the drl file into it. can anyone see anything obviously wrong in my base
class that might cause this intermittent failure?
thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-6-Junit-Random-Failures-tp402937...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months
How to include Maven repo jar in kbase using KModuleBeanFactoryPostProcessor
by Shrinath Managuli
Hi drools,
Using org.kie.spring.KModuleBeanFactoryPostProcessor, how to include the packages for kbase1 either from Maven repository or through an HTTP call (instead of include packages from class path folder)
Something like,
<kie:kbase name="kbase1" packages="org.test.helloword">
<kie:ksession name="ksession1" type="stateless" />
</kie:kbase>
I had looked into KModuleBeanFactoryPostProcessor and ClasspathKieProject.createInternalKieModule(), it seems all the packages are loaded from class path alone.
Also, if including the packages from Maven repository or through an HTTP URI is feasible, then how can we do a scanner for refreshing the packages?
Please share your views on this?
Thanks,
Shrinath
[Aspire Systems]
This e-mail message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary, confidential, trade secret or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
10 years, 7 months