do_ga=.false.
endif
-c End of "fisrst time here?" code
+c End of "first time here?" code
endif
c
write(tmptext,'(F7.5)') avrd
call write2log("Average distance between individuals in initial&
& bank is "//trim(tmptext))
+c
+c Cutoff
+c
csacutoff=(maxco*avrd)-generation*avrd*(maxco-minco)/maxgen
write(tmptext,'(F7.5)') csacutoff
call write2log("CSA cutoff is now set to "//trim(tmptext))
endif
case('cluster')
- write(*,*) "Some stuff here in the future"
+ write(*,*) "Well this is not implemented yet"
goto 2010
end select
end subroutine
c ======================================================================
+c WriteBankHistory subroutine
+c ======================================================================
+c Writes CSA BANK History to file
+c ----------------------------------------------------------------------
+ subroutine WriteBankHistory(b)
+ include 'io.inc'
+ include 'common.inc'
+ real*8,dimension(banksize,21) :: b
+ character*250 :: tmptext
+ character*250 :: header
+
+
+ header="# WLONG WSCP WELEC WBOND WANG WSC&
+ &LOC WTOR WTORD WCORRH WCORR4 WCORR5 WCORR6 &
+ &WEL_LOC WTURN3 WTURN4 WTURN6 WVDWPP WHPB WSCCO&
+ &R FFV FITNESS"
+
+ call write2log("Writing Bank history to file "//obankhfn)
+ open(obankh, file = obankhfn)
+ write(iobank, "(A)") trim(adjustl(header))
+
+ do i=1,banksize
+ write(obankh,'(19F10.5,E15.7,F10.5)') (b(i,j),j=1,21)
+ write(tmptext,'(19F10.5,E15.7,F10.5)') (b(i,j),j=1,21)
+ call write2log(trim(tmptext))
+ enddo
+ close(iobank)
+ end subroutine
+
+c
+c ======================================================================
c ReadBank subroutine
c ======================================================================
c Read CSA BANK from file