Главная  Полное построение алгоритма 

[0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [ 55 ] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117]

INTEGER FUNCTION DCATS(CATSiMlCEiMONTH» INTE6ER CATS.HICEiMONTH

вычисление увеличения или уменьшения ocats. кошки умирают от голода и от старости и приносят лотомство, средняя продолжительность жизни-10 лет.

dcats = о

IF ( MICE .LT. 25*CATS » DCftTS = DCATS - ((25*CATS-HICE)/50l . случайные числа: когда кошки умирают от старости..

IF ( RANFtO.I .1.т, FLOAT(CATSl/iaO. ) DCATS=DCATS-MAX0(liCATS/12QI IF ( MONTH .NE. 3 .and. MONTH .ne. 9 1 GOTO 20 IF « MICE .GT. 50*CATS 1 DCATS = 0CaTS+3*CATS IF ( MICE .GE, 25*CatS .AND. MICE .LE. SO*CATS ) + DCATS = OCATS + 3«(MICE/2S - CATS) • 20 RETURN END

INTEGER FUNCTION DI4ICC (WHEAT.CATSlHlCE) INTEGER WHEAT.CATS.MICE

вычисление увеличения или уменьшения DMICE.

мыши умирают от старости, их убивают кошки, но они размножаются. все мыши умирают, если нет пшеницы.

DMICE = -MicE/ia

IF ( NICE .GT, SO*CATS ) DMICE = OMICE-SOtCATS

IF ( MICE .LE, 50*CAtS ) DMICF = DM1CE-MINO(30*CATS.30*M1CE/S0) IF 1 WHEAT .GT. 100*MICE ) DMTCE = DMICE+MICE

IF I WHEAT .LE. lOOtHICE ) DMICE = DMICE+MINO IHICE.KHEAT/ICO) IF ( WHEAT .EO. 0 ) DMICE = -MICE RETURN

INTEGER FUNCTION DWHEAT (MICE.MONTH) INTEGER MICEiMONTH

вычисление ежемесячного увеличения или уменьшения dwheat. в июле урожай-2 млн фунтов, люди едят 100 ооо фунтов ежемесячно. мыши едят по 10 фунтов каждая.

DWHEAT = О

IF < MONTH .EQ. 7 ) DWHEAT г DWHEAT+aOOOOOO

DWHEAT = OHHEAT-100000-10»MICF

RETURN

Рис. 3.6,8. Продолжение



новый ЭКСПЕРИМЕНТ HlNCATS= г

год 1

МЕСЯЦ

ПШЕНИЦА

ныши

КОШКИ

leggeoo

DWHEAT=

1899800

DMICEs

DCATSr

1799600

DWHEAT=

.100200

dmice=

□CAT.SS

«0

1699330

DWHEAr=

-10027O

dmice=

□CfiTS=

1596970

CWHEfiT=

-ЮОЗбО

DMICE=

DCATSs

1»9в»90

DWHEAr=

-юочяо

d«ice= .

OCATSS

1397650

dwheat=

.ЮОбцО

DMlCE=

OCATSI

1297000

DWHEAr=

-lODfisD

DMlCE=

DCATSS

1195660

DWHEAT=

-101120

dhice=

DCATSi

1О9»330

DWHEAT=

-lOlSSO

DMICE=

dcatss

991950

BWHEAT=

-ЮгзбО

DH1CE=

DCATSs

666600

DWHEfiT=

-103150

dnice=

DCATSS

784650

ОКНЕЛТ»

-lOtlSO

DMICE=

DCATS=

год 2

:сяц

ПШЕНИЦА

№(ШИ

кошки

2679090

dwheat=

i89444o

DHICE=

dcats=:

2570630

1344

dwheat=

-10б2бО

DNICE=

DCATSS

2457390

2336

dwheat=

-113440

DM1CE=

dcatss

2334030

3516

dwheat=

-123360

DMlCE=

1182

DCATSS

2198650

5783

dwheat=

-135180

D«IcE=

2265,

DCATSs

2041020

1015S

dwheat=

-157630

DMICE=

4372

dcatss

1639470

16534-

dwheat=

-2oi55o

DNICEs

8379

DCATSs

1554150

34454

dwheat=

-265340

DNICEs

15920

DCATSS

1109S9O

46194-

0wheat=

-444540

DHlCE=

11740

DCATS=

547650

49720

DWHEAT=

-561940

DMICE=

3526

DCATSS

"1

47363

dwheat=

-597200

DNICE=

-2357

nCATSs

dwheat=

-573630

DHICEs-47363

DCATSS

«1

год 3

ПШЕНИДА

МЫШИ

кошки

1699600

DWHEfiTs

1899800

DKlCEs

OCATEs

1799600

DWHEATs

-100200

DHlCEs

DCATSs

1699330

DWHEATs

-100270

DMICEs

DCATSs

1596970

DUHEATs

-100360

BHICEs

DCATSs

1496490

&*

DWHEATs

-1004eO

DMICEs

DCATSs

»3

1397850

DWHEATS

-100640

DMICE=

DCATSs

1297000

DWHEATs

-100650

DMICEs

DCATSS

1195680

DWHEATs

-101120

DMICEs

DCATSS

1094400

DWHEATs

-101480

DMICES

DCATSs

992440

DWHEATs

-101960

DMICEs

DCATSs

869850

34 7

DWHEATs

-102590

DMICEs

DCATSS

786360

DWHEATs

-103470

DMlCEs

DCATSS

год 4.

;сяи,

пшеница

пыши

кошки

2661220

dwheats

1894640

DMICES

DCATS«

2572630

1459

DWHEATs

-106390

DMCEs

DCATS«

2456240

2647

DWHEATs

-114590

DMICEs

1188

DCATSs

2331770

4474

dwheats

-126470

DMicEs

1827

DCATSS

2167030

7976

DWHEATs

-144740

DMICEs

3502

DCATSS

2007270

14666

DWHEATs

-179760

DMICES

6712

DCATSS

1760390

27552

DWHEATs

-246680

DMICEs

12864

DCATSs

1384870

42259

DWHEATs

-3755?0

DHlCEs

14707

DCATSs

862280

51966

DWHEATS

-522590

DMICEs

9727

DCATSS

242420

53876

DWHEATs

-619860

DMICES

1890

DCATSS

49441.

DWHEATs

-638760

DMICES

-4435

DCATS«

DWHEATs

-594410

DHICE=-494m

OCATSs

Рис. 3.6.8. Продолжение



год 5

ПШЕШЦЛ

МЫШИ

КОШКИ

1699600

OWkEAT=

1699600

DWICC=

DCATS=

179960 0

dwheat=

-100200

DMICE=

DCATSe

1Ь99330

DWHEAT=

-100270

DMiCEs

DCAtSs

1596970

DWHEAT=

-100360

DMICE=

DCATSs

1Ч96Ч90

DWHEAT=

•100460

D"ICE=

OCATS=

1397850

DWHEAT=

-IOO64O

DMICEr

OcATS=

1297000

DWHEAT=

-100850

DMICE=

OCATSs

1195880

DWHEAT=

-юнго

D«lCE=

DCATS=

1091* 1»00

СЫНЕАТг

-1014eO

DMlCE=

DCATS=

99a"»ua

DWHEAT=

-101960

DM1CE=

DCATS=

689650

DWHEATs:

-102590

DHICE=

DCATS=

7ВЕ,цэа

DWHEAT=

-103420

DUlCEs

DCATS3

"

ГОД 6

МЕСЯЦ

ПШЕНИи.А

НЫШМ

кощки

2661930

DWHEAT=

18954Ч0

DMlCEr

DCATS=

2575370

1046

DWHEAT=

-106S50

DMICE=

DCATS=

2464910

1795

DWHEAT=

-110460

DM1CE=

DCATS=

гЗ"*б9бО

2601

DWHEAT=

-II795O

DnICE=

DCATEa

2220950

4146

DWHEAT=

-126,010

DHICE=

1546

DCATSx

20791*90

7107

GWHEATi

-1411160

DMlCEs

2961

DCATSi

1906420

12762

DWHEAT=

-171070

DMICE=

5675

DCATSs

1660600

23689

DWHEAT=

-227620

DK1CE=

10907

DCATSe

1345710

37711

DWHEAT=

-336890

DNICE=

14022

DCATSa

666600

447Э6

DWHEAT=

.4771(0

DMICE=

7065

DCATS=

316640

46549

OWHEATs

-547960

DMice=

1753

DCATSil

42706

DWHEAT=

-56S490

DHICEs

-3645

OCATS=

Рис. 3.6.8. Окончание



[0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [ 55 ] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117]

0.0012