From Drools 5.2.0, you probably don't need to use
eval(callMyFunction())
any more, you can just write it without eval():
callMyFunction()
Be careful with calling custom functions though (especially those that
contain loops):
if you break delta score evaluation, the performance (and therefore
quality of the result) will suffer greatly.
Do a "stepLimit" benchmark (see class *BenchmarkApp) to verify your
score rules stay fast with and without that extra rule.
Also note that you can use inference:
rule A
salience 1 // optional
when
Item for SaleOrder in Box
then
insertLogical of a SaleOrder-Box combination
end
rule B
when
accummulate count of (SaleOrder-Box combination) // notice that is
depends on rule A having run first
then
insertLogical of SOFT of minus count
end
Op 19-08-11 15:06, JimK schreef:
My question is pretty much a duh! on my part, wasn't thinking
about all the
syntax options in DRL. Forgot about eval that can call a custom routine.
Thanks,
JimK
JimK wrote:
>
> This looks to be similar to the lecture compactness goal in the
> examination problem. I can almost see what needs to be done but can’t
> quite articulate it into rule(s) to ensure an order line has been packed
> sequentially in a contiguous series of boxes.
>
> Thanks much for any assistance
> Jim Kinneman
>
--
View this message in context:
http://drools.46999.n3.nabble.com/Planner-Packing-items-together-tp326226...
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
--
With kind regards,
Geoffrey De Smet