Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » AMP » integrating real time data with eclipse abm platform
integrating real time data with eclipse abm platform [message #732331] Tue, 04 October 2011 14:20 Go to next message
samitha  is currently offline samitha Friend
Messages: 4
Registered: October 2011
Junior Member
Hi,

I'm new to this area. Appreciate if you could kindly clarify following quaries.

1. I just want to know how can I integrate a real data source that contains human movements with SEIR epidemic model example. Is it possible in eclipse agent based modeling platform?

2. Even though I was able to run the model I couldn't find the behavioral editor as illustrated in the video. Is there a way to enable it?

3. Is there a step by step guide for creating the epidemic model?

Thanks

Samitha
Re: integrating real time data with eclipse abm platform [message #733403 is a reply to message #732331] Tue, 04 October 2011 16:39 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Hi Samitha,


samitha wrote on Tue, 04 October 2011 10:20
Hi,

I'm new to this area. Appreciate if you could kindly clarify following quaries.

1. I just want to know how can I integrate a real data source that contains human movements with SEIR epidemic model example. Is it possible in eclipse agent based modeling platform?


It is certainly possible, but also of course ambitious. I'm helping a colleague right now with a model that uses more complex movement patterns. To actually map to real human movement patterns might warrant a GIS layer, something we've experimented with but haven't released. But the issues run deeper than that, as in order to simulate real world contagion patterns, you would need a tremendous amount of data and either deep behavioral models or very micro level human movement data. I think a lot could be done with some kind of in between approach. Did you have a data source in mind?

Quote:
2. Even though I was able to run the model I couldn't find the behavioral editor as illustrated in the video. Is there a way to enable it?


Glad to hear that all worked for you. The behavioral editor is something that has been developed by Metascape. We haven't released a public version since a public beta a while back. We'll look into doing that.

Quote:
3. Is there a step by step guide for creating the epidemic model?


There is just the tutorial for the "Stupid Model" in the docs -- hopefully you found that. Also, have you seen the series of articles on my blog?

http://milesparker.blogspot.com/2009/05/agent-based-model-for-influenza-h1n1.html
http://milesparker.blogspot.com/2009/05/experimenting-with-agent-based-model.html
http://milesparker.blogspot.com/2009/05/running-agent-based-model-of-influenza.html

cheers,

Miles
Re: integrating real time data with eclipse abm platform [message #733552 is a reply to message #733403] Wed, 05 October 2011 03:05 Go to previous messageGo to next message
samitha  is currently offline samitha Friend
Messages: 4
Registered: October 2011
Junior Member
Hi,

Thank You for the prompt reply. Actually my concern is this. For each agent, if I have a data base of real movements and if I have already converted them into movements in (x,y) space with appropriate time stamps, could I include that to describe the movements of the agents rather than applying a random movement with out involving a GIS layer. For example agent K start its journey from point (x1,y1) at time t = t1 and it comes to point (x2,y2) at time t = t5 and so on.

Re: integrating real time data with eclipse abm platform [message #733553 is a reply to message #733552] Wed, 05 October 2011 03:10 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
samitha wrote on Tue, 04 October 2011 23:05
Hi,

Thank You for the prompt reply. Actually my concern is this. For each agent, if I have a data base of real movements and if I have already converted them into movements in (x,y) space with appropriate time stamps, could I include that to describe the movements of the agents rather than applying a random movement with out involving a GIS layer. For example agent K start its journey from point (x1,y1) at time t = t1 and it comes to point (x2,y2) at time t = t5 and so on.



Oh yeah, that would totally work. Smile You'd probably want some custom java in there to accomplish but it shouldn't be too difficult. Check out the Ascape API docs, but basically you can just do:

Method:

//some routine to get x,y given period t..
agent.moveTo(new Coordinate2DDiscrete(x, y));

Re: integrating real time data with eclipse abm platform [message #734175 is a reply to message #733553] Thu, 06 October 2011 23:33 Go to previous messageGo to next message
samitha  is currently offline samitha Friend
Messages: 4
Registered: October 2011
Junior Member
Hi,

It's me again. If I'm going to modify one of your sample models to check this say "EpidemicContact" , will modifying "public void initializeLocation()" and "public void movement()" in java code do the job? Or is it much complex than that?
Re: integrating real time data with eclipse abm platform [message #734185 is a reply to message #734175] Fri, 07 October 2011 00:19 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
samitha wrote on Thu, 06 October 2011 19:33
It's me again. If I'm going to modify one of your sample models to check this say "EpidemicContact" , will modifying "public void initializeLocation()" and "public void movement()" in java code do the job? Or is it much complex than that?


No, you've got it exactly right. If you're using a Modeling project (i.e. not just plain Ascape) make sure to do it in a subclass so that the project builder won't end up writing over your code! (You could just move the code to a non-Modeling project as well.)
Re: integrating real time data with eclipse abm platform [message #734194 is a reply to message #734185] Fri, 07 October 2011 01:32 Go to previous messageGo to next message
samitha  is currently offline samitha Friend
Messages: 4
Registered: October 2011
Junior Member
Hi,

I'm using a escape model. Little bit confused with what you referred as a Modeling Project as I started working on the eclipse abm platform exactly week ago.

Now those two methods are in a class called "Individual". Should I make them empty methods and override them in a sub class of Individual Class? In that case do I need to modify the .metaabm file also. Also I have a doubt once I modify it whether rest of the things will work or not Smile Currently the two methods are as follows.

##########################################################################################3

public void initializeLocation() {
Object cityLocation = (Object) ((org.ascape.model.space.Discrete) getEpidemic()
.getCity().getSpace()).findRandomAvailable();
if (cityLocation != null) {
if (getHostScape() != ((Agent) cityLocation).getScape()) {
die();
getEpidemic().getIndividualScape().add(this);
}
moveTo(((HostCell) cityLocation));
}
}

######################################################################################

public void movement() {
double movementDraw = getRandom().nextDouble();
if ((getStatus() != StatusEnum.dead
&& movementDraw < getEpidemic().getMovementProbability()
&& getStatus() != StatusEnum.symptomInfectious && movementDraw < getEpidemic()
.getMovementProbability())) {
Object neighboringLocation = (Object) ((org.ascape.model.space.Discrete) getEpidemic()
.getCity().getSpace())
.findRandomAvailableNeighbor(((org.ascape.model.CellOccupant) this)
.getHostCell());
if (neighboringLocation != null) {
if (getHostScape() != ((Agent) neighboringLocation).getScape()) {
die();
getEpidemic().getIndividualScape().add(this);
}
moveTo(((HostCell) neighboringLocation));
}
}
}
Re: integrating real time data with eclipse abm platform [message #734196 is a reply to message #734194] Fri, 07 October 2011 01:39 Go to previous message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
samitha wrote on Thu, 06 October 2011 21:32
Hi,

I'm using a escape model. Little bit confused with what you referred as a Modeling Project as I started working on the eclipse abm platform exactly week ago.


You can do a straight Escape project or and Escape Modeling project. If you do the latter you could have the issues you describe below. See the description in the action references below for one good way of doing that. Basically you just delegate the method out to a static class somewhere so you don't have to hassle with code generation, protected regions etc...

http://www.eclipse.org/amp/documentation/contents/Modeler_Guide.html#Reference_2

Note that you should probably just create a copy of the Epidemic model and make sure you change the package name (in the root context) so that the two models won't both be generated to the same place.

Quote:
Now those two methods are in a class called "Individual". Should I make them empty methods and override them in a sub class of Individual Class?


See above for a better way of doing this.

hth!


Previous Topic:Call for feature requests
Next Topic:Debugging an escape model
Goto Forum:
  


Current Time: Fri Mar 29 14:26:51 GMT 2024

Powered by FUDForum. Page generated in 0.03017 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top