Drools Planner in Billboard Planning for Out-of-Home Advertising
Join the DZone community and get the full member experience.Join For Free
EPAMEDIA uses Drools Planner for the dynamic placement of subjects on its media sites.
This procedure is called “optimization”. The placement has to satisfy various rules.
The implementation has been in production for more than a year. Drools Planner version 5.2
was used. Around 35% - 50% of the whole media bookings on all billboard sites are created
illustration 1: media and segmentation
The issues Drools Planner has to work on, are many. Some facts about the business domain,
in order to illustrate that:
- subjects are of variable sizes
- the media, where subjects are placed on, is segmented (s. illustration 1)
- media have different values (based on possible eye contact due to location). Sometimes a bigger
- installation can be segmented into areas of different values
- subjects are placed on media (booked) for 1 or more cycles (a cycle constitutes 14 days)
- about 19500 localities and communities have to be considered
- the amount of media (many thousands), campaigns and existing bookings are substantial
illustration 2: components of the technical solution
The diagram above shows details about the technical solution. Drools Planner is the core
of the so called "OptimizationService". Campaigns and bookings are read and written. The
model for optimization is specially designed for performance and decoupled via adapters.
Production optimization runs read from/write to database. Techsupport and developers can
use recorded files in CSV format for replay/debugging/testing purposes. The implementation
uses Drools queries with complex joins massively during the initial placement.
Because of the size of the task, the move factory queries rule violations, in order to create
the moves which Drools Planner executes. Designing a good MoveFactory is not easy. There is
still room for improvement in this area.
The hardest part was the calibration of the system and the acceptance test because of the
nature of the problem solved here. Simple tests targeted single rules. In order to understand
the results in daily business, a lot of work had to be done to make the found solution by
Drools Planner transparent.
- 16 - 24 GB of memory are used
- dozens of rules
- initial loading and placement takes an hour
- optimization runs for a few hours (time constrained)
The performance of Drools and Drools Planner is very good; there was of course a lot of
effort necessary to make the implementation as fast as possible.
Due to the size of the problem, the performance advances in Drools and Drools Planner are
very welcome. These improvements are well on their way in Drools Planner 5.5 (like
Just-In-Time Selectors, Selector trees, probability selection on any level, ...).
EPAMEDIA is the leading specialist for Out-of-Home advertising in the public space - in Austria as well as in Central and Eastern Europe (http://www.epamedia.at)
Roman Novak is an IT architect at Raiffeisen Solution.
Opinions expressed by DZone contributors are their own.