Lots of people showed up at last week’s Drools Planner webinar. And I was very happy that I could show up on time too: the Chili volcano got me stuck in Rio en route to the Buenos Aires workshop. So, instead of arriving 2 days in advance, I got up in Rio at 00:30 and arrived at the hotel in Buenos Aires at 12:45, only 15 minutes before the webinar started. Luckily Burr already prepared everything, so despite some initial phone problems on my end, we only had a few minutes of delay. Thanks, Burr 🙂
Video
Drools Planner optimizes automated planning from JBoss Developer on Vimeo.
You can download the slides from slideshare (only after logging in unfortunately). All the Drools and jBPM presentations are available here. We ‘ll probably also post the Buenos Aires talk video’s, which contains a Drools Planner demo.
See the JBoss webinars homepage for future JBoss webinars. There are some interesting webinars on JBoss AS 7 coming up. Especially the AS 7 startup times are incredible.
Questions
I couldn’t answer all the questions during the webinar, so here’s an answer to the rest of them that relate to Drools Planner:
Marvin: Can I model “changeover” times – after patient D a 1-hour clean-up is required, but after patient H a 4-hour changeover is required? Or “A to B” is a 1-hr changeover, but “A to C” is a 3-hr changeover?
Of course, but your model will have to be hour (or minute) based instead of day based. Just add a property on PatientAdmission stating the number of changeover hours, add that to your endDateTime to get endWithChangoverDateTime and then use the latter instead in your score rules.
Marvin: Wouldn’t it be 310! (ie, 310 * 309 * 308, …)?
That would result in (310309…10-1…*-2439) == 0, which is incorrect. Patients that don’t share a night can be in the same bed. But the problem is we have to check that as well as the other hard constraints (which is part of the score calculation), so therefor they are included. Furthermore, the best solution might be infeasible and break hard constraints. In that case we’ll still want the solution that breaks the least number of hard constraints.
Chris: Will this presentation go over any code examples? or just use cases?
The showed rules are directly copied from the examples. The Drools Planner download zip has the sources of the examples. Also the Drools Planner manual is full of code pieces. In future presentations I ‘ll try to show more code – there’s just too much info I want to cram into 1 hour.
Yogesh: Can we at least see some sample codes with these situations.
Here’s an example to use tabu search (see nurseRosteringSolverConfig.xml):
<acceptor>
<completeSolutionTabuSize>1000</completeSolutionTabuSize>
<completePropertyTabuSize>7</completePropertyTabuSize>
</acceptor>
<forager>
<minimalAcceptedSelection>800</minimalAcceptedSelection>
</forager>
Christian: Can Drools Planner be used to solve optimization problems with continuous or integer variables?
Yes, but there are no examples that do that yet. The trick is to use a non-cached MoveFactory.
Christian: How can I implement my own construction heuristics in Drools Planner?
Yes. In 5.2 or lower, just extend StartingSolutionInitializer. In 5.3, we ‘ll have a number of out-of-the-box construction heuristics and you ‘ll still be able to plug in your own.
Stanislas: How well does DS cope with facts changing at high frequency?
I haven’t got any hard data on this yet. The nice thing about metaheuristics like tabu search and SA (unlike brute force and branch&bound) is that they can be pauzed, their planning facts changed and continued from their old planning. 5.3 will support partially initialized plannings better, which makes some hacks obsolete. See the new chapter on “real time planning” in the reference manual for 5.3 in my github fork.
Stanislas: airspace navigation problem
Combine several tricks: backup planning, continuous planning and real-time planning. See that new chapter.
Oliver: If set with different score, constraints, the planning result can be different? If so, any way to determine the optimizing one reached?
The data and the constraints will be different in each use case + test data combination. The score is derived from that. Because the problems are NP complete, there’s no silver bullet to know if a solution is the optimal solution, unless the optimal solution is the perfect solution (score 0hard/0soft usually), which is very rare.