[kepler-dev] PortParameters Bug?

Edward A Lee eal at eecs.berkeley.edu
Mon Jul 12 13:34:26 PDT 2004


I haven't looked at this example, but I can explain situations in which
PortParameter might not do what you expect:

  1) If it is used in a transparent composite actor, then a token provided
     to a PortParameter will never be read.  A transparent composite actor
     is one without a director.

     Workaround: Put a director in the composite.

  2) Certain actors (such as the Integrator in CT) read parameter values only
     during initialization.  During initialization, a PortParameter can only
     have a value set via the parameter (it can't have yet received a token).
     So if the initial value of the Integrator is set to the value of the
     PortParameter, then it will see only the parameter value, never the value
     provided via the port.

     Workaround: Use a RunCompositeActor to contain the model with the
     Integrator.

Edward


At 01:17 PM 7/12/2004 -0700, Daniel Higgins wrote:
>Hi All,
>
>    I was just looking at the "RunLVPredPrey.xml" workflow in the 
> 'workflow/eco' subdirectory. This workflow always shows an n1int of '2' 
> and an n2init of '10', no matter what the top level parameters are set to!
>
>    The problem seems to be due to the use of a Composite actor in the 
> workflow which uses PortParameters for input (rahter than the more common 
> Port). It seems that the parameter value is ALWAYS used rather than the 
> port token! And trying to remove the port value gives an error.
>
>    It was my understnding that a PortParameter was supposed to use the 
> parameter if there was no token in the port and the port value if there 
> was a token. Am I misunderstanding what is supposed to happen? Or is 
> there a bug here?
>
>Dan
>
>--
>---------------------------------
>Dan Higgins
>Software Developer
>National Center for Ecological Analysis and Synthesis (NCEAS) 735 State 
>St. Rm 205 Santa Barbara, CA 93101 805-892-2531 higgins at nceas.ucsb.edu 
>---------------------------------
>
>_______________________________________________
>kepler-dev mailing list
>kepler-dev at ecoinformatics.org
>http://www.ecoinformatics.org/mailman/listinfo/kepler-dev

------------
Edward A. Lee, Professor
518 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0455, fax: 510-642-2739
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal




More information about the Kepler-dev mailing list