************************************************************************ C PROGRAM TVMMU C C TEST PROGRAM FOR THE SUBROUTINE PVARU C INTEGER NF,IPAR(7),IPRNT,ITERM DOUBLE PRECISION X(200),RPAR(7),GMAX,F INTEGER NEXT,IERR,I,ITIME INTEGER NITER,NFVAL,NSUCC COMMON /PROB/ NEXT INTEGER NRES,NDEC,NREM,NADD,NIT,NFV,NFG,NFH COMMON /STAT/ NRES,NDEC,NREM,NADD,NIT,NFV,NFG,NFH NITER=0 NFVAL=0 NSUCC=0 CALL TYTIM1(ITIME) C C LOOP FOR 92 TEST PROBLEMS C DO 3 NEXT=1,92 C C CHOICE OF INTEGER AND REAL PARAMETERS C DO 1 I=1,7 IPAR(I)=0 1 CONTINUE DO 2 I=1,7 RPAR(I)=0.0D 0 2 CONTINUE IPAR(4)=1 IPRNT=1 C C PROBLEM DIMENSION C NF=200 C C INITIATION OF X AND CHOICE OF RPAR(1) AND RPAR(6) C CALL TIUD28(NF,X,RPAR(6),RPAR(1),NEXT,IERR) IF (IERR.NE.0) GO TO 3 RPAR(1)=0 IF (NEXT.EQ.11) RPAR(1)=1.0D 0 IF (NEXT.EQ.24) RPAR(1)=5.0D 0 IF (NEXT.EQ.28) RPAR(1)=1.0D 3 IF (NEXT.EQ.45) RPAR(1)=1.0D 2 C C SOLUTION C CALL PVMMU(NF,X,IPAR,RPAR,F,GMAX,IPRNT,ITERM) NITER=NITER+NIT NFVAL=NFVAL+NFV IF (ITERM.GT.0.AND.ITERM.LT.9) NSUCC=NSUCC+1 3 CONTINUE WRITE(6,10) NITER,NFVAL,NSUCC 10 FORMAT(' NITER =',I5,3X,' NFVAL =',I5,3X,' NSUCC =',I5) CALL TYTIM2(ITIME) STOP END C C USER SUPPLIED SUBROUTINE (CALCULATION OF F AND G) C SUBROUTINE FUNDER(NF,X,F,G) INTEGER NF DOUBLE PRECISION X(*),F,G(*) INTEGER NEXT COMMON /PROB/ NEXT C C FUNCTION AND GRADIENT EVALUATION C CALL TFBU28(NF,X,F,G,NEXT) RETURN END * * EMPTY SUBROUTINES * SUBROUTINE FUN(NF,KA,X,FA) INTEGER KA,NF DOUBLE PRECISION FA,X(*) KA=NF FA=X(1) RETURN END SUBROUTINE DFUN(NF,KA,X,GA) INTEGER KA,NF DOUBLE PRECISION GA(*),X(*) KA=NF GA(1)=X(1) RETURN END SUBROUTINE OBJ(NF,X,FF) INTEGER NF DOUBLE PRECISION X(*),FF NF=1 FF=X(1) RETURN END SUBROUTINE DOBJ(NF,X,GF) INTEGER NF DOUBLE PRECISION X(*),GF(*) NF=1 GF(1)=X(1) RETURN END SUBROUTINE CON(NF,KC,X,FC) INTEGER NF,KC DOUBLE PRECISION X(*),FC KC=NF FC=X(1) RETURN END SUBROUTINE DCON(NF,KC,X,GC) INTEGER NF,KC DOUBLE PRECISION X(*),GC(*) KC=NF GC(1)=X(1) RETURN END ************************************************************************ C PROGRAM TVMML C C TEST PROGRAM FOR THE SUBROUTINE PVMML C INTEGER NF,NB,NC,IX(40),IC(20),IPAR(7),IPRNT,ITERM DOUBLE PRECISION X(40),XL(40),XU(40),CF(20),CL(20),CU(20),CG(400), & RPAR(7),F,GMAX INTEGER NEXT,IERR,I,ITIME INTEGER NITER,NFVAL,NSUCC COMMON /PROB/ NEXT INTEGER NRES,NDEC,NREM,NADD,NIT,NFV,NFG,NFH COMMON /STAT/ NRES,NDEC,NREM,NADD,NIT,NFV,NFG,NFH NITER=0 NFVAL=0 NSUCC=0 CALL TYTIM1(ITIME) C C LOOP FOR 15 TEST PROBLEMS C DO 3 NEXT=1,15 C C CHOICE OF INTEGER AND REAL PARAMETERS C DO 1 I=1,7 IPAR(I)=0 1 CONTINUE DO 2 I=1,7 RPAR(I)=0.0D 0 2 CONTINUE IPAR(4)=1 IPRNT=1 C C PROBLEM DIMENSION C NF=20 NB=20 NC=15 C C INITIATION OF X AND CHOICE OF RPAR(1) AND RPAR(6) C CALL TILD03(NF,NC,X,IX,XL,XU,IC,CL,CU,CG,RPAR(6),RPAR(1),NEXT, & IERR) IF (IERR.NE.0) GO TO 3 RPAR(1)=0.0D 0 C C SOLUTION C CALL PVMML(NF,NB,NC,X,IX,XL,XU,CF,IC,CL,CU,CG,IPAR,RPAR,F,GMAX, & IPRNT,ITERM) NITER=NITER+NIT NFVAL=NFVAL+NFV IF (ITERM.GT.0.AND.ITERM.LT.9) NSUCC=NSUCC+1 3 CONTINUE WRITE(6,10) NITER,NFVAL,NSUCC 10 FORMAT(' NITER =',I5,3X,' NFVAL =',I5,3X,' NSUCC =',I5) CALL TYTIM2(ITIME) STOP END C C USER SUPPLIED SUBROUTINE (CALCULATION OF F AND G) C SUBROUTINE FUNDER(NF,X,F,G) INTEGER NF DOUBLE PRECISION X(*),F,G(*) INTEGER NEXT COMMON /PROB/ NEXT C C FUNCTION EVALUATION C CALL TFFU03(NF,X,F,NEXT) CALL TFGU03(NF,X,G,NEXT) RETURN END * * EMPTY SUBROUTINES * SUBROUTINE FUN(NF,KA,X,FA) INTEGER KA,NF DOUBLE PRECISION FA,X(*) KA=NF FA=X(1) RETURN END SUBROUTINE DFUN(NF,KA,X,GA) INTEGER KA,NF DOUBLE PRECISION GA(*),X(*) KA=NF GA(1)=X(1) RETURN END SUBROUTINE OBJ(NF,X,FF) INTEGER NF DOUBLE PRECISION X(*),FF NF=1 FF=X(1) RETURN END SUBROUTINE DOBJ(NF,X,GF) INTEGER NF DOUBLE PRECISION X(*),GF(*) NF=1 GF(1)=X(1) RETURN END SUBROUTINE CON(NF,KC,X,FC) INTEGER NF,KC DOUBLE PRECISION X(*),FC KC=NF FC=X(1) RETURN END SUBROUTINE DCON(NF,KC,X,GC) INTEGER NF,KC DOUBLE PRECISION X(*),GC(*) KC=NF GC(1)=X(1) RETURN END 