life " " . , (. 10.12). (. . DeathRate). -, , .
, < ri, ri >, yeari i- "" , Ri (. . 10.8). (. 10.12, ) , , , year, ri dead, (1 ri) yeari+1
, , , "" "" , , . DeathRate. , , rateToDistribution, Agent.
rateToDistribution , ( ) , . Distrcustom (. ). , . static , Agent. Agent ( ) . Agent, static
,
. : , distrActualDeath. distrDeath ( Agent). , , distrActuaiDeath , "" .
|
|
"" life alcohoiusage. life (. 10.13) . 10.12, alive ( distrActuaiDeath) . , alcohoiusage alive , . dead group :
group.dispose_agents(Agent.this);
distrActuaiDeath life ( gets
addict or quits ?Object). (ADDICTED QUITTED) ȭ alcohoiusage addict.
, . alcoholUsage. , , , . 1 4, 3 .
intervened . , , . , intervened , alcohoiusage . , initiates alcohoiusage , : intervened? distrAlcoholInitiationlntervened.get(): distrAlcoholInitiation.get()
quits :
intervened? distrAlcoholQuitIntervened.get(): distrAlcoholQuit.get()
10.6.5. AgentGroup
Agent, agents. 1000. intervened intervened AgentGroup. . , . nNeverUser, nRecreationalUser, nAddict nQuitter , . alcohoiusage.
, AgentGroup , 1 ( ) cost ,
|
|
histNeverUser, histRecreationalUser, histAddict, histQuitter histcost, .
0 100. , , , $1, $50 $5:
cost = nRecreationalUser*1000 + nAddict*50000 + nQuitter*5000;
, 100 , , , , , (totalcost) (totalyears). .
10.6.6. Model
AgentGroup. intervened false , true , ( ).
(. 10.14). , , .
AgentGroup ,
histNeverUser, histRecreationalUser,
histAddict, histQuitter histcost, . , ( ) histcost. , 101 100 . X (index) X , Y histcost [index]. , . 102 , 101 , (0, 0) , , . , .
(Business Graphics) . AnyLogic .
, , . . . AnyLogic, .
AnyLogic , . , . AnyLogic . Distr, Alcogol Use Dynamics.
|
|
11
AnyLogic 1