Skip to main content



      Home
Home » Archived » AMP » Model Parametrization
Model Parametrization [message #653643] Thu, 10 February 2011 09:18 Go to next message
Eclipse UserFriend
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 12:29 Go to previous messageGo to next message
Eclipse UserFriend
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 01:18 Go to previous messageGo to next message
Eclipse UserFriend
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 13:34 Go to previous message
Eclipse UserFriend
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: Mon Mar 24 07:14:21 EDT 2025

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

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

Back to the top