1. Al Waseet Auto-Layout
Optimization
A heuristic optimization method
Prepared by Yasir Karam
yasirkaram@alwaseetintl.com
2. Agenda
• Preamble
• Business Problem
• Motivation
• Proposal
– Objectives
– Deliverables
– Plan
– Turnover Analysis
• Q & A
3. Preamble
• Interactive Genetic Algorithm is a well known
heuristic optimization search method in which gives
manual human role to choose offspring results
• Defining search space will lead to fine tuned
allocation of resources
• Few problem elements and with low computational
cost resulting efficient solution space
• Inspired by Bio-informatics; IGA became leading
method for solving search problems
• Lifecycle of genotypes from Representation,
Selection, Mutation and Re-Production seducing
new self-emerged evolved offspring generations
4. Business Problem
• An exaggerated time taken to process post-production
phase passed by pre-production and production
• Final magazine layout lacks to optimum allocation and
style selection due to absence of standard criteria and
loose function-to-goal driven Ads among pages
• Many Ad preferences taken place (page, position, ..etc)
• Hard and soft constraints are managed manually and
posted back internally between sales and production
depts.
• No fine tunings or interactive intelligent methodologies
used to elaborate the magazine pages as per customer
demands and forced by print issue business rules
5. Motivation
• The need to an intelligent new
methodologies capturing business rules as
well as customer preferences in order to
optimally produce best print issue layout
• Need to a frenzy exotic time/effort killer to
do issue production automatically with only
few definitions of variables and function
operators
• Bind all process metrics in one container
• Save maximum issue space with least space
waste and least fillers.
6. Existing Scenario
• Insertions are being processed by production dept after
booking confirmation
• Artwork job lists disseminated over each designer
• Job lists summarized by insertion size, type, price offer
and other customer preferences (side, color,.. Etc)
based on publication business rules
• The proposition of insertion patterns and locations on
each page non-provisioned to reflect minimum cost and
maximum profit
• The layout composition in pre-production phase is totally
done manually by production manager
• An average of 30 minutes spent on each page except
1st,2nd, 3rd and last.
7. Layout Optimization
• Genetic encoding
– Assuming we have n Artworks for n insertions denoted as
A1,…An
– Artworks represent an insertion with its properties (width X
height, page #, color, lead position)
– The search space for the IGA (Interactive Genetic
Algorithm) is the available space in issue after specifying
layout template organics (static components)
– After applying publication rules (insertion type, price,.. Etc)
– After calculating remaining space from booked insertions
– After calculating overall total classified space
– 2D genetic algorithm will be applied to optimize space per
page
– The overall problem is to optimally have best pages
overlook by the algorithm user in each selection phase of
the GA
8. Publication Elements
• Max number of cols/page = 8
• Col width = 40 mm
• Min insertion width = 1 col
• Min insertion height = 100 mm
• Page spaces
– 1st = 84805 square mm
– Rest pages = 93100 square mm
• If we define an Ad cell sized as cell=1600 sqr
mm then a page max cells = 58 cell
• If page would be n x m = 58 cells then n <= 8
and m <=7
9. Gene Representation
Gene Description Values
Ad Cell 1
X,Y Coord. Of upper left
corner of cell
]n] x ]1,8,1]
Rowspan, Colspan for
the Ad cell
Ad cell dimensions ]n] x ]1,8,1]
Color Ad insertion type Color, B/W
(Ad Cell 2 (same genes as in Ad cell 1
10. Client Preferences
• Client is concerned with some
properties usually he pays premium
charges to preserve them.
11. Soft constraints
• Page constraints:
– Ad cells must represent the correct page layout :
• Ads should be within same page section as per Ad section
• Ads should fill only free space after reserving all existing ones
spaces
• No overlap between Ad cells
• B/W Ads shouldn’t be inside colour pages, while Colour Ads
shouldn’t be inside B/W pages
• Publication sectioned pages are page preferences, and
similar insertion sections are highly preferred to be together
• Overall dimensions included in [1..7]x[1..8]
• No more than 2mm space between Ad cells for multiple Ads
• Ads constraints:
– An Ad should be multiples of Ad cells
12. Hard Constraints
• Generated pages shouldn’t exceed #
pages and should be even of multiples
of 4
• Margin lead between insertions should
be 3 mm
• Total issue space shouldn’t exceed A
sq mm => total Ads spaces (insertions +
classifieds)
13. Evaluating Fitness
• To find best laid area for all issue
insertions
• Minimize hosted space for insertions
• Maximize productivity per issue by
taking into consideration profit weight
of each rule decision
15. Raw Data
Art dept
job list
Insertion
attributes
Publication
page
attributes
Publication
attributes
16. Revised Scenario
• Publication area consumption pricing and booking based on Ad units instead
of col x cm, thus this will ensure better reliability on pricing strategy and easily
adore the publication to apply IGA optimization to it
• Insertions are being processed by production dept after booking confirmation
• Artwork job lists disseminated over each designer
• Job lists summarized by insertion size, type, price offer and other customer
preferences (side, color,.. Etc) based on publication business rules
• Hierarchy of insertion placement based on the above insertion attributes
• Insertion attributed are weighted each by its price
• The algorithm will automatically insert each artwork per insertion over
publication layout
• Production man can revise residual space of the publication, interactively
retain existing genes offspring or continue running IGA until satisfactory
situation reached
• Final setup of commercial insertions will be followed up by classified filling
inside residue space manually
17. Algorithm Overview
• Check and pass into the business
rules decision tree and extract rules
as customer preferences weighted
by price of each rule selected
• Reference each constraint from
applied business rules
• Randomly position insertions per
page X and Y
• Implement chromosome
• Evaluate chromosomes for fittest
• Drive into selection phase
•
Initialization
Evaluation
Selection
Recombination
Mutation
Evaluation
Terminate?
Display results
18. Genetic Operators • Creation
– Start with 1st page
– Select random number of Ad insertions to put in 1st page
– Lets say we have 3 Ad insertions A, B, C, D
– Creation operator generates one offspring D and works as
follows:
• D is initialized to occupy exactly n x 8 Ad cells
• Each Ad insertion is randomlly assigned to an Ad cell
• Ad cells will get enlarged by repeating merge operations
– For each Ad cell C of coordinates X and Y, we compute how far it can be
merged horizontally or vertically with the two following values:
Colspanmax=m-X+1 and Rowspanmax= n- Y +1. Then for this Ad cell, two
desired values for Colspan and Rowspan are randomly generated within
[1,Colspanmax] and [1,Rowspanmax] respectively
– All Ad cells are considered in a random order and we enlarge each of
them according to the desired Colspan and rowspan values. We start by
any direction (vertical or horizontal) and enlarge the Ad cell up to the
desired value provided it does not tviolate Ad insertions/Ad cell constraints
*because when two Ad cells are merged together to fit a big insertion, the
resulting larger Ad cell inhertis of the objects contained in each smaller Ad
cell), and provided that it does not violate page constraints (no overlap,…
etc)
– Empty rows or columns are eliminated
20. Mutation
• Generate offspring D from one parent P with the
same algorithm as in the creation operator, except
that genes of P are used instead of completely
random values.
• D is initialized to n x 3
• Ad cells are mutated
• Other genes are mutated like desired value of
rowspan and colspan
• Ad cells may possibly enlarge according to desired
colspan or rowspan values
• The resulting is that empty rows or columns are
eliminated for saving waste space
21. Mutation
Ad cells
dimensions.. etc
Parents Offspring
A B
CD
A B
CD
A B
C
D
A B
C
D
A B
C
D
Ad cells
locations
22. Crossover
• Combining layouts represented by two
parents p1 and P2 in order to create one
offspring D
• D is initialized to an empty n x 8 page table
• P1 and P2 are centred on an n x 8 page
table
• Insertion Ad cells are placed in D at the
location given by P1 and P2
• Other genes of D are inherited either from P1
or P2, like for instance the desired values of
rowspan and colspan.
• Cells are enlarged as in the creation
operator
• Empty rows or columns are eliminated