Jose writes:

>What's the best way to set the value of a Parameter if not with
> SetVariable?

I'm a bit of a purist.  If a value is to change at runtime, I prefer
it to be a port instead of a parameter.  This is especially when using
sdf, I like to see the data flow through ports.  SetVariable works,
but in the distant past, it was a great way to violate determinism.

I view SetVariable the same way I view goto statements or multiple
inheritance.  There are some things that are much easier with
SetVariable, goto or multiple inheritance, but they can cause
problems.

That said, this is just my personal view on SetVariable.  Now, it
seems to not have determinism issues.

When I look at at an actor that has a parameter that I want to
change during a run, I consider rewriting the actor to use a
PortParameter.

Personally, I tend to avoid using Port Parameters between levels of
hierarchy.

Anyway, these are just my views, others will have different way of
working.

_Christopher



--------

    Hi Christopher,
    
    
    Thanks for the sugguestions. I'll update my model and give it a try. 
    
    > Also, in some contexts, SetVariable can cause problems with
    > determinism.  I suggest using it carefully.
    > 
    
    What's the best way to set the value of a Parameter if not with SetVariable
   ?
    
    Thanks again, I really appreciate it.
    
      Jose
--------

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to