15.11.2013 Views

Esqueleto Algorítmico - ulpgc

Esqueleto Algorítmico - ulpgc

Esqueleto Algorítmico - ulpgc

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Implementación Secuencial y Paralela de Técnicas Algorítmicas:<br />

Aplicación a Problemas de Optimización Combinatoria<br />

Seminario Invitado: Dpto Métodos Cuantitativos en Economía y Gestión<br />

Introducción<br />

Interfaz de<br />

Usuario<br />

Patrones<br />

Secuenciales<br />

Patrones Paralelos<br />

Experimentos<br />

Computacionales<br />

Conclusiones<br />

Patrón de Resolución<br />

Ramificación y<br />

Acotación Secuencial<br />

Patrón de Resolución<br />

Divide y Vencerás<br />

Secuencial<br />

Combinación de<br />

<strong>Esqueleto</strong>s<br />

Mª Isabel Dorta González<br />

Marzo, 2007<br />

Algoritmo Secuencial para el <strong>Esqueleto</strong> MaLLBa:BnB<br />

1 Bound BB (const Problem& pbm, const SubProblem& sp,<br />

2 Solution& sol) {<br />

3 branchQueue bqueue;<br />

4 Solution sl;<br />

5 Bound high, low;<br />

Maximización<br />

6 SubProblem sp;<br />

7 bqueue.insert(sp);<br />

8 while (!bqueue.empty()) {<br />

9 sp = bqueue.remove();<br />

10 high = sp.upper_bound (pbm, sl);<br />

11 if (high > bestSol){<br />

12 low = sp.lower_bound(pbm, sl);<br />

13 if (low > bestSol) {<br />

14 bestSol = low;<br />

15 sol = sl;<br />

16 }<br />

17 if (low != high)<br />

18 sp.branch(pbm, bqueue);<br />

19 } }<br />

20 return(bestSol);<br />

21 }

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!