1 / 5

Simulation

Simulation. Global Clock. Environment. Environment. List of Agents. List of Agents. List of Agents. List of Agents. List of Agents. List of Agents. Human. Human. Human. Human. Human. Human. Mosquito. Mosquito. Pond. Pond. Mosquito. Mosquito. Pond. Pond. Mosquito. Mosquito.

carlo
Télécharger la présentation

Simulation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Simulation Global Clock Environment Environment List of Agents List of Agents List of Agents List of Agents List of Agents List of Agents Human Human Human Human Human Human Mosquito Mosquito Pond Pond Mosquito Mosquito Pond Pond Mosquito Mosquito Pond Pond • Weather Info • Temperature • Rainfall • Stats by Step • Weather Info • Stats for each List of Agents • Stats by Step • Weather Info • Stats for each List of Agents . . .

  2. Pond Object • Private Data: • Water Level • Location • Max Population • Population • Age Distribution • Needs: • Rainfall • Temperature • Population changes • Actions: • Update water level • Update Max Population • Calculate DMR? • Baby Object • Private Data: • Name, Age, Gender, Genes • Parent Pond • Strategy • Needs: • DMR • Temperature • Actions: • Call Strategy for update • Die • Hatch • Adult Object • Private Data: • Name, Age, Gender, Genes, numEggs • Location • Strategy • Needs: • DMR • Temperature • List of Ponds • List of Humans • Actions: • Call Strategy for update • Die • Lay Eggs • Mate • Bite Human • Fly • Pond List • Private Data: • List of Ponds • List of incoming Babies • List of outgoing Adults • Needs: • Number of dead Babies from Baby List • Actions: • Update all Pond Objects • Baby List • Private Data: • List of incoming Babies • List of outgoing Adults • Needs: • Receive Baby Objects from Adult List • Actions: • Update all Baby Objects • Send Adult Objects to Adult List • Delete Dead Baby Objects • Send Pond List number of dead Baby Objects • Adult List • Private Data: • List of incoming Adults • List of outgoing Babies • Needs: • Receive Adult Objects from Baby List • Receive Adult Objects from other Adult Lists • Actions: • Update all Adult Objects • Send Baby Objects to Baby List • Send Adult Objects to other Adult Lists

  3. Message Delivery • Communication between different Environments within the Simulation is coordinated with a Message delivery system • Each Environment has an Inbox, an Outbox, and a MessageHandler who knows how to sort/deliver Messages. • Messages include a delivery address and some Agent Information (pointer, actual Agent object, or perhaps other descriptors ) • Each Environment must take three actions per Step • ReceiveAgents (Take Messages in Inbox and distribute to the appropriate AgentLists) • UpdateAgents (Update sub-Environments first, then update all AgentLists) • SendAgents (Take any Messages placed in the Outbox during the Step and deliver it to the appropriate Inboxes) • Some Caveats • The Simulation Object only has an Inbox as it does not generate any of its own Messages to be delivered. • SpaceEnvironments would need to know the address of neighboring SpaceEnvironments • Addressing convention must be assumed that can correctly route the Messages to the right AgentList within the right Environment

  4. Order of Operations • Simulation • Calls Update on Clock • Delivers Messages to all SpaceEnvironments • Calls Update on all SpaceEnvironments • SpaceEnvironments • ReceiveMessages: Deliver Messages in Inbox to correct PondEnvironment or AgentList • Update: • Call Update on all PondEnvironments • Call Update on all AgentLists • SendMessages: Send messages in Outbox to correct destinations • PondEnvironments • ReceiveMessages: deliver Messages in Inbox to correct AgentList • Update: Call Update on all AgentLists • Send Messages in Outbox to correct destinations • Agents • Call Update on Strategy/Current State • State • Determine Death • Determine NextState • Send Messages • Update Necessary Statistics

  5. Simulation SE1 : AdultList SE1 : AdultList Address Address Address Address Address SE1 : PE1 : BabyList Data AquaticMosquito Data Data Data AdultMosquito AdultMosquito Data Global Clock List of Agents List of Agents Pond Environment 1 Aquatic Mosquito Adult Mosquito Adult Mosquito Aquatic Mosquito Adult Mosquito Aquatic Mosquito Inbox Space Environment 1 Inbox Inbox Outbox Outbox

More Related