Here's a brief walkthrough of how I was able to use Java in a timed Petri net. This may not be the best way to do it, but it worked for me. Create your Java code as a package in the Moses project. For example, create a package called "mycode", containing a class "Foo" and a function "bar", which returns the integer value 5. Create a Petri net containing the following chain: Place -> Transition -> Place -> Transition -> Place In the left most place, enter an initial token of [null] In the first transition enter the following function: a = [new mycode.Foo()] Name the outgoing arc of the first transition "a" Name the outgoing arc of the second place "b" In the second transition enter the following function: c = b(0)'bar() Name the outgoing arc of the second transition "c" Save and compile the net. Step through the net in the animator until the token reaches the last place. Inspect the place and you should see a token value of 5. Note - for some reason Java objects only seem to work in lists. I have tried getting scalar Java objects to work and they always crash Hades. -- Unsubscribe mailto:moses-users-request@list.ee.ethz.ch?subject=unsubscribe Help mailto:moses-users-request@list.ee.ethz.ch?subject=help Archive http://lists.ee.ethz.ch/moses-users |