Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Lorenzo Castelli
ICTP ITU School on New Perspectives in Wireless Networking Trieste, 27 February 2008
Outline
Introduction to Optimization A simple case study Basics in Linear Optimization Simplex Algorithm Integer Programming References and Resources A research topic
New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
9 3 7 4 6 8
2 7
3 9 4
2 6
3 5
9 3 7 4 6 8
2 7
3 9 4
L = 71
2 6
3 5
9 3 7 4 6 8
2 7
3 9 4
L = 62
2 6
3 5
An Optimization Problem
Let S " ! n be the Feasible Set or the Set of feasible solutions Let f : S a ! be a real function to be optimized, i.e., maximized or minimized. It is called objective function The solution of an optimization problem is to find the set of optimal solutions, i.e.,
OptSolM = s * ! S : f ( s * ) # f ( s ) "s ! S
OptSolm
{ } = { ! S : f ( s ) # f ( s ) "s ! S } s
* *
L. Castelli University of Trieste
Numerical Example
max f(x,y) = x + y S = {x 0; y 0; x 4; y 2; 3x + 5y 15} y
3
x* = 4.0 y* = 0.6
S
1 2 3 4
s* x
5
f(x*,y*) = 4.6
Optimization characteristics The objective function can be linear or non-linear (e.g., quadratic) continous or not (e.g., fixed cost) differentiable or not (e.g., piecewise linear) The feasible set can be convex or not
s0
Integer Programming (IP) We define IP when all elements in S assume only integer (or binary) values If some elements in S assume integer (or binary) values, whereas other elements assume continous values, we refer to as Mixed Integer LP (MILP)
New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Optimization process Analyse the system to optimize Formulate the model Solve the model by appropriate algorithms
Geographic specifications
A schematic map of the region with the division into communities and the possible locations for transmitters Every potential site is indicated by a black dot with a number, every community is represented by a polygon. The number in the center of a polygon is the number of the community
Source: Applications of Optimization, Chap. 7 www.dashoptimization.com New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
1.8
1.3
4.0
3.5
3.8
2.6 7,10,11,12,1 5
2.1 12,13,14,1 5
Communities covered
1,2,4
2,3,5
4,7,8,10
5,6,8,9
8,9,12
Source: Applications of Optimization, Chap. 7 www.dashoptimization.com New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Data on population
Community
1 2
4 5 6 7
10 11 12 13 14 15 6 14 9 3 6
Population (000) 2 4 13 6 9 4 8 12 10 11
Source: Applications of Optimization, Chap. 7 www.dashoptimization.com New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Management dilemma
Where should the transmitters be built to cover the largest population with the given budget limit of 10M?
Source: Applications of Optimization, Chap. 7 www.dashoptimization.com New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Model Formulation
Formulation steps
Identify the decisions to be taken which are the variables of what type (i.e., continous, integer, binary) Define the objective function Determine the constraints Identify the available data, i.e., matrix A and vectors b and c
New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Identify the variables Two types of binary variables are required variables xc that are 1 if and only if a community c is covered by a transmitter variables yp that are 1 if and only if a transmitter is built at site p
Source: Applications of Optimization, Chap. 7 www.dashoptimization.com New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
max
c"COMMS
! POP # x
c
Source: Applications of Optimization, Chap. 7 www.dashoptimization.com New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Budget constraint
It is necessary to remain within the budgetary limits, i.e., the total construction cost for transmitters has to be not greater than the given maximum budget
p"PLACES
! COST
$ y p # BUDGET
Source: Applications of Optimization, Chap. 7 www.dashoptimization.com New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
p!PLACES
% COVER
pc
$ y p # xc
"c ! COMMS
express one direction of the equivalence by specifying that the sum COVERpc yp is greater than or equal to xc
Source: Applications of Optimization, Chap. 7 www.dashoptimization.com New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Coverage constraints (II) The other direction of the equivalence is ensured through the maximization of the population covered The optimization algorithm will not leave any xc at 0 if any transmitter that covers this community is built
Source: Applications of Optimization, Chap. 7 www.dashoptimization.com New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Binary constraints
All the variables are binary
Source: Applications of Optimization, Chap. 7 www.dashoptimization.com New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
c"COMMS
! POP # x
c
p
p"PLACES
! COST
pc
$ y p # BUDGET
"c ! COMMS
p!PLACES
% COVER
$ y p # xc
Problem size 15 communities, 7 sites 15 + 7 = 22 binary variables 222 = 4 194 304 15 + 1 = 16 constraints dim A = 16 x 22
New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Exercise Formulate an IP model to determine the GSM transmitters location of minimum cost such that ALL the communities are covered No budget constraint
Exercise Solution
min
p!PLACES
COSTp " y p
p!PLACES
Computational Complexity If all the variables are real, it is easy to solve the problem, i.e., it exists an algorithm running in polinomial time When integer or binary variables, we may face difficult problems, i.e., NPhard
s0
Solving LP problems A LP problem is easy to solve Simplex algorithm Interior point method Most used is the Simplex algorithm Theoretically it is not a fast algorithm, but it is solved quickly in practice
New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
The simplex algorithm The feasible set is a convex set The optimal solution, if it exists, lies on a vertex of the feasible set At each step of the algorithm the objective function does not decrease (if maximization) or does not increase (if minimization)
New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
y
3
A
2
s*
D
We move from one vertex to an adjacent one, without worsening the objective function
5 L. Castelli University of Trieste
The simplex algorithm detects If the feasible set is empty or not If not empty If the set of optimal solution is empty or not If not empty If there is a unique or infinite solutions
New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Even large istances can be solved in a few seconds with freely available or commercial software E.g., Flux Balance Analysis to model fluxes in a metabolic network of a cell: 800 rows and 1200 columns
Integer Programming The feasibility set is no longer convex What is a vertex of the feasible set?
y
max f(x,y) = x + y
3
A
2 1
s*
C D
f(s*) = 4
5 L. Castelli University of Trieste
IP The Feasible Set Differently from LP, the IP feasible set is composed of a finite number of points It may turn out to be unworkable to enumerate them all Alternative algorithms are required
IP Solving Algorithms
Exact Algorithms (e.g., Branch&Bound, Gomory cuts) reach soon or later the optimal solution may run in exponential time Approximate Algorithms (e.g., Christofides for TSP) run in polynomial time do not necessarily reach the optimum the gap between the optimum and the found solution is bounded Heuristics run in polynomial time do not necessarily reach the optimum the gap between the optimum and the found solution is unknown Metaheuristics Genetic Algorithms, Tabu Search, Simulated Annealing
GAP
Global Optimum
New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Implementing the algorithms Simplex and exact MIP algorithms are available through ad-hoc optimization software XPress-MP, ILOG CPLEX, GLPK, Approximate and heuristic algorithms can be written in any language, as C, C++, FORTRAN, Libraries, interfaces are available
New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
! Objective: total population covered Coverage:= sum(c in COMMS) POP(c)*covered(c) ! Towns covered forall(c in COMMS) sum(p in PLACES) COVER(p,c)*build(p) >= covered(c) ! Budget limit sum(p in PLACES) COST(p)*build(p) <= BUDGET forall(p in PLACES) build(p) is_binary forall(c in COMMS) covered(c) is_binary ! Solve the problem maximize(Coverage) end-model
Source: Applications of Optimization, Chap. 7 www.dashoptimization.com New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Location of GSM transmitters - Solution Total coverage: 109 Total cost: 9.5 Build transmitters: 2 4 6 7 Communities covered: 2 3 5 6 7 8 9 10 11 12 13 14 15 Communities 1 and 4 are NOT covered
Source: Applications of Optimization, Chap. 7 www.dashoptimization.com New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Set Covering Problem - Solution All Communities covered Total cost: 11.3 Build transmitters: 1 2 4 6 7
A joint research ARPL Lab - UniTS Minimum cost placement of WI-FI access points considering Directional antennas Client coverage The presence of obstacles Overlapping channels We have to decide with type of antenna and in which location
New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Interference Graph
There is an arc if two antennas interfere when using the same channel Only 3 channels available (1,6,11) A feasible solution is a 3-colour graph
New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Interference Graph
There is an arc if two antennas interfere when using the same channel Only 3 channels available (1,6,11) A feasible solution is a 3-colour graph
L. Castelli University of Trieste
Feasible solution
New Perspectives in Wireless Networking ICTP, 27 Feb 08
Interference Graph
There is an arc if two antennas interfere when using the same channel Only 3 channels available (1,6,11) A feasible solution is a 3-colour graph
New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste
Interference Graph
By taking away any point in the dotted square we may have a feasible solution Feasibitly requires that the dimension of the max clique is 3 (difficult problem, NP-complete)
L. Castelli University of Trieste
Unfeasible solution
New Perspectives in Wireless Networking ICTP, 27 Feb 08
Contact Details Lorenzo Castelli DEEI University of Trieste Via A. Valerio 10 34127 Trieste, Italy Email: castelli[at]units.it Url: www.units.it/castelli
New Perspectives in Wireless Networking ICTP, 27 Feb 08 L. Castelli University of Trieste