09.05.2013 Views

Algoritmos Heurísticos de Cobertura de Arcos

Algoritmos Heurísticos de Cobertura de Arcos

Algoritmos Heurísticos de Cobertura de Arcos

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

end;<br />

Procedure Transform;<br />

var Pro:Boolean;<br />

Begin<br />

M2:=M1+ME;<br />

//Cria‡Æo <strong>de</strong> <strong>Arcos</strong> <strong>de</strong> ConexÆo ************************<br />

For a:=1 To M2 Do<br />

Begin<br />

For b:=1 To M2 Do<br />

If Link[a].Too = Link[b].From Then<br />

begin<br />

L[Link[a].Arc.Nof, Link[b].Arc.Noi] := 0;<br />

// Checando para ver se o arco <strong>de</strong> conexão é <strong>de</strong> um retorno U<br />

If (Link[a].From = Link[b].Too) And (Form1.CheckBox1.Checked)<br />

Then L[Link[a].Arc.Nof, Link[b].Arc.Noi] := Penalida<strong>de</strong>;<br />

// Checando para ver se o arco <strong>de</strong> conexão é uma Conversão diferente<br />

If (Link[a].From Link[b].Too) And (Form1.CheckBox3.Checked)<br />

Then L[Link[a].Arc.Nof, Link[b].Arc.Noi] :=<br />

CustoConversao(Link[a].From, Link[a].Too, Link[b].Too);<br />

If ArqErrado Then Exit<br />

end;<br />

End;<br />

End;<br />

Procedure Floyd;<br />

Begin<br />

Form1.ProgressBar1.Enabled:=true;<br />

Form1.ProgressBar1.Position:=0;<br />

For K:=1 To 2*M2 Do<br />

Begin<br />

For I:=1 To 2*M2 Do<br />

If (IK) And (L[I,K]Inf) Then<br />

For J:=1 To 2*M2 Do<br />

If (JK) And (L[K,J]Inf) Then<br />

If L[I,K]+L[K,J]

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

Saved successfully!

Ooh no, something went wrong!