01.07.2013 Views

9. Anexos.

9. Anexos.

9. Anexos.

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

.Columns.AutoFit<br />

Next i<br />

.Columns.AutoFit<br />

End With<br />

End Sub<br />

<strong>Anexos</strong>.<br />

Public Sub Anadir_Resul_Informe(ByRef Problema As String, ByRef TiempoSim As Single, ByRef Indice As<br />

Integer, ByRef TiempoSol As Single, ByRef IteracionSol As Integer, ByRef CosteSolucion() As Long)<br />

Dim i As Integer<br />

Dim HorasSim As Integer, MinSim As Integer, SegSim As Integer<br />

Dim HorasSol As Integer, MinSol As Integer, SegSol As Integer<br />

HorasSim = Int(TiempoSim / 3600)<br />

MinSim = Int((TiempoSim - HorasSim * 3600) / 60)<br />

SegSim = Int(TiempoSim - HorasSim * 3600 - MinSim * 60)<br />

HorasSol = Int(TiempoSol / 3600)<br />

MinSol = Int((TiempoSol - HorasSol * 3600) / 60)<br />

SegSol = Int(TiempoSol - HorasSol * 3600 - MinSol * 60)<br />

With Inf_Principal.ActiveSheet<br />

.Cells(Indice + 1, 1) = Problema<br />

.Cells(Indice + 1, 2) = NumeroNodos<br />

.Cells(Indice + 1, 3) = UBound(Vector)<br />

.Cells(Indice + 1, 4) = UBound(NodosOrigen)<br />

.Cells(Indice + 1, 5) = HorasSim & ":" & MinSim & ":" & SegSim<br />

.Cells(Indice + 1, 6) = HorasSol & ":" & MinSol & ":" & SegSol<br />

.Cells(Indice + 1, 7) = IteracionSol<br />

.Cells(Indice + 1, 8) = CosteOptimo<br />

.Cells(Indice + 1, 9) = CosteSolucion(UBound(CosteSolucion))<br />

.Cells(Indice + 1, 10) = ((CosteSolucion(UBound(CosteSolucion)) - CosteOptimo) / CosteOptimo) * 100<br />

.Columns.AutoFit<br />

End With<br />

With Inf_Iteraciones.ActiveSheet<br />

49

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

Saved successfully!

Ooh no, something went wrong!