ВУЗ:
Составители:
Рубрика:
22
280 A(6, 9) = 0: A(10, 13) = 0: A(11, 13) = 0: A(13, 15) = 0: A(18, 20) = 0
285 A(19, 20) = 0
290 A$(6, 9) = "(6-9)": A$(10, 13) = "(10-13)": A$(11, 13) = "(11-13)"
300 A$(13, 15) = "(13-15)": A$(18, 20) = "(18-20)"
305 A$(19, 20) = "(19-20)"
310 REM ВЫЧИСЛЕНИЕ КРИТИЧЕСКОГО ПУТИ
320 FOR I = 1 TO D
330 B(I) = A(I, D)
340 NEXT I
350 FOR I = 1 TO D
360 BM = -10000
370 FOR J = 1 TO D
380 B = A(I, J) + B(J)
390 IF B < -100 THEN B = -10000
400 IF B < BM THEN GOTO 430
410 BM = B - .000001
420 B$ = "T" + A$(I, J) + "-" + B$(J)
430 NEXT J
440 C(I) = BM
450 C$(I) = B$
460 NEXT I
470 B2 = 0!
480 FOR I = 1 TO D
490 B1 = C(I) - B(I)
500 B2 = B2 + ABS(B1)
510 NEXT I
520 IF B2 < .001 THEN GOTO 620
530 FOR I = 1 TO D
540 B(I) = C(I)
550 B$(I) = C$(I)
560 NEXT I
570 IF K > D THEN GOTO 600
580 K = K + 1
590 GOTO 350
600 PRINT "ОШИБКА В ПРОГРАММЕ"
610 GOTO 1170
620 Tkp = C(1)
623 PRINT "ВЫПОЛНИЛ - "; F$
625 PRINT TAB(6); "КРИТИЧЕСКИЙ ПУТЬ="; Tkp; TAB(36); "ЧИСЛО ЗВЕНЬЕВ="; K
630 PRINT TAB(6); C$(1)
640 REM "НАХОЖДЕНИЕ РЕЗЕРВОВ ВРЕМЕНИ"
650 FOR I = 1 TO D
660 FOR J = 1 TO D
670 Tho(I, J) = Tkp: Thh(I, J) = Tkp - A(I, J): Tph(I, J) = 0: Tpo(I, J) = A(I, J)
680 NEXT J
690 NEXT I
700 FOR L = 1 TO D
710 BMM = 0
720 FOR I = 1 TO D
730 TPOIL = Tpo(I, L)
740 IF TPOIL > BMM THEN BMM = TPOIL
750 NEXT I
760 FOR I = 1 TO D
770 RS(I, L) = BMM - Tpo(I, L)
780 NEXT I
790 FOR J = 1 TO D
800 Tph(L, J) = BMM: Tpo(L, J) = BMM + A(L, J)
810 NEXT J
820 NEXT L
830 FOR L = D - 1 TO 1 STEP -1
840 BMI = 10000: BMM = 0: KL = 1
850 FOR I = 1 TO D
860 THHIL = Thh(L, I)