Professional Documents
Culture Documents
Lothar Thiele
ETH Zurich, Switzerland
3. Real-Time Scheduling
5. Performance Analysis
DV
lane a require
v, a
Br
v Dr
v=f(t)
?
point of
gear
change Dr
decision lane
t
n
gear R
4
2
5
3
1
gear
objective
x, v, a
lane, x, v
a,gear, n
Optimization Algorithm:
only allowed to evaluate f
(direct search)
?
Goal: choose subset that
maximizes overall profit
minimizes total weight
profit
20
15
10
weight
500g 1000g 1500g 2000g 2500g 3000g 3500g
selecting a
20 solution
15
finding the good
10 solutions
weight
500g 1000g 1500g 2000g 2500g 3000g 3500g
Swiss Federal Computer Engineering
Institute of Technology 4-8 and Networks Laboratory
Decision Making: Selecting a Solution
Approaches: profit more important than cost (ranking)
weight must not exceed 2400g (constraint)
profit
20
15
too heavy
10
weight
500g 1000g 1500g 2000g 2500g 3000g 3500g
Swiss Federal Computer Engineering
Institute of Technology 4-9 and Networks Laboratory
Optimization Alternatives
y2 y2
y1 y1
parameter-oriented set-oriented
scaling-dependent scaling-independent
Swiss Federal Computer Engineering
Institute of Technology 4 - 11 and Networks Laboratory
Scalarization Approach
parameters
multiple single
objectives objective
(y1, y2, , yk) transformation y
y = w1y1 + + wkyk
y1
Swiss Federal Computer Engineering
Institute of Technology 4 - 12 and Networks Laboratory
A Generic Multiobjective EA
population archive
evaluate
update
sample
truncate
vary
min. y1
Swiss Federal Computer Engineering
Institute of Technology 4 - 14 and Networks Laboratory
Design Space Exploration
Specification
Specification Optimization
Optimization Evaluation
Evaluation Implementation
Implementation
power
consumption latency
cost
UCB Rabaey
Embedded
Embedded
Internet
Internet
Devices
Devices method (a)(fsd)
for I=1 to n
do nothing
call comm(a,dsf,*e);
Wearable
WearableComputing
Computing
end for
Access Core
Mobile
MobileInternet
Internet
Swiss Federal
Institute of Technology
? 4 - 17
Computer Engineering
and Networks Laboratory
Optimization Scenario: Overview
Multi-Objective Optimization
Introduction
Multi-Objective Optimization
Algorithm Design
Design Choices
Representation
Fitness and Selection
Variation Operators
Implementation
Design Space Exploration
System Design
Problem Specification
Example
Swiss Federal Computer Engineering
Institute of Technology 4 - 19 and Networks Laboratory
Dominance, Pareto Points
y2 y2
better
incomparable dominated
worse incomparable
y1 y1
Randomized
search algorithm
t = 1: t t+1:
(randomly) choose a (randomly) choose a
solution x1 to start with solution xt+1 using solutions
x1, , xt
mating
selection
environmental
selection
EA 1 both
evolutionary algorithm
TS 1 no mating selection
tabu search
SA 1 no mating selection
simulated annealing
Remarks:
Not all functions equally likely and realistic
We cannot expect to design the algorithm beating all others
Ongoing research: which algorithm suited for which class of
problem?
Swiss Federal Computer Engineering
Institute of Technology 4 - 25 and Networks Laboratory
Topics
Multi-Objective Optimization
Introduction
Multi-Objective Optimization
Algorithm Design
Design Choices
Representation
Fitness and Selection
Variation Operators
Implementation
Design Space Exploration
System Design
Problem Specification
Example
Swiss Federal Computer Engineering
Institute of Technology 4 - 26 and Networks Laboratory
Design Choices
0011 0111
parameters
0011 0100
0000
1011 0011
y1
How to guide the population
towards the Pareto set?
Convergence
" fitness assignment
Swiss Federal Computer Engineering
Institute of Technology 4 - 28 and Networks Laboratory
Comparison of Three Implementations
2-objective knapsack problem
SPEA2
VEGA
extended
VEGA
Trade-off between
distance and diversity?
Multi-Objective Optimization
Introduction
Multi-Objective Optimization
Algorithm Design
Design Choices
Representation
Fitness
Variation Operators
Implementation
Design Space Exploration
System Design
Problem Specification
Example
Swiss Federal Computer Engineering
Institute of Technology 4 - 30 and Networks Laboratory
Representation
search space decoder solution space objectives objective space
1 0 1 1 1 0
1 0 1 1 1 0
m
1 0 1 1 1 0
nodes A B C D E F
selected? 1 0 1 1 1 0
nodes A B C D E F
colors 1 2 1 3 1 2
parameters x1 x2 x3 x4 xn
values 0.33 0.53 1.03 3.25 9.83
[Michalewicz, Fogel: How to Solve it. Springer 2000]
Swiss Federal Computer Engineering
Institute of Technology 4 - 34 and Networks Laboratory
Tree Example: Parking a Truck
steering u
angle
cab
d
dock
trailer
t
position (x,y)
Goal:
find function c with
constant speed u = c(x, y, d, t)
Swiss Federal Computer Engineering
Institute of Technology 4 - 35 and Networks Laboratory
Search Space for the Truck Problem
Operators:
Arguments: X position x
Y position y
DIFF cab angle d
TANG trailer angle t
Search space : set of symbolic expression using the above
operators and arguments
Swiss Federal Computer Engineering
Institute of Technology 4 - 36 and Networks Laboratory
Example Solution: Tree Representation
MULT
MINUS PLUS
X DIFF Y TANG
Multi-Objective Optimization
Introduction
Multi-Objective Optimization
Algorithm Design
Design Choices
Representation
Fitness and Selection
Variation Operators
Implementation
Design Space Exploration
System Design
Problem Specification
Example
Swiss Federal Computer Engineering
Institute of Technology 4 - 39 and Networks Laboratory
Fitness Assignment
Fi = f ( m (i) )
Difficulties:
multiple objectives have to be considered (Pareto set is sought)
multiple optima need to be approximated (how to consider
diversity?)
constraints are involved which have to be met
Fitness function:
execution time
F (1) = 3
F ( 2) = 1
2 6
F ( 3) = 1
1 3
F ( 4) = 2
4 F (5) = 1
5 F (6) = 0
cost
Swiss Federal Computer Engineering
Institute of Technology 4 - 41 and Networks Laboratory
Constraint Handling
Constraint = g(x1, x2, , xn) 0 feasible g0
infeasible
g<0
Approaches:
construct initialization and variation such that infeasible
solutions are not generated (resp. not inserted)
representation is such that decoding always yields a feasible
solution
calculate constraint violation (- g(x1, x2, , xn) ) and incorporate it
into fitness, e.g., Fi = f ( m (i) ) - g(x1, x2, , xn) (fitness to be
maximized)
code constraint as a new objective
Swiss Federal Computer Engineering
Institute of Technology 4 - 42 and Networks Laboratory
Selection
" #
uniformly choose compare fitness
T individuals at and copy best
random independently individual
of fitness in mating pool
Multi-Objective Optimization
Introduction
Multi-Objective Optimization
Algorithm Design
Design Choices
Representation
Fitness and Selection
Variation Operators
Implementation
Design Space Exploration
System Design
Problem Specification
Example
Swiss Federal Computer Engineering
Institute of Technology 4 - 45 and Networks Laboratory
Example: Vector Mutation
Bit vectors: 1 0 1 1 1 0
each bit is flipped with probability 1/6
1 0 0 1 1 0
Permutations: 1 2 3 4 5 6 1 4 3 2 5 6
swap
1 2 3 4 5 6 1 3 4 2 5 6
rearrange
Swiss Federal Computer Engineering
Institute of Technology 4 - 46 and Networks Laboratory
Example: Vector Recombination
Bit vectors:
1 1 0 0 1 0
1 1 0 0 0 1
1 0 1 0 0 1
Permutations:
1 2 3 4 5 6 child
parents 1 2 3 6 4 5
6 2 3 4 1 5
X Y
MULT DIFF
exchange
Y TANG
non-dominated solutions:
2
F = #dominated solutions
4+2
dominated solutions
2
3 F = # of non-Pareto solutions +
4+2+3 strengths of dominators
4+3
4+2+2+3
y1
Multi-Objective Optimization
Introduction
Multi-Objective Optimization
Algorithm Design
Design Choices
Representation
Fitness and Selection
Variation Operators
Implementation
Design Space Exploration
System Design
Problem Specification
Example
Swiss Federal Computer Engineering
Institute of Technology 4 - 51 and Networks Laboratory
What Is Needed
A framework that
Provides ready-to-use modules (algorithms / applications)
Is simple to use
Is independent of programming language and OS
Comes with minimum overhead
Representation
Selection
Recombination Objective functions
Fitness assignment
Archiving Mutation
Multi-Objective Optimization
Introduction
Multi-Objective Optimization
Algorithm Design
Design Choices
Representation
Fitness and Selection
Variation Operators
Implementation
Design Space Exploration
System Design
Problem Specification
Example
Swiss Federal Computer Engineering
Institute of Technology 4 - 55 and Networks Laboratory
Design Space Exploration
Application Architecture
Mapping
Estimation
multiobjective
optimization
architecture performance
f 1, f 2, K
Goal:
schedule mapping architecture
1 3
5
2 4
design point
chromosome = encoded
allocation + binding (implementation)
fitness evaluation
fitness
user constraints
Multi-Objective Optimization
Introduction
Multi-Objective Optimization
Algorithm Design
Design Choices
Representation
Fitness and Selection
Variation Operators
Implementation
Design Space Exploration
System Design
Problem Specification
Example
Swiss Federal Computer Engineering
Institute of Technology 4 - 60 and Networks Laboratory
Basic Model Problem Graph
1 2
Interpretation:
VP consists of functional
5 6 nodes VPf (task, proce-
dure) and communication
3
nodes VPc .
7 EP represent data depend-
encies
4
1
Definition: A specifica-
tion graph is a graph 5 RISC
GS=(VS,ES) consisting
of a problem graph GP, 3 SB
ES=EPEAEM 6 HWM2
4
GP EM GA
1
0 1
0
Definition: Given a 1 5 RISC
specification graph GS 8
an implementation is a 21 3 SB
triple (,,), where 29 7
1
HWM1
is a feasible allocation, 20
is a feasible binding, 1 2
and is a schedule. 1
21 6 RISC HWM1
2 PTP bus
30 4 shared
bus
HWM2
Encoding of (allocation+binding)
simple encoding
eg. one bit per resource, one variable per binding
easy to implement
many infeasible partitionings
encoding + repair
eg. simple encoding and modify such that for each vp VP there
exists at least one va VA with a (vp) = va
reduces number of infeasible partitionings
Generation of the initial population, mutation
Recombination
Multi-Objective Optimization
Introduction
Multi-Objective Optimization
Algorithm Design
Design Choices
Representation
Fitness and Selection
Variation Operators
Implementation
Design Space Exploration
System Design
Problem Specification
Example
Swiss Federal Computer Engineering
Institute of Technology 4 - 68 and Networks Laboratory
Exploration - Case Study (1)
output module
subtract/add module
DCT/IDCT module Huffman encoder
350
300
250
power consumption 200
150
1000
200
50
300
100
latency 400 cost
150
500
200
SBS
SBF