Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » AMP » Model Parametrization
Model Parametrization [message #653643] Thu, 10 February 2011 14:18 Go to next message
Lukas Schmid is currently offline Lukas SchmidFriend
Messages: 3
Registered: December 2010
Junior Member
hello,

we have just been wondering how we can define Attributes in the model parametrization file which belong to an agent (and not to the global model).

http://wiki.globalsimulate.org//images/ParameterfileBug.png

Thanks for any reply!

Re: Model Parametrization [message #653685 is a reply to message #653643] Thu, 10 February 2011 17:29 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Hi,

It probably doesn't make sense to assign parameters to agents at the parameter file level -- that's because there is a one-to-one relationship with the parameter file and the top-level model. What you should do is something like:

1. Create an attribute at the top model context called "Bug Size" or perhaps "Default Bug Size" if you want bugs to be different sizes.
2. In an initialization rule for the bug assign that default value to the bug's size attribute

For an impossibly technical and meandering discussion of some of the deeper issues of assigning initial state for nested parameters, you might be interested in this:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=318274
Re: Model Parametrization [message #653774 is a reply to message #653685] Fri, 11 February 2011 06:18 Go to previous messageGo to next message
Lukas Schmid is currently offline Lukas SchmidFriend
Messages: 3
Registered: December 2010
Junior Member
Hi Miles,

thanks for your reply - we will do it this way!

Lukas
Re: Model Parametrization [message #653902 is a reply to message #653774] Fri, 11 February 2011 18:34 Go to previous message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
lukschmi wrote on Fri, 11 February 2011 01:18
Hi thanks for your reply - we will do it this way!



No problem! After I replied to you, I remembered a thought I had for what might actually be a cool/useful feature -- and perhaps be simpler than the other solutions discussed in the above referenced bug. We could consider supporting some kind of XPath like assignment of variables. This would be directly supported by EMF, so wouldn't be incredibly difficult to implement. Then you could do something like:

Bug[*].size=0
Previous Topic:How to start gef3d sample application
Next Topic:Call for feature requests
Goto Forum:
  


Current Time: Tue Apr 23 17:24:00 GMT 2024

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

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

Back to the top