[Planner] CachedMoveFactory drive to Corrupted undo move
by npiedeloup
Hello,
I'm almost new to Drools Planner, and i run into some problems.
One of them, I really want to understand is that my Planner works well until
i try to use a CachedMoveFactory instead of my MoveFactory, then i've got
"Corrupted undo move" at step 2.
Assigment are my PlanningEntity, Day are facts
My MoveFactory is like this :
for (final Assigment assigment: mySolution.getAllAssigments()) {
for (final Day day : mySolution.getAllDays()) {
moveList.add(new PlanMove(assigment, day));
}
}
And my doMove is like :
final FactHandle factHandle = workingMemory.getFactHandle(assigment);
assigment.setDay(toDay);
workingMemory.update(factHandle, assigment);
The UndoMove is really simple (new PlanMove(assigment, fromDay)) , so I
pretty sure this part is correct.
I have add a false day(future=true) which mean "not plannified yet" and all
assigment start at this day.
I have a rule like :
rule "notPlannified"
when
$assigment: Assigment( day.future )
then
insertLogical(new IntConstraintOccurrence("notPlannified",
ConstraintType.NEGATIVE_SOFT, 50, $assigment));
end
My logs show :
INFO Phase construction heuristic finished: step total (0), time spend
(255), best score (0hard/-18750soft).
DEBUG Step index (0), time spend (2175), score (0hard/-18700soft), new
best score (0hard/-18700soft), accepted move size (1000) for picked step
([A148@[UNAFFECT]] ==> [12/11]).
Someone can explain me what I miss ?
Thanks.
--
View this message in context: http://drools.46999.n3.nabble.com/Planner-CachedMoveFactory-drive-to-Corr...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 6 months
Preventing re-evaluation on modification of 'output' fact
by Jamie
We're building a fraud detection application that uses rules to analyze
orders and the buyers and recipients on those orders. As rules fire, they
modify an 'output' fact, which is an object whose only intent is to record
the results as rules fire. It's not used in the LHS of any rules other than
to get a handle to it, e.g.:
rule "Rule 001 - Operator Flagged"
enabled (FraudRuleEvaluationHelper.isRuleEnabled("Rule 001 - Operator
Flagged"))
ruleflow-group "orderAnalysis"
lock-on-active
when
$order: OrderFact(operatorFlagged==true)
$results: FraudResultsDTO()
then
modify($results) {
addOrderSuspectReason("O")
};
FraudRuleConsequenceHelper.logRuleFiring($order.getOrderId(), "001");
end
We're finding that as the number of facts increases, the processing team
increases dramatically and I'm wondering if modifying the output fact the
way we do causes the rules to get re-evaluated to see if any activations
should be created or cancelled. Would removing the modify block help
anything? Should we be thinking about this in some other way?
--
View this message in context: http://drools.46999.n3.nabble.com/Preventing-re-evaluation-on-modificatio...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 6 months
Adding a custom logo to Drools Guvnor
by LCode
In previous versions of Drools Guvnor I was able to custom brand the
application by unpacking the drools guvnor war and replacing the header logo
image in the 'images' folder.
In version 5.3 it would appear that the same is still possible since section
16.3. of the documentation reads "The parts you can customize are the style
sheet, the "shortcut icon" and the header logo."
However I cannot find the correct image for the header logo in public
images. The one in org.drools.guvnor.Guvnor\images\hdrlogo_brms.gif is not
the drools header image. Indeed it would seem that I can only replace the
logo by recompiling from source.
Is this a bug or am I missing something obvious?
--
View this message in context: http://drools.46999.n3.nabble.com/Adding-a-custom-logo-to-Drools-Guvnor-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 6 months
Guvnor 5.3 : No more "Create New ..." button in "Browse" view ?
by Vincent LEGENDRE
Hi all,
The question is in the subjec :
In 5.2 there was a "create new" button in "browse" panel, which allow business user to create new assets.
In 5.3, no more button ...
Is it on purpose ?
Is it a bug ?
Is there a way to get it back ?
Does it appears only under some conditions ?
14 years, 6 months
Fwd: 5.3.0 Final - Rule using accumulate with windows:length delivers an unexpected result
by Michael Anstis
I'd have to defer to the drools-expert people.. as the problem appears to
be with 5.3.0.Final of drools-expert.
As a reminder, the DRL failing in 5.3.0.Final (or giving different results
to 5.2.0?) is:-
rule "Event Processing Evaluation"
dialect "mvel"
when
$list:java.util.List() from collect( evalEvent(wam == 'D1', f !=
null)over window:length( 1 ))
$average:Double() from accumulate( evalEvent($vf:f) from
$list,average($vf) )
eval($average > 5)
then
internalEvent fact0 = new internalEvent();
fact0.setDesrc( "Internal Event: "+ $average );
insert(fact0 );
end
---------- Forwarded message ----------
From: axel <axel.poeschmann(a)solutions.endress.com>
Date: 14 November 2011 08:16
Subject: Re: [rules-users] Guvnor (5.3.0 Final)- Rule using accumulate with
windows:length delivers an unexpected result
To: rules-users(a)lists.jboss.org
Thanks Mike.
So, now I've included Drools 5.3.0 Final in my Eclipse Drools Project too
and discovered the same problem as in Guvnor with my example. There is a
difference between 5.2.0 Final (works well) and 5.3.0 Final (fails) in my
case.
Is there a major change with event processing with sliding windows or is it
a just bug in the new version?
The DRL between Eclipse and Guvnor is the same, in principle. It means, I
started the project within Guvnor using the build features with the Editor
supporting creating a model in Guvnor and the business rule. These two
files, I couldn't reuse in my Eclipse project 1:1 (I used New File from
Guvnor Ressource in Eclipse for that), failed to compile and even to open
for the brl-file. So, I made the same model as Java Classes and a new DRL in
Eclipse copy the stuff from the Guvnors view source windows adding the
includes for the Java model and adding the Event declaration by hand. By the
way, are there any other hints for that ...
With regards,
Axel
--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-Guvnor-5-3-0-Final-Rule-usi...
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
14 years, 6 months