read(ostate,'(L2)') do_ga
read(ostate,'(F7.5)') avrd
close(ostate)
- write(tmptext,'(I4)') generation
- call write2log("This is genaration "//tmptext)
if (do_ga) then
call write2log("Doing GA in this step")
endif
call write2log("ZSCORE weights minimalization disabled for now")
generation=generation+1
endif
-
+ write(tmptext,'(I4)') generation
+ call write2log("This is genaration "//tmptext)
call ReadOptimaW(BANK_MULTIPLIER*banksize,populacja)
c Yes. Generate random zero-population
c --- debug end ---
call GetNBest(populacja,bank,banksize)
call CalcAvgDist(bank,avrd)
+ write(tmptext,'(F7.5)') avrd
+ call write2log("Average distance between individuals in initial&
+ & bank is "//trim(tmptext))
+ csacutoff=(maxco*avrd)-generation*avrd*(maxco-minco)/maxgen
write(tmptext,'(F7.5)') csacutoff
- call write2log("CSA cutoff is now set to "//tmptext)
- csacutoff=(maxco*avrd)-generation*avrd*(maxco-minco)/maxgen
+ call write2log("CSA cutoff is now set to "//trim(tmptext))
c csacutoff=maxco*avrd
do i=1,BANK_MULTIPLIER*banksize
write(tmptext,'(I4)') i
- call write2log("Checking ind "//tmptext)
+ call write2log("Checking ind "//trim(tmptext))
j=ZnajdzPodobnego(banksize,bank,populacja(i,:),csacutoff)
if (j.gt.0) then
if (populacja(i,20).lt.bank(j,20)) then
c csacutoff=cicutoff*(0.8**(iter-1))
write(tmptext,'(F7.5)') csacutoff
- call write2log("CSA cutoff is now set to "//tmptext)
+ call write2log("CSA cutoff is now set to "//trim(tmptext))
endif
case('cluster')
write(*,*) "Some stuff here in the future"
else
if (do_fs) then
do_optima=.not.do_optima
- if (generation.eq.1) then
+ if (generation.eq.0) then
do_ga=.false.
else
do_ga=.not.do_ga
c
c Create the inputs
c
- write(tmptext,'(I)') generation
+ write(tmptext,'(I)') generation+1
call write2log("Preparing inputs for next generation ("//trim(adju&
&stl(tmptext))//")")
call CreateInputs(BANK_MULTIPLIER*banksize,populacja)