code - C CHARACTER*12 INAME, ONAME COMMON /ARCDT/...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
C CHARACTER*12 INAME, ONAME COMMON /ARCDT/ TOO,L,C,V,FL,COST COMMON /ODDT/ TOD,AMT COMMON /FST/ FS COMMON /ODL/ ODLK COMMON /DMPDT/ NDMP,DMP COMMON /ALBET/ ALP,BET,ALP1,TYP REAL L(1200),C(1200),V(1200),FL(1200),COST(1200),AMT(299), * ALP(18),BET(18),ALP1(18) INTEGER TOO(1200), TOD(299), FS(302),ODLK(101),DMP(101), * TYP(1200) WRITE(*,*)'ENTER DATA FILE NAME' READ(*,90) INAME OPEN(1,FILE=INAME) WRITE(*,*)'ENTER OUTPUT FILE NAME' READ(*,90) ONAME 90 FORMAT(A12) OPEN(2,FILE=ONAME,STATUS='NEW') DO 26 I=1,15 READ(1,109) ALP(I),BET(I),ALP1(I) 109 FORMAT(3F5.3) 26 CONTINUE WRITE(2,1) 1 FORMAT(T20,'USER EQUILIBRIUM ASSIGNMENT') C C DMP(I) specifies the iteration number in which output is printed C DO 20 I=1,50 DMP(I) = I - 1 20 CONTINUE NDMP=100 C C NARC = No. of arcs C NCENT = No. of origins C NNOD = No. of nodes C NOD = No. of origin-destination pairs C READ(1,*) NARC, NCENT, NNOD, NOD write(6,*)NARC,NCENT,NNOD,NOD DO 21 I=1,NARC READ(1,100) TOO(I),L(I),C(I),V(I),TYP(I),ODLK(I), * FS(I),TOD(I),AMT(I) 100 FORMAT(I4,F4.1,F5.0,F3.0,I2,3I3,F5.0) WRITE(2,100)TOO(I),L(I),C(I),V(I),TYP(I),ODLK(I), * FS(I),TOD(I),AMT(I) 21 CONTINUE WRITE(6,7) NOD 7 FORMAT( 1X,'NO. OF OD PAIRS =',I6) C C EPS = convergence criterion C EPS = 0.0005 WRITE(6,9) EPS 9 FORMAT(1X,'CONVERGENCE CRITERION =',E11.3) IF(NOD.NE.0) CALL UE(EPS,NARC,NNOD,NOD,NCENT,ITER) STOP END C SUBROUTINE UE(EPS,NARC,NNOD,NOD,NCENT,ITER) COMMON /ARCDT/ TOO,L,C,V,FL,COST COMMON /ODDT/ TOD,AMT COMMON /DMPDT/ NDMP,DMP COMMON /FST/ FS COMMON /ODL/ ODLK COMMON /ALBET/ ALP,BET,ALP1,TYP REAL L(1200),C(1200),V(1200),FL(1200),COST(1200),AMT(299), * NFL(1200),SP(100,100),SP1(100,100),ALP(18),BET(18),ALP1(18) 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

code - C CHARACTER*12 INAME, ONAME COMMON /ARCDT/...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online