Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres...

31
Creating a Hybrid AgentBased and Network (PatientFlow) Model Nathaniel Osgood 1172009

Transcript of Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres...

Page 1: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Creating a Hybrid Agent‐Based and Network (Patient‐Flow) Model

Nathaniel Osgood

11‐7‐2009

Page 2: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Request to Create a Model

Page 3: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Give the Model A Name

Page 4: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Indicate that this is to be a Network Model

Page 5: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Create a Model without Statistics

Page 6: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Add a Class

Page 7: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Giving the New Class a Name

Page 8: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Resulting class

Page 9: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Make the AgentEntity capable of carrying around & curing your Agents

Page 10: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Add Person Active Object class

Page 11: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Indicate that the Person is an Agent

Page 12: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Build up an Agent with Desired Dynamics

Page 13: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Add an Environment

Page 14: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Add a Population & Associate with Environment

Page 15: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Set Environment to use Distance‐Based Topology

Page 16: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Add a “Color” variable

Page 17: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Set Dynamic Property “Color” of Oval to Depend on Color

Page 18: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Set “Susceptible” to Turn Color Green

Page 19: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Set “Infected” to Turn Color Red

Page 20: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Test the Current Model by Running It

Page 21: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Simultaneous Models – Not Yet Linked!

Page 22: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Set Transition to Call a Method to Inject an Agent

Page 23: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Set “Cure” of Infection to Depend on a Message (a Treatment Message)

Page 24: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Making Sure the Statechart for “Person” Gets the Message sent to a person

Page 25: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Double Click on Main Object & Select “Source” & Set to Manual Injection

Page 26: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

In “Main”, Create a Variable To Inject in the Movement Network

Page 27: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Create Function in “Main”: Part 1

Page 28: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Create Function in Main Part 2

Page 29: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Set “Source” to Inject an Entity Associated with the Desired Agent

Page 30: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Set Agents to be Cured After Having been Seen by Doctors!

Page 31: Nathaniel Osgood 11 7 2009 - University of Saskatchewan · Final State Actionchart Analysis Pres entabon Co ntmls Co n nectjvity Enterprise Library ... O Main Parame ters [£ Plain

Running the Simulation