Como realizar la cola de una linea de espera
Publicado por Fernando (4 intervenciones) el 07/08/2017 20:36:31
Buenos dias, tengo un datagridview en la cual ingreso tiempos de llegada y salida, la suma de los tiempos de llegada se suma en una variable InstanteLlegada, si esta variable es mayor a la suma de InstantefinServicio no hay cola por tanto 0, si es lo contrario se muestra la resta de esos dos variables.
A mi me resta en la primera, pero en la seguna ya hace otra cosa, me pueden ayudar?
A mi me resta en la primera, pero en la seguna ya hace otra cosa, me pueden ayudar?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Try
Dim totalColas, totalInstantefinS, totalInstanteLl, totaltiemposis, ultimo, columna0, columna1, columna2 As Single
cantidad = InputBox("Ingrese el numero de clientes", "CANTIDAD DE CLIENTES")
TLL = InputBox("Ingrese Tiempos de Llegada : (1)", "TIEMPOS DE LLEGADA")
TS = InputBox("Ingrese Tiempos de Servicio : (1)", "TIEMPOS DE SERVICIO")
Dim i As Integer = 1
cola = 0
ILL += TLL
IFS = IIS + TS
TSS = IFS - ILL
dataTabla.Rows.Add(i, TLL, ILL, Math.Abs(cola), "8", TLL, TS, IFS, Math.Abs(TSS))
Dim SILL As Integer = 0
Dim SIIS, STSS As Integer
Dim SIFS As Integer = 0
cola = 0
For i = 2 To cantidad Step 1
TLL = InputBox("Ingrese Tiempos de Llegada : (" & i.ToString & ")")
TS = InputBox("Ingrese Tiempos de Servicio : (" & i.ToString & ")")
ILL += TLL
SILL = ILL
SIIS = (SILL + cola)
SIFS += IFS
STSS = (SILL - SIFS)
cola = SILL - SIFS
If SILL > SIFS Then
cola = 0
dataTabla.Rows.Add(i.ToString, TLL, SILL, Math.Abs(cola), "8", SIIS, TS, SIFS, Math.Abs(STSS))
Else
cola = SILL - SIFS
dataTabla.Rows.Add(i.ToString, TLL, SILL, Math.Abs(cola), "8", SIIS, TS, SIFS, Math.Abs(STSS))
End If
Next
Valora esta pregunta


0