projects
/
unres.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
even more verbose swaping log
[unres.git]
/
source
/
ga
/
GA.f
diff --git
a/source/ga/GA.f
b/source/ga/GA.f
index
47a65a5
..
aecaebc
100644
(file)
--- a/
source/ga/GA.f
+++ b/
source/ga/GA.f
@@
-200,27
+200,43
@@
c --- debug end ---
call ReadBank(bank)
write(tmptext,'(F7.5)') avrd
call write2log("Average distance in bank is "//trim(tmptext))
call ReadBank(bank)
write(tmptext,'(F7.5)') avrd
call write2log("Average distance in 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 "//trim(tmptext))
do i=1,BANK_MULTIPLIER*banksize
write(tmptext,'(I4)') i
call write2log("Checking ind "//trim(tmptext))
j=ZnajdzPodobnego(banksize,bank,populacja(i,:),csacutoff)
do i=1,BANK_MULTIPLIER*banksize
write(tmptext,'(I4)') i
call write2log("Checking ind "//trim(tmptext))
j=ZnajdzPodobnego(banksize,bank,populacja(i,:),csacutoff)
- if (j.gt.0) then
+ if (j.gt.0) then ! W banku jest podobny
if (populacja(i,20).lt.bank(j,20)) then
write(tmptext,'(I4)') j
write(tmptext2,'(I4)') i
call write2log("Swaping ind"//trim(tmptext)//" from bank to &
&ind "//trim(tmptext2)//" from population")
if (populacja(i,20).lt.bank(j,20)) then
write(tmptext,'(I4)') j
write(tmptext2,'(I4)') i
call write2log("Swaping ind"//trim(tmptext)//" from bank to &
&ind "//trim(tmptext2)//" from population")
+ write(tmptext2,'(21F7.5)') bank(j,:)
+ call write2log("BANK"//trim(tmptext)//":"//trim(tmptext2))
+
+ write(tmptext,'(I4)') i
+ write(tmptext2,'(21F7.5)') populacja(i,:)
+ call write2log("POP"//trim(tmptext)//":"//trim(tmptext2))
+
bank(j,:)=populacja(i,:)
endif
bank(j,:)=populacja(i,:)
endif
- else
+ else ! W banku nie ma podobnego
j=FindWorst(banksize,bank)
write(tmptext,'(I4)') j
j=FindWorst(banksize,bank)
write(tmptext,'(I4)') j
- write(tmptext2,'(I4)') i
if (populacja(i,20).lt.bank(j,20)) then
call write2log("Worst in bank is "//trim(tmptext))
if (populacja(i,20).lt.bank(j,20)) then
call write2log("Worst in bank is "//trim(tmptext))
+ write(tmptext2,'(21F7.5)') bank(j,:)
+ call write2log("BANK"//trim(tmptext)//":"//trim(tmptext2))
+
+ write(tmptext,'(I4)') i
call write2log("Swaping worst ind in bank to "//trim(tmptext&
call write2log("Swaping worst ind in bank to "//trim(tmptext&
- &2))
+ &))
+ write(tmptext2,'(21F7.5)') populacja(i,:)
+ call write2log("POP"//trim(tmptext)//":"//trim(tmptext2))
bank(j,:)=populacja(i,:)
endif
endif
bank(j,:)=populacja(i,:)
endif
endif
@@
-243,12
+259,6
@@
c --- debug end ---
call WriteBank(bank)
call WriteBank(bank)
- csacutoff=maxco*avrd-generation*avrd*(maxco-minco)/maxgen
-c csacutoff=csacutoff-(generation*cicutoff/maxgen)
-c csacutoff=cicutoff*(0.8**(iter-1))
-
- 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"
endif
case('cluster')
write(*,*) "Some stuff here in the future"