Op 16-04-12 06:36, duggal schreef:
I am solving a resource allocation problem using the Planner and have
run
into a few issues with the use of Local Search.
The objective is to assign tasks to a set of resources. Each task has a
start and end time and NO task should overlap each other for the same
resource. There are other rules for preference and mandate of certain tasks
to certain resources.
I am using the FIRST_FIT construction heuristic which works fine.
Tip: FIRST_FIT is
good, FIRST_FIT_DECREASING is usually better.
I have implemented a Resource Change Move which assigns a new
planning
variable to my planning entity. There seem to be issues with this phase.
If you
upgrade to 5.4.0.CR1, you can use the generic change move and
generic swap move
http://docs.jboss.org/drools/release/5.4.0.CR1/drools-planner-docs/html_s...
**Problem** -
1. While looking at the solution created at the end of the local search
phase AND comparing to the moves output in the log file. I see that there
are several instances where the log file shows a move BUT the output
solution has the entity still on the previous planning variable.
This is happening only towards the end of the phase (about last 8 steps) of
the time terminated phase.
This sounds like a genuine bug.
Could you copy paste some logging output to show the issue more clearly?
Can you check if 5.4.0.CR1 still has the issue and create a jira:
https://issues.jboss.org/browse/JBRULES
2. I have a rule in the DRL score file which prevents overlap of
allocations
of the task for the same resource. I have instances where the construction
heuristic violated this constraint. The local search solver then moved one
of the overlapping entity to another resource. However the final output
shows the constraint still EXISTS between the two entities (even though the
overlap is no longer present). As a result even though the constraints are
actually removed, the score is NOT going down as the planner constraints
still exist.
The rule used by me is as follows (Allocation is the planning entity and
resource is the variable) -
rule "noOverlapAllocations"
when
$allocation1 : Allocation($id : id, $resource : resource, $task :
task, resource != null)
$allocation2 : Allocation(id> $id, resource == $resource,
isOverlap($task), $id2 : id)
then
insertLogical(new IntConstraintOccurrence("overlapAllocation",
ConstraintType.NEGATIVE_HARD, 1, $allocation1, $allocation2));
end
Please help me resolve these issues.
Smells like a memory corruption in
drools-core. There is one fixed for
5.4.0.CR1, so
First turn on <environmentMode>TRACE</...> and see what it outputs.
http://docs.jboss.org/drools/release/5.4.0.CR1/drools-planner-docs/html_s...
Then upgrade to knowledge-api, drools-core and drools-compiler 5.4.0.CR1.
It's best to upgrade planner too, but you 'll need to follow this:
https://github.com/droolsjbpm/drools-planner/blob/master/drools-planner-d...
Thanks
Vikram
--
View this message in context:
http://drools.46999.n3.nabble.com/Planner-5-3-0-Final-Issue-with-Local-Se...
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