Download PVC routing algorithms

Document related concepts
no text concepts found
Transcript
Problemas de otimização em
network design e biologia:
•Ajuste de pesos em roteamento
sob OSPF
• Correspondência de grafos em
reconhecimento de cenas
Celso Carneiro Ribeiro
Seminário do Departamento de Informática
PUC-Rio, Junho 2002
June 14, 2002
Page 1/67
Problemas de otimização em network design e
biologia
Weight setting in OSPF
routing
•
•
•
•
•
Weight setting in OSPF routing
Genetic algorithm for OSPF routing
Population dynamics
Parallel GA for OSPF routing
Numerical results and conclusions
June 14, 2002
Page 2/67
Problemas de otimização em network design e
biologia
Weight setting in OSPF
routing
• Internet traffic has been doubling
each year Coffman & Odlyzko (2001):
in the 1995-96 period (introduction
of web browsers), traffic doubled
every three months!
• Increasingly heavy traffic (due to
video, voice, etc.) is raising the
requirements of the
Internet of
tomorrow.
June
14, 2002
Page 3/67
Problemas de otimização em network design e
biologia
Weight setting in OSPF
routing
• Objective of traffic engineering:
make more efficient use of existing
network resources
• Routing of traffic can have a major
impact on the efficiency of network
resource utilization
June 14, 2002
Page 4/67
Problemas de otimização em network design e
biologia
Packets of information
Contains necessary rou
information, such as IP
destination address.
body
header
Information sent over the Internet is broken into chunks, c
packets or datagrams.
June 14, 2002
Page 5/67
Problemas de otimização em network design e
biologia
Packet routing
When packet arrives at router,
router must decide where to
router
send it next.
router
D1
D2
D3
D4
Packet’s fin
destination.
router
router
R1
R2
router
R3
R4 Routing table
June 14, 2002
Page 6/67
Routing consists in finding
path from source to desti
Problemas de otimização em network design e
biologia
Autonomous systems
To decrease the complexity of
routing, the Internet is divided into
smaller domains, called AutonomousAS1
Systems.
Routing within an AS is done via
Interior Gateway Protocols (IGP),
while between AS’s Exterior Gateway AS3
Protocols (EGP) are used.
June 14, 2002
Page 7/67
AS2
AS4
Problemas de otimização em network design e
biologia
OSPF (Open Shortest Path
First)
• OSPF is the most commonly used
intra-domain routing protocol (IGP).
• It requires routers to exchange
routing information with all other
routers in the AS.
– Complete network topology knowledge is
available to all routers, i.e. state of all
routers and links in the AS.
June 14, 2002
Page 8/67
Problemas de otimização em network design e
biologia
Weight setting in OSPF
routing
• Each link in the AS is assigned an
integer weight  [1,65535=2161]
– Smaller weights may be used: MAX
• Each router computes tree of
shortest weight paths to all
other routers in the AS, with
itself as the root, using
Bottom: Cisco 7000 router
Dijkstra’s algorithm. Top: ForeRunner ASX-200 ATM s
June 14, 2002
Page 9/67
Problemas de otimização em network design e
biologia
Weight setting in OSPF
routing
Routing table is filled
Routing table
D1
D2
D3
D4
D5
D6
R1
root
R1
R2
R3
R1
R3
1
1
2
3
5
3
4
2
June 14, 2002
with first hop routers
for each possible destin
In case of multiple shor
paths, flow is evenly spl
Page 10/67
First hop routers.
6
Destination routers
Cisco 12400 routers
Problemas de otimização em network design e
biologia
Weight setting in OSPF
routing
• OSPF weights are assigned by network
operator
– CISCO assigns, by default, a weight proportional
to the inverse of the available link bandwidth.
– If all weights are unit, the cost of a path is the
number of hops in the path.
• Fortz & Thorup (2000): weight setting by
using local search on large networks with up
to 100 nodes
and 503 links
• Ericsson, Pardalos, & Resende (2001): genetic
algorithm
June 14, 2002
Page 11/67
Problemas de otimização em network design e
biologia
Minimization of congestion
• Directed capacitated network G = (N,A,c),
where N are routers, A are links, and ca is
the capacity of link a  A.
• Same measure of Fortz & Thorup (2000) to
compute congestion (also used for PVC
routing):
 = 1(L1) + 2(L2) + … + |A|(L|A|)
La is the load on link a  A, a(La) is
piecewise linear and convex, and a(0) = 0,
Junefor
14, 2002
Problemas de otimização em network design e
all a Page
A.12/67
biologia
Piecewise linear and convex
a(La) link congestion
measure
70
slope = 5000
60
50
slope = 500
40
30
20
slope = 1
10
slope = 3
slope = 10
slope = 70
0
0
0.2
0.4
0.6
0.8
1
1.2
(Laca )
trunk utilization rate
June 14, 2002
Page 13/67
Problemas de otimização em network design e
biologia
Weight setting in OSPF
routing
• Given a directed network G = (N, A )
with link capacities ca  A and
demand matrix D = (ds,t ) specifying a
demand to be sent from node s to
node t :
– Assign weights wa [1,65535] to each
link a  A, such that the objective
function  is minimized when demand is
routed according to the OSPF protocol.
• Weights are computed off-line and do
not change often
June 14, 2002
Page 14/67
Problemas de otimização em network design e
biologia
Genetic algorithms
done
Initialize and
evaluate P (0); Test termination
Set t = 1
P (t ) is population of
solutions at generation t.
t=t+1
June 14, 2002
Page 15/67
Generate P (t ) crossover
from P (t1)
Alter P (t )
mutation
Evaluate P (t )
Problemas de otimização em network design e
biologia
GA for OSPF: solution
encoding
• Ericsson, Pardalos, & Resende (2001)
• A population consists of nPop integer
weight arrays: w = (w1, w2 ,…, w|A| ),
where wa [1,MAX]
• All possible weight arrays correspond
to feasible solutions, i.e., every
weight setting is feasible
– nice problem feature for application of a
GA
June 14, 2002
Page 16/67
Problemas de otimização em network design e
biologia
GA for OSPF: fitness
evaluation
• Route each demand pair (s,t ) using
OSPF
• Compute loads Las,t on each link a  A
• Add up loads on each link a  A,
yielding total load La on link
• Compute link congestion cost a(La)
for each link a  A
• Add up costs:

=

(L
)
+

(L
)
+
…
+

(L
)
1
1
2
2
|A|
|A|
June 14, 2002
Page 17/67
Problemas de otimização em network design e
biologia
Initial population
• nPop  10 solutions with randomly
generated arc weights, uniformly in
the interval [1,MAX]
• Weight settings of two other common
heuristics:
– OSPF (unit): all weights set to 1
– OSPF (invCap): each arc weight is set
inversely proportional to its arc capacity
– OSPF (fractions): all weights set to
.MAX,
with  = 1/8, 1/4, 3/8, 1/2,
5/8, 3/4, 7/8, 1
June 14, 2002
Page 18/67
otimização em network design e
all but invCap
lead toProblemas
the desame
routing
biologia
Population partitioning
Class A
20% most fit
Population is sorted according
fitness (solution value)  and
solutions are classified into thr
categories.
Class B
Class C
June 14, 2002
10% least fit
Page 19/67
Problemas de otimização em network design e
biologia
Population dynamics
generation t + 1
generation t
Class A
Class A is promoted unchanged
Class A
Class B is replaced by
crossover of:
one Class A parent
and
Class B
Class B
one Class B or C
parent.
Class C
June 14, 2002
Class C is replaced by randomlyClass C
generated solutions.
Page 20/67
Problemas de otimização em network design e
biologia
Parent selection
• Parents are chosen at random:
– one parent from Class A (elite)
– one parent from Class B or C (non-elite)
• Reselection is allowed, i.e. parents can
breed more than once per generation
• Better individuals are more likely to
reproduce
June 14, 2002
Page 21/67
Problemas de otimização em network design e
biologia
Crossover with random keys
Bean (1994): crossover combines elite parent
p1 with non-elite parent p2 to produce
child c :
With small probability child
has single gene mutation.
| do
if rrandom[0,1] < 0.01
then
Child irandom[1,MAX]
is more likely to inherit
gene of elite parent.
0.7 then
June 14, 2002
for all genes i = 1,2,…,|A
Page 22/67
c [i ] =
else if rrandom[0,1] <
Problemas de otimização em network design e
biologia
Parallel GA: local search
• Combine GA with local search
• LS with cost recomputations from
scratch:
– For each arc e with current weight we do:
• Temporarily replace arc weight by (1+ we)/2
• Evaluate fitness
• If new improved solution, update weight and go
to next arc
• Otherwise, temporarily replace arc weight by
(MAX+ we)/2
• Evaluate fitness
• If new improved solution, update weight
June 14, 2002
23/67
Problemas de otimização em network design e
• Go to Page
next
arc
biologia
Parallel GA: local search
• Variants:
– V-1: at each processor, apply LS to the
best solution whenever it is improved
– V-2: at each processor, always apply LS
to the best non-locally optimal solution
June 14, 2002
Page 24/67
Problemas de otimização em network design e
biologia
Parallel GA: cooperation
• P processors
• Whenever a processor improves its
incumbent, the latter is broadcasted
to:
– all other processors
– all closest log P processors (logical
organization)
• At the beginning of each generation,
every processor replaces its worst
Junesolutions
14, 2002
Page
otimização
em network design e
by25/67
thoseProblemas
sentdeby
other
biologia
Numerical results
• Work-in-progress, preliminary results:
GA, LS
– Combine GA+LS? Cooperative // GA?
Scatter search?
• One real world network: AT&T
Worldnet backbone with 90 nodes, 274
links, and 272 pairs
• Compared with cost and maximum
utilizations of the LB lower bound and
several heuristics:
– OSPF(invCap)
June 14, 2002
Page 26/67
Problemas de otimização em network design e
biologia
– Local search of Fortz and
Thorup
Collaborative vs. noncollaborative versions
2.85
collab_v1
nocollab_v1
collab_v2
nocollab_v2
F&T
seqGA-500itr
LPLB
2.8
2.75
2.7
2.65
2.6
2.55
2.5
2.45
2.4
2.35
0
2
4
6
8
10
12
14
processors
June 14, 2002
Page 27/67
Problemas de otimização em network design e
biologia
16
cost
Number of generations: 500 and 8000
2.85
collab_v1-500itr
nocollab_v1-500itr
collab_v1-8000itr
nocollab_v1-8000itr
F&T
seqGA-500itr
LPLB
2.8
2.75
2.7
2.65
2.6
2.55
2.5
2.45
2.4
2.35
0
2
4
6
8
10
12
14
processors
June 14, 2002
Page 28/67
Problemas de otimização em network design e
biologia
16
cost
12
10
8
InvCap
GA //
LPLB
6
4
2
0
0
5000 100001500020000250003000035000400004500050000
scaled internet traffic
June 14, 2002
Page 29/67
Problemas de otimização em network design e
biologia
2
InvCap
GA //
LPLB
1.5
1
0.5
0
0
5000 100001500020000250003000035000400004500050000
scaled internet traffic
June 14, 2002
Page 30/67
Problemas de otimização em network design e
biologia
Concluding remarks
• Sequential GAOSPF produced as good
solutions as LS for most instances, even
better in some cases.
• GA generally finds good solutions close
to the LP lower bound.
• //GA+LS works very well on real-world
AT&T Worldnet backbone network,
significantly increasing traffic and
Internet capacity over CISCO’s
recommended weight setting strategy.
June
14, 2002
Page 31/67
Problemas
de otimização
em network design e
• Extensions:
speedup
LS,
improve
biologia
Graph matching for scene
recognition
•
•
•
•
Scene recognition
Graph matching
Problem formulation
GRASP heuristic
June 14, 2002
Page 32/67
Problemas de otimização em network design e
biologia
Scene recognition
• The recognition of complex scenes
requires not only a detailed description
of the objects involved, but also of the
spatial relationships between them.
• The diversity of the forms of the same
object in different instantiations of a
scene, and also the similarities of
different objects in the same scene
make relationships between objects of
June 14, 2002
Page 33/67
Problemas de otimização em network design e
prime importance
in order biologia
to remove
Scene recognition
• Graph based representations often
used for scene representation in
image processing:
– Vertices represent the objects in the
scene
– Edges represent the relationships
between the objects
• Relevant information for the
recognition is extracted from the
scene and represented by relational
attributed graphs.
• Model-based recognition: both the
June 14, 2002
Page 34/67
Problemas de otimização em network design e
model and
the scene
are represented
biologia
Motivation
• Medical imaging: recognition of brain
structures from magnetic resonance
images
• Model: each node represents one
anatomical structure, while edges
represent spatial relationships.
• Inaccuracies are one of the main
problem characteristics:
– Unexpected objects (pathologies, for
instance)
– Expected objects not found
– Deformations of objects
–14,Attributes
in the image
in the
model
June
2002
Page 35/67
Problemas and
de otimização
em network
design e
biologia
may be imprecise
Motivation
(a) normal brain(b) pathological brain (c) representation of a
with a tumor
brain atlas (each grey
level corresponds to a
unique connected
structure)
June 14, 2002
Page 36/67
Problemas de otimização em network design e
biologia
Scene recognition
• Similar problems: character
recognition, aerial or satellite image
interpretation using a map, face
recognition, etc.
• Search for the best correspondence
formulated as a combinatorial
optimization problem defined by the
relational attributed graphs
the
Junerepresenting
14, 2002
Page 37/67the model
Problemas de and
otimização
em network design e
biologia
Graph matching
• Attributed graphs widely used in
pattern recognition problems:
construction depends on the
imperfections of the scene or of the
model, and on the attributes of the
object relations
• One single vertex for each region of
each image
• Once the graph has been constructed,
vertex and edge attributes are
computed.
• Finally, vertex-similarity and edgesimilarity
matrices
are
computed
from
June 14, 2002
Page 38/67
Problemas de otimização em network design e
biologia
the values of the attributed
graphs,
Graph matching
• G1 = (N1,E1): model
• G2 = (N2,E2): over-segmented image
• Each solution of the graph matching
problem is a correspondence between
the vertex and edges of the graphs
representing the model and the image
June 14, 2002
Page 39/67
Problemas de otimização em network design e
biologia
Example: two solutions
June 14, 2002
Page 40/67
Problemas de otimização em network design e
biologia
Graph matching
• Each node of G2 is associated with one
node of G1:
– xij = 1, if nodes i  N1and j N2 are
associated
– xij = 0, otherwise.
• Each solution may be represented by a
bipartite graph G' = (N1  N2,E'):
– each edge (i,j)  E‘ = {(i,j), i  N1, j  N2 |
xij = 1} corresponds to the association of i
 N1 with j  N2.
– A(i) = { j  N2 | (i,j)  E'} is the subset of
June 14, 2002
Problemas de
otimização
network design e
nodes ofPageN41/67
with
i emN
2 associated
1
biologia
Objective function
• Similarity matrices constructed from
similarity values calculated from
graph attributes.
• sv(i,j)  [0,1] represents the vertexsimilarity between vertices i  N1 and
j  N2
• se(u,v)  [0,1] represents the edgesimilarity between edges u  E1 and v
June
14, 2002
Page 42/67
Problemas de otimização em network design e
E2
biologia
Objective function
Maximize G’
June 14, 2002
Page 43/67
Problemas de otimização em network design e
biologia
Constraints
1.  exactly one node i  N1 such that
(i,j)  E‘ (i.e. xij = 1),  j  N2
2. The subgraph induced in G2 by A(i) is
connected,  i  N1
3.  at least one node j  N2 such that
(i,j)  E',  i  N1
4. xij = 1  sv(i,j) > 0,  i  N1,  j  N2
June 14, 2002
Page 44/67
Problemas de otimização em network design e
biologia
GRASP
For i = 1,…,MaxIterations
Build a feasible correspondence;
Apply local search to improve the
correspondence;
Update the best solution found;
End;
June 14, 2002
Page 45/67
Problemas de otimização em network design e
biologia
Construction
For k = 1,…,MaxTrials
Generate a random permutation of N2;
For each node j N2
Randomly search all nodes in N1;
Associate to j a node i  N1 satisfying the
constraints;
Remove i from N1;
End;
If a feasible solution was built, then return;
End;June 14, 2002
Page 46/67
Problemas de otimização em network design e
biologia
Local search
• Iterative improvement (first
improvement)
• Neighborhood:
– Consider every pair of nodes j1  N2, j2
 N2
– Let i1 = A-1(j1) and i2 = A-1(j2)
– Exchange the associations:
A(i1)  A(i1) – {j1}  {j2}
A(i )  Page
A(i47/67
 {j1}de otimização em network design e
2) – {j2}Problemas
June 14, 2002 2
biologia
Example
Cut of a muscle:
(a) original 2-D image
(b) model
14
vertices
26 edges
June 14, 2002
Page 48/67
(c) over-segmented image
28
vertices
62 edges
Problemas de otimização em network design e
biologia
June 14, 2002
Page 49/67
Problemas de otimização em network design e
biologia
Summary
• Data:
– Image to be recognized
– Atlas of images
• Examples:
– Identification of tumors
– Facial recognition
• Images represented by graphs:
– Nodes: image regions
– Edges: relations among regions
(boundaries)
– Attributes: colors, intensities,
adjacencies,
etc. Problemas de otimização em network design e
June 14, 2002
Page 50/67
biologia
Summary
• Similarities between pairs of vertices
and pairs of edges (model-image)
• Problem:
– Determine the most similar model in the
atlas with respect to the image to be
recognized
– Determine the optimal correspondence
between the regions of the model and
those in the image
• Other applications
June 14, 2002
Page 51/67
Problemas de otimização em network design e
biologia
Problema da filogenia
• Uma filogenia é uma árvore que relaciona
espécies ou genes homólogos de espécies
distintas (taxons)
• Dado um conjunto de taxons
caracterizados por um conjunto de
caracteres, obter uma
a bfilogenia
c d com
e fo g
menor número de
passos
evolucionários
O 0 0 0 0 0 0 0
(mudança de um caracter)
A 1 1 0 0 1 1 1
• Exemplo:
B 1 1 1 1 1 1 1
C
June 14, 2002
Page 52/67
1
1
1
1
0
0
Problemas de otimização em network design e
biologia
0
Problema da filogenia
Exemplo:
O
A
B
C
a
0
1
1
1
b
0
1
1
1
Solução com 10
passos:
June 14, 2002
Page 53/67
c
0
0
1
1
d
0
0
1
1
e
0
1
1
0
f
0
1
1
0
g
0
1
1
0
Solução com 9
passos:
Problemas de otimização em network design e
biologia
Roteamento de circuitos virtuais
privados
• Circuitos virtuais privados (PVCs) entre
os pares origem e destino de cada cliente
em um backbone
• Roteamento de cada cliente feito pelo
projetista sem conhecimento de
demandas futuras
• Ineficiência e necessidade ocasional de
rotear os PVCs offline
• Problema: minimizar atrasos e congestão,
satisfazendo as demandas e restrições de
capacidade
•June
Aplicação
desenvolvida
a em
AT&T:
14, 2002
Page
54/67
Problemaspara
de otimização
network design e
biologia
melhoria sensível do desempenho
e do
Roteamento de PVCs
June 14, 2002
Page 55/67
Problemas de otimização em network design e
biologia
Roteamento de PVCs
June 14, 2002
Page 56/67
Problemas de otimização em network design e
biologia
Roteamento de PVCs
June 14, 2002
Page 57/67
Problemas de otimização em network design e
biologia
Roteamento de PVCs
June 14, 2002
Page 58/67
Problemas de otimização em network design e
biologia
Roteamento de PVCs
capacidade máxima =
June 14, 2002
Page 59/67
Problemas de otimização em network design e
biologia
Roteamento de PVCs
capacidade máxima =
rerotear
Caminho longo!
June 14, 2002
Page 60/67
Problemas de otimização em network design e
biologia
Roteamento de PVCs
capacidade máxima =
June 14, 2002
Page 61/67
Problemas de otimização em network design e
biologia
Roteamento de PVCs
Viável e ótima!
June 14, 2002
Page 62/67
capacidade máxima =
Problemas de otimização em network design e
biologia
Projeto de redes locais de
acesso
• Construir uma rede de fibras óticas para
prover serviços de banda larga a
consumidores comerciais e residenciais,
levando em consideração o balanceamento
entre os custos de construção (colocação
das fibras) e os rendimentos potenciais
dos clientes atendidos (perda de receita
no caso do cliente não ser atendido).
• Problema de Steiner com prêmios:
Juneaplicação
14, 2002
Page
63/67
Problemas de
otimização
em
network design e
desenvolvida
para
a
AT&T
biologia
Projeto de redes locais de
acesso cliente
penalidade nula
rua
(prêmio)
raiz
June 14, 2002
Page 64/67
Problemas de otimização em network design e
biologia
Projeto de redes locais de
acesso
June 14, 2002
Page 65/67
Problemas de otimização em network design e
biologia
Projeto de redes a kcaminhos
• Dados:
– Grafo suporte para a construção de uma
rede
– Conjunto de pares origem-destino
– Custo de construção de cada arco
• Problema: construir uma rede de custo
mínimo, na qual todos os pares origemdestino são conectados por caminhos
usando no máximo k arcos
•JunePara
que Page
a confiabilidade
da rede seja
14, 2002
66/67
Problemas de otimização em network design e
biologia
alta, todos os caminhos devem ser
Slides and publications
• Slides of this talk can be downloaded
from: http://www.inf.puc-
rio/~celso/talks/curico.ppt
• Paper about sequential GA for OSPF setting
available at:
http://www.research.att.com/~mgcr/doc/gaos
pf.pdf
• Paper about parallel GA for OSPF setting in
June 14, 2002
Page 67/67
Problemas de otimização em network design e
preparation
(with L. Buriol,
M.G.C.
Resende,
biologia