************************************************************************ * PROGRAM THYBU * * TEST PROGRAM FOR THE SUBROUTINE PNEQU * * LOOP FOR 22 TEST PROBLEMS * INTEGER NF,NA,NADD,NDEC,NEXT,NFG,NFH,NFV,NIT,NREM,NRES DOUBLE PRECISION F,GMAX INTEGER I,IERR,IPRNT,ITERM,ITIME DOUBLE PRECISION X(100),AF(1000),RPAR(7) INTEGER IPAR(6) 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,22 * * CHOICE OF INTEGER AND REAL PARAMETERS * DO 10 I = 1,6 IPAR(I) = 0 10 CONTINUE IPAR(5)=2 DO 20 I = 1,7 RPAR(I) = 0.0D0 20 CONTINUE IPRNT = 1 * * PROBLEM DIMENSION * NF = 100 * * INITIATION OF X, DETERMINATION IAG AND JAG AND CHOICE OF RPAR(1) * RPAR(1)=1.0D3 CALL TIUD15(NF,NA,X,RPAR(1),NEXT,IERR) IF (IERR.NE. 0) GO TO 30 IF (NEXT.EQ.18) RPAR(1)=1.0D 1 C RPAR(1)=0.0D 0 * * SOLUTION * CALL PHYBU(NF,NA,X,AF,IPAR,RPAR,F,GMAX,IPRNT,ITERM) NITER=NITER+NIT NFVAL=NFVAL+NFV IF (ITERM.GT.1.AND.ITERM.LT.7) 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 TAFU15(NF,KA,X,FA,NEXT) RETURN END SUBROUTINE DFUN(NF,KA,X,GA) INTEGER KA,NF DOUBLE PRECISION GA(*),X(*) DOUBLE PRECISION MXVMAX INTEGER NEXT COMMON /PROB/ NEXT CALL MXVSET(NF,0.0D0,GA) CALL TAGU15(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 ************************************************************************ * PROGRAM THYBS * * TEST PROGRAM FOR THE SUBROUTINE PNEQU * * LOOP FOR 22 TEST PROBLEMS * INTEGER NF,NA,NB,NADD,NDEC,NEXT,NFG,NFH,NFV,NIT,NREM,NRES DOUBLE PRECISION F,GMAX INTEGER I,IERR,IPRNT,ITERM,ITIME DOUBLE PRECISION X(100),XL(100),XU(100),AF(1000),RPAR(7) INTEGER IX(100),IPAR(4) 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,22 * * CHOICE OF INTEGER AND REAL PARAMETERS * DO 10 I = 1,6 IPAR(I) = 0 10 CONTINUE IPAR(5)=4 DO 20 I = 1,7 RPAR(I) = 0.0D0 20 CONTINUE IPRNT = 1 * * PROBLEM DIMENSION * NF = 100 NB = 100 * * INITIATION OF X, DETERMINATION IAG AND JAG AND CHOICE OF RPAR(1) * RPAR(1)=1.0D3 CALL TIUD15(NF,NA,X,RPAR(1),NEXT,IERR) CALL MXVSET(NF,0.0D0,XL) CALL MXVINS(NF,1,IX) IF (IERR.NE. 0) GO TO 30 IF (NEXT.EQ.18) RPAR(1)=1.0D 1 C RPAR(1)=0.0D 0 * * SOLUTION * CALL PHYBS(NF,NA,NB,X,IX,XL,XU,AF,IPAR,RPAR,F,GMAX,IPRNT,ITERM) NITER=NITER+NIT NFVAL=NFVAL+NFV IF (ITERM.GT.1.AND.ITERM.LT.7) 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 TAFU15(NF,KA,X,FA,NEXT) RETURN END SUBROUTINE DFUN(NF,KA,X,GA) INTEGER KA,NF DOUBLE PRECISION GA(*),X(*) DOUBLE PRECISION MXVMAX INTEGER NEXT COMMON /PROB/ NEXT CALL MXVSET(NF,0.0D0,GA) CALL TAGU15(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 ************************************************************************ * PROGRAM THYBL * * TEST PROGRAM FOR THE SUBROUTINE PNEQU * * LOOP FOR 7 TEST PROBLEMS * INTEGER NF,NA,NB,NC,NADD,NDEC,NEXT,NFG,NFH,NFV,NIT,NREM,NRES DOUBLE PRECISION F,GMAX,FMIN INTEGER I,IERR,IPRNT,ITERM,ITIME,IEXT DOUBLE PRECISION X(100),XL(100),XU(100),CF(100),CL(100),CU(100), & CG(1000),AF(1000),RPAR(7) INTEGER IX(100),IC(100),IPAR(4) 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,7 * * CHOICE OF INTEGER AND REAL PARAMETERS * DO 10 I = 1,6 IPAR(I) = 0 10 CONTINUE IPAR(5)=4 DO 20 I = 1,7 RPAR(I) = 0.0D0 20 CONTINUE IPRNT = 1 * * PROBLEM DIMENSION * NF = 100 NA = 200 * * INITIATION OF X, CHOICE OF RPAR(1) * RPAR(1)=1.0D3 CALL TILD22(NF,NA,NB,NC,X,IX,XL,XU,IC,CL,CU,CG,FMIN, & RPAR(1),NEXT,IEXT,IERR) IF (IERR.NE. 0) GO TO 30 C RPAR(1)=0.0D 0 * * SOLUTION * CALL PHYBL(NF,NA,NB,NC,X,IX,XL,XU,CF,IC,CL,CU,CG,AF,IPAR,RPAR,F, & GMAX,IPRNT,ITERM) NITER=NITER+NIT NFVAL=NFVAL+NFV IF (ITERM.GT.1.AND.ITERM.LT.7) 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,I,NEXT DOUBLE PRECISION FA,X(*) COMMON /PROB/ NEXT CALL TAFU22(NF,KA,X,FA,NEXT) RETURN END SUBROUTINE DFUN(NF,KA,X,GA) INTEGER KA,NF,I,NEXT DOUBLE PRECISION GA(*),X(*) COMMON /PROB/ NEXT CALL TAGU22(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 