************************************************************************ * PROGRAM TNEQU * * TEST PROGRAM FOR THE SUBROUTINE PNEQU * * LOOP FOR 30 TEST PROBLEMS * INTEGER N,NADD,NDEC,NEXT,NFG,NFH,NFV,NIT,NREM,NRES DOUBLE PRECISION F,FMIN INTEGER I,IERR,IDER,IPRNT,ITERM,ITIME DOUBLE PRECISION AF(100),RPAR(7),X(100) INTEGER IPAR(2) INTEGER NITER,NFVAL,NSUCC COMMON /PROB/NEXT COMMON /STAT/NRES,NDEC,NREM,NADD,NIT,NFV,NFG,NFH NITER=0 NFVAL=0 NSUCC=0 CALL TYTIM1(ITIME) DO 30 NEXT = 1,30 * * CHOICE OF INTEGER AND REAL PARAMETERS * DO 10 I = 1,2 IPAR(I) = 0 10 CONTINUE DO 20 I = 1,7 RPAR(I) = 0.0D0 20 CONTINUE IDER = 1 IPRNT = 1 * * PROBLEM DIMENSION * N = 100 * * INITIATION OF X, DETERMINATION IAG AND JAG AND CHOICE OF RPAR(1) * CALL TIUD16(N,N,X,FMIN,RPAR(1),NEXT,IERR) IF (IERR.NE. 0) GO TO 30 RPAR(1)=0.0D 0 IF (NEXT.EQ. 9) RPAR(1)=1.0D 0 * * SOLUTION * CALL PNEQU(N,X,AF,IPAR,RPAR,F,IDER,IPRNT,ITERM) NITER=NITER+NIT NFVAL=NFVAL+NFV IF (ITERM.EQ.3) NSUCC=NSUCC+1 30 CONTINUE WRITE(6,50) NITER,NFVAL,NSUCC 50 FORMAT(' NITER =',I5,3X,' NFVAL =',I5,3X,' NSUCC =',I5) CALL TYTIM2(ITIME) STOP END * * USER SUPPLIED SUBROUTINE (CALCULATION OF FA) * SUBROUTINE FUN(NF,KA,X,FA) INTEGER KA,NF DOUBLE PRECISION FA,X(*) INTEGER NEXT COMMON /PROB/ NEXT CALL EAFU16(NF,KA,X,FA,NEXT) RETURN END SUBROUTINE DFUN(NF,KA,X,GA) INTEGER KA,NF DOUBLE PRECISION GA(*),X(*) INTEGER NEXT COMMON /PROB/ NEXT CALL EAGU16(NF,KA,X,GA,NEXT) RETURN END * * EMPTY SUBROUTINES * 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 