Hi Norbert,

I modified your example slightly and added it as a test as
ptII/ptolemy/domains/pn/test/auto/Branching-switch-PN-ptolemy.xml

I can't get this to fail though.
I'm running under Java 1.5.0_06 under Windows with the Ptolemy CVS
tree.  
I changed the Sleep actor to 0L and I always get 10 outputs.

I've left a copy of what I checked in at:
http://ptolemy.eecs.berkeley.edu/~cxh/models/Branching-switch-PN-ptolemy.xml

If you have a chance, could you download that version and try
replicating the error?  
Also, what version of Java and what OS (Linux? Windows?) are you
running.

If you let me know via email, I'll summarize to the list once we get
to the bottom of the problem.

_Christopher


--------
    
    Hi,
    
    I have created a small workflow to demonstrate the Switch actor. A Ramp 
    produces numbers 1..10, an Expression produces 0..2 (input mod 3), and the 
    Switch has three channels, each with just one Expression to produce a Strin
   g. 
    Finally, the three branches are brough together with NondeterministicMerge 
   and 
    the strings are displayed.
    
    So there I expect 10 strings as output, which is mostly the case if I run i
   t. 
    However, sometimes - quite frequently - less strings are displayed (tokens 
    somewhere are lost) when the workflow stops.
    
    The workflow works nicely if I do one of the followings:
      - replace NondeterministicActor for Select
      - put a Sleep with 1ms to slow down the execution
    
    So it seems to me that PN senses termination condition wrongly in the origi
   nal 
    case. Or what else?
    
    I attach the workflow, already with the Sleep, so it works as expected.
    If you delete the Sleep actor (or even just set to 0) and run it a couple o
   f 
    times, you will see shorter outputs occasionally.
    
    I would like to understand what is happening and why (except if it is a bug
   ). 
    Thanks in advance for explanation.
    Norbert
    
          Norbert Podhorszki
        ------------------------------------
          University of California, Davis
          Department of Computer Science
          1 Shields Ave, 2236 Kemper Hall
          Davis, CA 95616
          (530) 754-8188
          [EMAIL PROTECTED]
          ----------------------------------

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

Reply via email to