Algoritmos Heurísticos de Cobertura de Arcos
Algoritmos Heurísticos de Cobertura de Arcos
Algoritmos Heurísticos de Cobertura de Arcos
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Esta Unida<strong>de</strong> contém as rotinas <strong>de</strong> representação gráfica<br />
// dos grafos manhattan, e a animação dos roteiros.<br />
// Versão 2. Junho <strong>de</strong> 2003.<br />
unit AnimaGrafo;<br />
interface<br />
uses<br />
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br />
StdCtrls, ExtCtrls, Math, ExtDlgs;<br />
type<br />
TForm10 = class(TForm)<br />
Button1: TButton;<br />
Button2: TButton;<br />
Button3: TButton;<br />
Button4: TButton;<br />
OpenDialog1: TOpenDialog;<br />
OpenPictureDialog1: TOpenPictureDialog;<br />
Image1: TImage;<br />
PaintBox1: TPaintBox;<br />
Button5: TButton;<br />
procedure Button1Click(Sen<strong>de</strong>r: TObject);<br />
procedure PaintBox1Paint(Sen<strong>de</strong>r: TObject);<br />
procedure Button2Click(Sen<strong>de</strong>r: TObject);<br />
procedure Button3Click(Sen<strong>de</strong>r: TObject);<br />
procedure Button4Click(Sen<strong>de</strong>r: TObject);<br />
procedure Button5Click(Sen<strong>de</strong>r: TObject);<br />
private<br />
{ Private <strong>de</strong>clarations }<br />
public<br />
{ Public <strong>de</strong>clarations }<br />
end;<br />
var<br />
Form10: TForm10;<br />
implementation<br />
uses Urandgraf, NegCircuit, UPrincipal, ConstRe<strong>de</strong>;<br />
{$R *.DFM}<br />
Type<br />
TLink = Record<br />
Tipo: Integer; // Tipo <strong>de</strong> Link no arquivo original:<br />
// 0: aresta 1: arco<br />
Noi: Integer;<br />
Nof: Integer;<br />
End;<br />
TNo = Record<br />
ci:Integer; // coor<strong>de</strong>nada i<br />
cj:Integer; // coor<strong>de</strong>nada j<br />
End;<br />
TRota = Record<br />
Noi: Integer;<br />
Nof: Integer;<br />
Tipo: String[1]; // Tipo <strong>de</strong> link no arquivo rota: + - > D<br />
Arc: Integer;<br />
Or<strong>de</strong>m:Integer;<br />
FreqTotal:Integer;<br />
end;<br />
Var Raio:Integer;<br />
Re<strong>de</strong>,Roteiro:TextFile;<br />
ArqNome,ArqSol,ArqMapa:String;<br />
CompArco,PenaNormal,PenaDiag: Integer;<br />
160