Télécharger perm14.eso

Retour à la liste

Numérotation des lignes :

perm14
  1. C PERM14 SOURCE BP208322 16/06/27 21:16:20 8990
  2.  
  3. SUBROUTINE PERM14(N,A,II,F,XINF,JJ,U,V,FB,RC)
  4. C
  5. C DETERMINATION OF AN AUGMENTING PATH STARTING FROM
  6. C UNASSIGNED ROW II AND TERMINATING AT UNASSIGNED COLUMN
  7. C JJ , WITH UPDATING OF DUAL VARIABLES U(I) AND V(J) .
  8. C
  9. C MEANING OF THE MAIN INTERNAL VARIABLES:
  10. C LR(L) = L-TH LABELLED ROW ( L=1,NLR ).
  11. C PI(J) = MIN ( A(I,J) - U(I) - V(J) , SUCH THAT ROW I IS
  12. C LABELLED AND NOT EQUAL TO FB(J) ).
  13. C RC(J) = ROW PRECEDING COLUMN J IN THE CURRENT
  14. C ALTERNATING PATH.
  15. C UC(L) = L-TH UNLABELLED COLUMN ( L=1,NUC ).
  16. C
  17. IMPLICIT INTEGER(I-N)
  18. IMPLICIT REAL*8(A-H,O-Z)
  19.  
  20. REAL*8 A(N,N),U(N),V(N),PI(N)
  21. INTEGER F(N)
  22. INTEGER LR(N),UC(N)
  23. INTEGER FB(N),RC(N),R
  24. C INITIALIZATION.
  25. LR(1) = II
  26. DO 10 K=1,N
  27. PI(K) = A(II,K) - U(II) - V(K)
  28. RC(K) = II
  29. UC(K) = K
  30. 10 CONTINUE
  31. NUC = N
  32. NLR = 1
  33. GO TO 40
  34. C SCANNING OF THE LABELLED ROWS.
  35. 20 R = LR(NLR)
  36. DO 30 L=1,NUC
  37. J = UC(L)
  38. XA = A(R,J) - U(R) - V(J)
  39. IF ( XA .GE. PI(J) ) GO TO 30
  40. PI(J) = XA
  41. RC(J) = R
  42. 30 CONTINUE
  43. C SEARCH FOR A ZERO ELEMENT IN AN UNLABELLED COLUMN.
  44. 40 DO 50 L=1,NUC
  45. J = UC(L)
  46. IF ( PI(J) .EQ. 0 ) GO TO 100
  47. 50 CONTINUE
  48. C UPDATING OF THE DUAL VARIABLES U(I) AND V(J) .
  49. XMIN = XINF
  50. DO 60 L=1,NUC
  51. J = UC(L)
  52. IF ( XMIN .GT. PI(J) ) XMIN = PI(J)
  53. 60 CONTINUE
  54. DO 70 L=1,NLR
  55. R = LR(L)
  56. U(R) = U(R) + XMIN
  57. 70 CONTINUE
  58. DO 90 J=1,N
  59. IF ( PI(J) .EQ. 0 ) GO TO 80
  60. PI(J) = PI(J) - XMIN
  61. GO TO 90
  62. 80 V(J) = V(J) - XMIN
  63. 90 CONTINUE
  64. GO TO 40
  65. 100 IF ( FB(J) .EQ. 0 ) GO TO 110
  66. C LABELLING OF ROW FB(J) AND REMOVAL OF THE LABEL OF
  67. C COLUMN J .
  68. NLR = NLR + 1
  69. LR(NLR) = FB(J)
  70. UC(L) = UC(NUC)
  71. NUC = NUC - 1
  72. GO TO 20
  73. C DETERMINATION OF THE UNASSIGNED COLUMN J .
  74. 110 JJ = J
  75. RETURN
  76. END
  77.  
  78.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales