otchet (1108529), страница 5
Текст из файла (страница 5)
. . " 0 0 )( send p i c t u r e s e t - l a b e l t a r g e t )( let* ( ( v a l u e s ( map ( lambda ( x ) ( s t r i n g ->number ( send x g e t - v a l u e ) ) ) ( c d rinputs ) ) )( graph ( gen - graph ( c a r v a l u e s ) ) ) ( e d g e s ( need - e d g e s ( c a r v a l u e s ) ) )( a l l ( a l l - v e r t e x graph ) )( c o o r d s ( c o n s ( / p i c - width 2 ) ( / (+ p i c - h e i g h t 100 - 6 5 ) 2 ) ) )( radius (/ ( - pic - height 200) 2) )29( type ( not ( e q u a l ? ( send graph - type g e t - s t r i n g - s e l e c t i o n )"Граф - з в е з д а " ) ) ) )( v i s u a l i z e type( g e n e t i c - a l g o r i t h m graph ( c a d r v a l u e s ) e d g e s ( caddr v a l u e s )( cadddr v a l u e s ) ( c a r ( cddddr v a l u e s ) ) ( c a d r ( cddddrv a l u e s ) ) ( caddr ( cddddr v a l u e s ) ) )graph( g e t - c o o r d s a l l 0 ( / 360 ( l e n g t h a l l ) ) c o o r d s r a d i u s type )coords radius edges( - 2 ( send s p e e d g e t - s e l e c t i o n ) ) ) ) )( define ( end - g e n e t i c s )( send p l o t i n g show #f )( map ( lambda ( x ) ( send x e n a b l e #t )( send x s e t - f i e l d - background w h i t e ) ) ( c d r i n p u t s ) )( send p l o t i n g show #f )( send gen - e d g e s e n a b l e #t )( send show - w e i g h t e n a b l e #t )( send dc c l e a r )( send p i c t u r e s e t - l a b e l t a r g e t )( send s t a r t e n a b l e #t )( send end e n a b l e #f ) )( define frame ( new frame% [ l a b e l " G e n e t i c ␣ Algorithm " ] [ width 1 0 2 4 ] [ h e i g h t6 0 0 ] [ a l i g n m e n t ( l i s t ' r i g h t ' top ) ] [ s t y l e ( l i s t ' no - r e s i z e - b o r d e r ) ] ) )( define main - p a n e l ( new h o r i z o n t a l - panel% [ p a r e n t frame ] [ s t y l e ( l i s t' b o r d e r ) ] [ a l i g n m e n t ( l i s t ' r i g h t ' top ) ] [ s t r e t c h a b l e - h e i g h t #f ][ s t r e t c h a b l e - width #t ] ) )( define t a r g e t ( make - o b j e c t bitmap% p i c - width p i c - h e i g h t ) )( define dc ( new bitmap - dc% [ bitmap t a r g e t ] ) )( send dc s e t - background ( make - o b j e c t color% 176 224 2 3 0 ) )( send dc c l e a r )( define p i c t u r e ( new message% [ l a b e l t a r g e t ] [ p a r e n t main - p a n e l ] [ auto - r e s i z e#f ] [ s t r e t c h a b l e - h e i g h t #t ] [ s t r e t c h a b l e - width #t ] ) )( define i n f o - p a n e l ( new v e r t i c a l - panel% [ p a r e n t main - p a n e l ] [ s t y l e ( l i s t' b o r d e r ) ] [ a l i g n m e n t ( l i s t ' r i g h t ' top ) ] [ s t r e t c h a b l e - h e i g h t #t ][ s t r e t c h a b l e - width #f ] ) )( define graph - type ( new choice%[ l a b e l "Вид␣ графа: ␣ " ] [ p a r e n t i n f o - p a n e l ] [ c h o i c e s( l i s t "Полный␣граф" "Граф - з в е з д а " "Граф - цикл""Случайный␣граф" ) ] [ h o r i z - margin 1 0 ] [ min - width2 0 0 ] [ s t r e t c h a b l e - width #f ] ) )( define v e r t i c e s -num ( new t e x t - f i e l d %[ l a b e l " Количество ␣вершин" ] [ p a r e n t i n f o - p a n e l ][ i n i t - value "3" ] [ s t y l e ( l i s t ' s i n g l e' v e r t i c a l - l a b e l ) ] [ h o r i z - margin 1 0 ] [ min - width2 0 0 ] [ s t r e t c h a b l e - width #f ] ) )( define c o n t r o l - w e i g h t ( new t e x t - f i e l d %[ l a b e l "Контрольный␣ в е с " ] [ p a r e n t i n f o - p a n e l ][ i n i t - v a l u e " 100 " ] [ s t y l e ( l i s t ' s i n g l e' v e r t i c a l - l a b e l ) ] [ h o r i z - margin 1 0 ] [ min - width2 0 0 ] [ s t r e t c h a b l e - width #f ] ) )( define i - pop - s i z e ( new t e x t - f i e l d %[ l a b e l "Размер␣популяции " ] [ p a r e n t i n f o - p a n e l ][ i n i t - v a l u e ( number ->s t r i n g pop - s i z e ) ] [ s t y l e( l i s t ' s i n g l e ' v e r t i c a l - l a b e l ) ] [ h o r i z - margin 1 0 ][ min - width 2 0 0 ] [ s t r e t c h a b l e - width #f ] ) )30( define i - mutate - prob ( new t e x t - f i e l d %[ l a b e l " Вероятность ␣мутации" ] [ p a r e n t i n f o - p a n e l ][ i n i t - v a l u e ( number ->s t r i n g mutate - prob ) ][ style ( l i s t ' single ' vertical - label ) ][ h o r i z - margin 1 0 ] [ min - width 2 0 0 ][ s t r e t c h a b l e - width #f ] ) )( define i - par - p e r c e n t ( new t e x t - f i e l d %[ l a b e l "Процент␣ родителей " ] [ p a r e n t i n f o - p a n e l ][ i n i t - v a l u e ( number ->s t r i n g par - p e r c e n t ) ][ style ( l i s t ' single ' vertical - label ) ][ h o r i z - margin 1 0 ] [ min - width 2 0 0 ][ s t r e t c h a b l e - width #f ] ) )( define i - max - i t e r ( new t e x t - f i e l d %[ l a b e l " Макс.
␣ количество ␣ итераций " ] [ p a r e n ti n f o - p a n e l ] [ i n i t - v a l u e ( number ->s t r i n g max - i t e r ) ][ style ( l i s t ' single ' vertical - label ) ][ h o r i z - margin 1 0 ] [ min - width 2 0 0 ][ s t r e t c h a b l e - width #f ] ) )( define i - e x i t - p e r c e n t ( new t e x t - f i e l d %[ l a b e l "Процент␣выхода␣ из ␣ алгоритма " ] [ p a r e n ti n f o - p a n e l ] [ i n i t - v a l u e ( number ->s t r i n gexit - percent ) ] [ s t y l e ( l i s t ' s i n g l e' v e r t i c a l - l a b e l ) ] [ h o r i z - margin 1 0 ] [ min - width2 0 0 ] [ s t r e t c h a b l e - width #f ] ) )( define gen - e d g e s ( new check - box%[ l a b e l "Контрольные␣ ребра " ] [ p a r e n t i n f o - p a n e l ][ min - width 1 6 0 ] ) )( define show - w e i g h t ( new check - box%[ l a b e l "Показывать␣ в е с а ␣ ребер " ] [ p a r e n t i n f o - p a n e l ][ v a l u e 1 ] [ min - width 1 6 0 ] ) )( define s p e e d ( new choice%[ l a b e l " Скорость: ␣ " ] [ p a r e n t i n f o - p a n e l ] [ c h o i c e s ( l i s t"Медленно" "Средне" "Очень␣ быстро " ) ] [ s e l e c t i o n 1 ][ h o r i z - margin 1 0 ] [ min - width 1 4 0 ] [ s t r e t c h a b l e - width#f ] ) )( define i n p u t s ( l i s t graph - type v e r t i c e s -num c o n t r o l - w e i g h t i - pop - s i z ei - mutate - prob i - par - p e r c e n t i - max - i t e r i - e x i t - p e r c e n t ) )( define s t a r t ( new button% [ p a r e n t i n f o - p a n e l ] [ l a b e l " Запустить ␣ алгоритм " ][ min - width 1 6 0 ] [ s t r e t c h a b l e - width #f ][ c a l l b a c k ( lambda ( button e v e n t ) ( if ( not ( check - i n f o ) )( start - genetics ) '() ) ) ]) )( define end ( new button% [ p a r e n t i n f o - p a n e l ] [ l a b e l "Завершить␣ алгоритм " ][ e n a b l e d #f ] [ min - width 1 6 0 ] [ s t r e t c h a b l e - width #f ][ c a l l b a c k ( lambda ( button e v e n t ) ( end - g e n e t i c s ) ) ] ) )( define p l o t i n g ( new frame% [ l a b e l " Статистика " ] [ s t y l e ( l i s t' no - r e s i z e - b o r d e r ) ] [ x 0 ] [ y 0 ] ) )( define p l ( new message% [ l a b e l t a r g e t ] [ p a r e n t p l o t i n g ] [ auto - r e s i z e #t ] ) )( send frame show #t ) )( gui )31Литература[1] Малыхина М.П., Частикова В.А., Власов К.А.
ИССЛЕДОВАНИЕ ЭФФЕКТИВНОСТИ РАБОТЫ МОДИФИЦИРОВАННОГО ГЕНЕТИЧЕСКОГО АЛГОРИТМА В ЗАДАЧАХ КОМБИНАТОРИКИ // Современные проблемы науки и образования. — 2013. — № 3 — С. 2—3.32.