[kepler-dev] Regarding writing java code for a composite actor

Edward A. Lee eal at eecs.berkeley.edu
Mon Nov 30 09:40:35 PST 2009


This is certainly possible to do (and relatively easy, actually...
Just subclass TypedCompositeActor and build your model in the 
constructor...  You probably will want to mark all the contents
of the actor "transient" so that the exported MoML file is smaller
and not redundant with what your constructor does).

The most interesting such actors in the tree are higher-order actors.
E.g., in CT, ContinuousTransferFunction takes as parameters two
polynomials and synthesizes a composite actor that implements the
specified transfer function using primitive actors.  It does this
in preinitialize() rather than in the constructor.

The PtalonActor provides a higher-level way of doing this than
in Java code. This is documented here:

http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-189.html

There are a few other higher-order actors, like MobileModel that
might be worth looking at.

Edward


harini iyer wrote:
> Hi,
> 
> I am trying to write a java code instead of using different actors and 
> forming a composite actor. Is there a way to do it? That is, I am trying 
> to use different actors and write my own actor (my actor would be a 
> connection of 2-3 actors, as good as a composite actor). I want to add 
> this composite actor in my local library and use it in different 
> workflows. Is there a better way to do it?
> 
> Thank You,
> Harini
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eal.vcf
Type: text/x-vcard
Size: 351 bytes
Desc: not available
URL: <http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20091130/e41f8d03/attachment.vcf>


More information about the Kepler-dev mailing list