metametascape
Welcome, Guest
Please Login or Register.
Lost Password?
Re:Methods/Functions (1 viewing)
_GEN_GOTOBOTTOM Post Reply

TOPIC: Re:Methods/Functions

#62
ecasotti (User)
Expert Boarder
Posts: 38
graphgraph
Methods/Functions 2008/01/16 16:11 Karma: 0  
There doesn't seem to be a way to create a method for an agent.
A rule can create a method, but a method on an agent with inputs
and outputs doesn't appear possible at this point. Is this true?

Also, on the model I performed a Model->CreateMember->Functions
and then I created a Generic Function. I see no generated code.
Are there restrictions to what functions can me made here? I see
no way to add custom code either.
  The administrator has disabled public write access.
#64
miles (Admin)
Admin
Posts: 59
graphgraph
Re:Methods/Functions 2008/01/16 16:58 Karma: 1  
Hi,

There is no support for arbitrary Agent *functions* that is taking and return variables. This is by design as all transformations should occur through agent state.

The support for generic functions is really only intended for internal use at the moment, but it is a simple matter to enable this general functionality. The idea is that you can specify an arbitrary function and then map it to an implementing class and static method within that class. This is how all of the math functions work (they call the Apache math libraries) and I simply need to enable and test this for modeler end-users.

Miles
  The administrator has disabled public write access.
#65
ecasotti (User)
Expert Boarder
Posts: 38
graphgraph
Re:Methods/Functions 2008/01/16 17:42 Karma: 0  
1. I believe this is a case where I can access a menu item but the functionality
does not exist or is not available. I mentioned this in previous posts
about menu items being availble, but are not appropriate in the context
since they cannot really be used. The idea that I can go through the menu
and specify a function, it appears in the tree, but ultimately I cannot
define it or tie it to an existing fuction elsewhere is a confusing.

2. How would I turn on the ability to tie generic functions to implementations
of static methods on classes?
  The administrator has disabled public write access.
#72
miles (Admin)
Admin
Posts: 59
graphgraph
Re:Methods/Functions 2008/01/20 04:13 Karma: 1  
There is no functionality for arbitrary *agent* methods, hidden or otherwise, but the static ones are a planned feature. I appreciate that it is a bit confusing, especially as docs are minimal, but it is hard to manage separating the developer role from the model developer role right now as the system is evolving so quickly. We'd end up writing a lot of code to selectively hide something that we would be exposing again in the near future. As it stands, you can define new static functions, you just can't use them. Seriously, I'll put this higher in the (lengthy) list of priorities.

But I want to state clearly that this usage is really discouraged except for the most esoteric functions that simply cannot be expressed in metaABM. Once you refer to custom (presumably Java) methods, you lose all kinds of generality. So as with the usage of the Method Act if there is something that you feel you need that isn't in the core facility, please let us know so that we can determine if it should be part of the core.

Post edited by: miles, at: 2008/01/20 04:18
  The administrator has disabled public write access.
#73
ecasotti (User)
Expert Boarder
Posts: 38
graphgraph
Re:Methods/Functions 2008/01/21 00:28 Karma: 0  
Miles

I understand your concerns. But it seems like a great workaround until the system
is indeed stable. I also think some of the issues are as you state, a lack of
documenation. If I were actually good at writing, I would offer help in this area.

We have posted before about functionality that is available through menus and not
really available in generated code. I may start documenting this as it was not
clear as to what I was talking about. But several times I have gotten tripped up
over selecting something that ultimately generates code that isn't usable.

Also, I noticed that the Logical operators are limited. There are not AND and
OR operations. Is this by design?

ev
ev
  The administrator has disabled public write access.
#75
miles (Admin)
Admin
Posts: 59
graphgraph
Re:Methods/Functions 2008/01/21 03:17 Karma: 1  
ecasotti wrote:
But it seems like a great workaround until the system
is indeed stable.


Agreed. You meant "mature", right? re: docs as well. Right now I'm devoting the resources I have to getting the functionality complete and solid, having more examples (thanks to you and others) and then we'll turn more to user docs.

Also, I noticed that the Logical operators are limited. There are not AND and
OR operations. Is this by design?


Good point -- for any control operations you should use the Acts "All" "Any", and "None" (This comes from a more logic / rules focus -- the words OR and AND are too overloaded and suggest conditionals which isn't quite what is going on) but for non-control logical operations it makes sense to support this.
  The administrator has disabled public write access.
_GEN_GOTOTOP Post Reply
© Copyright 2007 Best of Joomla, Powered by FireBoardget the latest posts directly to your desktop