Re: introduction distributed ptolemy

2004-06-14 Thread Christopher Hylands Brooks
There was a mail configuration problem with the ptolemy-hackers
list, so I'm forwarding a couple of bounced messages. 

Rather than trying to merge them, I'm sending them in the order
they were originally sent.

-Christopher

 From: Ferdinando Villa [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: Bertram Ludaescher [EMAIL PROTECTED]
 Cc: Edward A Lee [EMAIL PROTECTED], Tobin Fricke [EMAIL PROTECTED],
 [EMAIL PROTECTED],
 [EMAIL PROTECTED], yang [EMAIL PROTECTED],
 [EMAIL PROTECTED]
 In-Reply-To: [EMAIL PROTECTED]
 References: [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
 Content-Type: text/plain
 Organization: University of Vermont
 Message-Id: [EMAIL PROTECTED]
 Mime-Version: 1.0
 X-Mailer: Ximian Evolution 1.4.6 
 Date: Mon, 14 Jun 2004 11:25:19 -0400
 Content-Transfer-Encoding: 7bit
 
 On Mon, 2004-06-14 at 11:01, Bertram Ludaescher wrote:
   Ideally the ports of an actor should (or at least could)
  have multiple types:
  - the data type (including say XML Schema type),
  - the semantic type (e.g. a concept expression describing more formally
  what else might be known about the data flowing through the port)
  [[aside for Ferdinando: our reductionist/separatist approach does not 
  preclude forever an integrated modeling solution - it's just bottom up 
  to get sth useful soon/in finite time ;-]]
 
 Hi Bertram! one point - if you read reductionistic (which I probably
 wrote somewhere) as reductive you're misinterpreting me - we
 ecologists mostly see reduct. vs. holistic as complementary (with
 hierarchical thinking as a possible integrating framework) so when we
 say reductionistic, we mean exactly what you also mean... one GOOD way
 to look at the problem, usually the most practical, easier to study,
 while often the least conducive to synthetic understanding... but NOT
 separatist
 
 Philosophy aside, here's a more SEEK-specific provocation: don't you
 think that the conceptual/holistic/top-down approach is the one that
 needs the semantic types, while the workflow/reductionist/ptolemy
 approach would be just fine with just the storage/machine types of
 whatever virtual machine AMS will be? 
 
 Also: where do the transformations belong (scaling, units)? I'd argue
 they belong mechanically to the reductionistic side - just like all
 other actors, created to calculate a concept - and if the user don't
 need to see them, it's not because we hide them up in the conceptual
 description, but because they're actors in the workflow, and the
 conceptual description that users work with is not the workflow. 
 
 Maybe we're mixing the sides up somewhat, and if so, is this ok... or is
 it going to postpone the beautiful moment of clarity when we all
 realize that we've all been thinking the same thing all along?
 
 Cheers,
 ferdinand
 
 
  - the event consumption/production type (useful for scheduling a la
  SDF)
  - the communication type (through the Ptolemy/Kepler client, directly
  via say FTP or HTTP) etc
  
  At some levels of modeling ones does explicitely hide such detail from 
  the modeler/user but at other levels this might be a good way of
  overcoming some scalability issues (if you have terabyte data streams
  you want them to go directly where they need to)
  
  A related problem of web servies (as actors) is that they send results 
  back to the caller (Kepler) and don't forward them to the subsequent
  actor making large data transfers virtually  impossible..
  
  A simple extension to the web service model (anyone knows whether
  that's already done???) would allow for data to include *references*
  so that a process would be able return to Kepler just a reference to
  the result data and that reference would be passed on to the consuming 
  actor who then understands how to derefernce it. This simple
  extension seems to be an easy solution to what we called before the
  3rd party transfer problem:
  
  --[Actor A] --- [ Actor B] -- ...
  
  To stream large data set D from A to B w/o going through
  Ptolemy/Kepler one can simply send instead a handle D and then B,
  upon receiving D, understands and dereferenes it by calling the
  appropriate protocol (FTP/gridFTP, HTTP, SRB,...)
  
  Note that there are already explicit Kepler actors (SRBread/SRBwrite,
  gridFTP) for large data transfer. More elegant would it be to just
  send handles in the form, e.g., dereference(http://...ref-to-D..)
  Note that the special tag 'derefence' is needed since not every URL
  should be dereferenced (a URL can be perfectly valid data all by
  itself)
  
  It would be good if we could (a) define our extensions in line with
  web services extensions that deal with dereferencing message parts (if 
  such exists) and (b) can work on a joint
  Kepler/Ptolemy/Roadnet/SEEK/SDM etc approach (in fact, Kepler is such
  a joint forum for co-designing this together..)
  
  Bertram
  
  PS Tobin: I recently met Kent and heard good news about ORB access in
  Kepler 

Re: Ptolemy applets problems

2004-05-21 Thread Christopher Hylands Brooks
Efrat Jaeger [EMAIL PROTECTED] writes:
-
I created the following applet,
http://users.sdsc.edu/~efrat/workflows/queryPGAP.htm, very similar to
the demo applets. Apparently it loads on some computers but on others I
get a java.lang.NoClassDefFoundError: ptolemy/actor/gui/MoMLApplet
error. On the same computers the existing demo applets load perfectly. I
wasn't able to figure out what causes the exception. Does anyone have
any suggestions?
-

Applets are notoriously tricky to get right.
I looked over the source code and did not see anything obvious. 

There is some documentation at
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/ptII/doc/coding/applets.htm

and there is a custom applet chapter in Volume 2 of the Ptolemy II
design doc:
http://ptolemy.eecs.berkeley.edu/papers/03/ptIIDesignSoftware

The applet code you are using is the complex applet code that
will work under Netscape 4.x.  If you do not require support
of Netscape 4.x, then you could use the much simpler 
applet
..
/applet
code.

In fact, for debugging, I would use the simple applet code so
that you are testing the same html code on the different platforms.

Another trick is to look at the website logs and see what files
are being downloaded.

With Java 1.4.2, I noticed that if a class was loaded from a jar
file, then it seemed like the applet class loader would not
find individual .class files on the file system.  The solution
was to make sure and have the archive= tag include jar
files that included all the .class files.  I'm not
sure about the details of this new behaviour, I poked
around on the Sun website but did not see anything.

When I tried to run your applet, I had to install Java 1.4.1_02,
the applet would not run with Java 1.5.0-beta under Mozilla.

Applets can have dynamic versioning or static versioning.

Dynamic versioning permits a JRE greater or equal to a a certain
version to be used.

Static versioning requires that a certain version of JRE 
be used.

The details are covered in:
  http://java.sun.com/products/plugin/versions.html

From the title tag, it looks like your applet is based on one of the
Ptolemy Eye applets.

It looks like your applet and the Ptolemy II 3.0 SDF Eye applet are
using dynamic versioning under IE, but static versioning under
Mozilla?  This would be a bug.

The IE section says:
   classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
which
http://java.sun.com/products/plugin/versions.html
indicates is for dynamic versioning.

The Netscape section says:
   application/x-java-applet;jpi-version=1.4.1_02
http://java.sun.com/products/plugin/versions.html
indicates is for static versioning.

The applet code shipped in Ptolemy II 3.0 in theory uses static
version to restrict the version of the JVM can be used to 1.4.1_02.
This was done because of a bug in 1.4.1 and 1.4.1_01 that machines
that use a particular video chip set to hang.  Since Professor Lee and
I were affected by this bug, we restricted the JVM choice to 1.4.1_02.
I tried to make the applet use dynamic versioning for Netscape so
we would accept 1.4.1_02 or greater, but could not
get this to work, it appeared to be a problem with the patch level.

If possible, it is better to use dynamic versioning.
The Ptolemy II 4.0 applets use dynamic versioning correctly to
require Java 1.4.2 or later.  In principle, Java 1.5.0-beta
should work with these applets.

In general, applets have restrictions:

1) Don't use the readFile() expression function in a model that
is within an applet.  This is because of restrictions in the
applet class loader.

2) If possible, use the simple applet .../applet code
and avoid the really complex javascript code.  If you really
think you need to support Netscape 4.x, consider looking
at the web server logs for the number of Netscape 4.x users
and evaluate the cost of supporting applets for those
users.  Note that Ptolemy II 4.0 supports Netscape 4.x.
Perhaps the next release of Ptolemy II applets will not
support Netscape 4.x?

3) The MoMLViewerApplet class does not permit look inside.
It would be cool if we could use the Single Window interface created
by Thales within an applet.
To run the single window interface in Ptolemy II 4.0, do
   $PTII/bin/vergil -single
The idea would be to create an applet that would use this interface

4) The code generator will generate applets for a model. 
See $PTII/doc/codegen.htm for somewhat out of date documentation.
There will be a chapter in the design doc about how to use the
applet generator.

5) For vergil applets, it might be better to create Web Start
versions.  I noticed that the Java Event Listener Tutorial
is now using Web Start, see
http://java.sun.com/docs/books/tutorial/uiswing/events/example-1dot4/
I started hacking up the applet code generator to generate both
applets and Web Start configurations, but I never really finished
that work

BTW - If you use the controls parameter in your applet, then users
can run the applet.  
To do this, 

Ptolemy II 4.0-beta is available for download

2004-05-19 Thread Christopher Hylands Brooks
.
 * Hierarchical classes, subclasses, and inner classes.
   Version 4.0 introduces actor-oriented classes, subclasses, and
   inner classes with inheritance. This is a major improvement in the
   modularity mechanisms available in actor-oriented design. A side
   effect of the class mechanism is that MoML files are now much
   smaller since they do not duplicate information defined in a base
   class.
 * Lifecycle management
   Version 4.0 introduces the first of a family of lifecycle
   management actors, which are actors that control the execution of
   associated models. This example uses one model to control repeated
   runs of another.
   
  Other Features that are new in Ptolemy II 4.0

 * Statically Checked Unit System
   The new statically checked units system associates units with
   ports and checks compatibility in connections.
 * Higher-Order Components. Version 4.0 adds higher-order
   components, which are components (like actors) that operate on
   other components rather than directly on data.
 * Interactive decorations in Vergil diagrams.
   Actors can have custom icons, diagrams can be decorated with
   decorative elements, and parameters of the icons and decorative
   elements can be tied to values compute by the model.
 * Reconfiguration analysis
   A new capability helps to ensure the safe use of reconfiguration.
   Currently it is primarily used by the code generator to ensure
   that synchronous dataflow rate parameters are constant over the
   lifetime of the model. This analysis also enables parameterized
   static scheduling of some models where rate parameters change only
   between iterations of a sub-model.
 * Causality analysis
   A new (and still evolving) capability unifies causality analysis
   that is required by several domains. It provides a systematic
   framework for determining whether events at a particular input
   affect a particular output.
 * Copernicus
   The copernicus code generator has matured significantly:
  + Better handling of data types, reconfiguration, and
attributes other than simple parameters.
  + Code Generation for the Giotto domain.
  + A primitive code generator for generating atomic actors from
models.
  + Static analysis of reachable code for generating
self-contained jar files.


Plans
-
   This release includes only the documentation for VisualSense, the
   Ptolemy User's Manual has not yet been updated.

   We are currently working on updating the documentation.
   My hope is that the Ptolemy II 4.0 production release will ship
   in mid June.

   Ptolemy II 4.0-beta is primarily for testing by seasoned developers
   and people who have used Ptolemy II before.  

Bugs

   The Ptolemy II 4.0-beta limitations are listed in:
   
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII4.0/ptII4.0-beta/doc/ptII4.0.release.htm
   The Vergil welcome window has a link to a similar list.

   If you find bugs, check the limitations page inside Vergil, then
   check http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII4.0/limitations.htm
   and then send email to [EMAIL PROTECTED]

   In your email, please be sure to include:

   * What operating system you are operating under (Windows XP sp1?
 Solaris 8?)
   * What version of Java you are running. (Run java -version, or use our
 Java Version Applet at
 http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII4.0/JavaVersionApplet.htm
   * Whether the problem occurs in
 * Vergil
 * The local version of the web pages
 * The PtolemyII 4.0-beta website version of the web pages
 * The Web Start version


-Christopher

Christopher Hylands Brooks [EMAIL PROTECTED]  University of California
Programmer/Analyst Chess/Ptolemy/GSRC US Mail: 558 Cory Hall #1770
ph: 510.643.9841 fax:510.642.2739 Berkeley, CA 94720-1770
home: (F-Tu) 707.665.0131 (W-F) 510.655.5480  (office: 400A Cory)


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


Re: I am using ptolemy II to develop an optical network simulator.

2004-05-12 Thread Christopher Hylands Brooks
In comp.soft-sys.ptolemy, [EMAIL PROTECTED] (Kaizen) writes:

 This is for an academic project so the complexity of the simulator
 will not reach that of something commercial like Optiwave or VPI.

VPI and Ptolemy Classic have a connection,
http://ptolemy.eecs.berkeley.edu/conferences/99/opticalsystems.pdf
Says
VPI products comprise:
 *Photonic Transmission Design Suite (PTDS) based on Ptolemy 0.7 . . . 

 The components that I am simulating include the transmitter, the fiber
 and the receiver.
 
 In the transmitter which I am working on now, there is a PRBS that
 goes thru a NRZ and that signal is modulated with that of a DFB laser.

I don't know much about optical systems, so the above are just
TLAs to me :-)

 What kind of domain should I be simulating this in,

Hard to say.  Usually network simulators use a timed domain, such as
DE.  However, it can be tricky to create large efficient DE models -
it is hard to get the level of abstraction right.

Someone else might have a suggestion

 I am currently
 doing it in SDF, but so far the entire simulation just slows down a
 lot when I leave it running for a while.

1. Make sure you are not using the Display actor, it eats up memory.
2. Try monitoring your memory usage.  Is the java process consuming
lots of memory?
3. There are some notes at $PTII/doc/coding/performance.htm, which
is at 
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII4.0/ptII4.0-beta/doc/coding/performance.htm
( I see that the file has a .html bug which I will fix shortly)
4. Using a commercial tool like JProbe can help.  They have a free trial.

-Christopher


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


Re: Compiling Ptolemy with Eclipse

2004-05-04 Thread Christopher Hylands Brooks
Hmm, this sounds like an Eclipse bug tickled by Ptolemy adjusting
setting up the ptII/.classpath file.

I've seen stack traces inside eclipse 2.1.2.  Rather than
reinstalling, what I usually what I ended up doing was removing my
eclipse/workspace directory and trying various things.

You could try removing ptII/.classpath and seeing if the setup
completes.  That worked for me.

I was able to build after hacking adding the following to .classpath.in:
   classpathentry excluding=cm/ kind=src path=ptolemy/copernicus/c/test/

and I had to add 
ptolemy/copernicus/c/test/cm/|
to the list of excluded files.

At one point, the Java build path window came up and I had
to remove jmf.jar and sound.jar

I later removed the jxta jar files because they had this
bogus ${PTII} inside of them.  I'll fix configure momentarily.
This bug occurred because our devel tree contains the jxta jar files,
but we don't ship these jar files.
To remove the jxta jar files, right click on the ptII project, select
Properties - Java Build Path - Libraries

You may later want to exclude ptolemy/moml/jxta from the build.

Below is a copy of the .classpath.in that worked for me: 
--start--
?xml version=1.0 encoding=UTF-8?
classpath
classpathentry excluding=cm/ kind=src path=ptolemy/copernicus/c/test/
classpathentry
 
excluding=**/CVS/|**/codeDoc/|config/|doc/coding/templates/|ptolemy/apps/agilent/|ptolemy/apps/anytimecontrol/|ptolemy/apps/charon/|ptolemy/apps/crazyboard/|ptolemy/apps/etherealSting/|ptolemy/apps/fullscreen/|ptolemy/apps/giotto/|ptolemy/apps/ia/|ptolemy/apps/kurt/|ptolemy/apps/jmf/|ptolemy/apps/kvm/|ptolemy/apps/lego/|ptolemy/apps/lejos/|ptolemy/apps/midp/|ptolemy/apps/mobileCoding/|ptolemy/apps/pendulum/|ptolemy/apps/rijndael/|ptolemy/apps/robot/|ptolemy/apps/security/|ptolemy/apps/sobel/|ptolemy/apps/softwalls/|ptolemy/apps/soot/|ptolemy/apps/throttle/|ptolemy/apps/tini/|ptolemy/apps/transmission/|ptolemy/apps/vergil/|ptolemy/apps/waba/|ptolemy/apps/webstart/|ptolemy/apps/xsl/|ptolemy/copernicus/c/test/|ptolemy/copernicus/c/test/cm/|ptolemy/domains/ct/demo/Saber/|ptolemy/domains/gr/lib/experimental/|ptolemy/domains/pdf/|ptolemy/plot/servlet/|vendors/@ECLIPSE_EXCLUDING_SRC@
 kind=src path=/
classpathentry kind=con path=org.eclipse.jdt.launching.JRE_CONTAINER/
@ECLIPSE_CLASSPATHENTRY_LIBS@
classpathentry kind=output path=/
/classpath
--end--

I'll add a note to the website about this

-Christopher 


Thanks for your help,  I also tried the method described but I can not
get the project compiled, here is what I tried :

tar xfz ptII3.0.2.src.tar.gz
mv ptII3.0.2 ptII

export PTII=/home/franck/bin/my_PTII/ptII
cd $PTII
./configure


cd ~/bin/my_PTII
eclipse

   File-New Project
   Project Name : ptII
   Directory: /home/franck/bin/my_PTII
   Finish

-- An error occured while creating the java project
 Reason  : invalid project description
 /home/franck/bin/my_PTII and /home/franck/bin/my_PTII/workspace overlap


If I change the directory with : /home/franck/bin/my_PTII/ptII

-- An error occurred while creating the java project
 See error log for more details.
 (java.lang.NullPointerException in the .log of Eclipse !)


I tried other thinks but I can only compile and run (make fast install)
without Eclipse !



Franck


On Mon, 2004-05-03 at 17:14, Christopher Hylands Brooks wrote:
 With Eclipse, usually it is necessary to run configure so that the
 .classpath file is properly set up.  An alternative is to set up the
 project class path by hand.  Locally, our Eclipse users run configure,
 so the by hand section of the doc could probably use some testing
 and updating.
 
 One issue is that Ptolemy II includes many packages that
 use other external packages that might not be present, so setting the
 classpath and excluding packages by hand can be time consuming.
 
 -Christopher
 
 
 
 
 
 Good morning,
 
 I'm a software designer in the Pasteur Institute (Paris) and I'm
 involved with a workflow definition and conception for sequence analy
   sis
 (mainly). Ptolemy II seems to correspond to the core functionalities 
   I
 need and seems to be easy to customize (thanks to have made docs and 
   UML
 diagrams !)
 
 Unfortunatly I'm trying to make an eclipse project following the
 instructions described but without success.
 
 I'm now trying to install Ptolemy by hand following the chapter
 Setting up for Ptolemy II By Hand described in doc/coding/eclipse.h
   tm
 and I have these errors :
 
 1 - The project was not built since its classpath is incomplete. Cann
   ot
 find the class file for ptolemy.math.Complex

Re: Compiling Ptolemy with Eclipse

2004-05-03 Thread Christopher Hylands Brooks
With Eclipse, usually it is necessary to run configure so that the
.classpath file is properly set up.  An alternative is to set up the
project class path by hand.  Locally, our Eclipse users run configure,
so the by hand section of the doc could probably use some testing
and updating.

One issue is that Ptolemy II includes many packages that
use other external packages that might not be present, so setting the
classpath and excluding packages by hand can be time consuming.

-Christopher





Good morning,

I'm a software designer in the Pasteur Institute (Paris) and I'm
involved with a workflow definition and conception for sequence analysis
(mainly). Ptolemy II seems to correspond to the core functionalities I
need and seems to be easy to customize (thanks to have made docs and UML
diagrams !)

Unfortunatly I'm trying to make an eclipse project following the
instructions described but without success.

I'm now trying to install Ptolemy by hand following the chapter
Setting up for Ptolemy II By Hand described in doc/coding/eclipse.htm
and I have these errors :

1 - The project was not built since its classpath is incomplete. Cannot
find the class file for ptolemy.math.Complex. Fix the classpath then try
rebuilding this project.

2 - For the file /ptolemy/matlab/test/TestEngine.java : 
This compilation unit indirectly references the missing type
ptolemy.math.Complex (typically some required class file is referencing
a type outside the classpath)

(Weird because I can see ptolemy.math in Eclipse) 
Can you say me if there is a mistake in the procedure described or I
made something wrong.

Thanks a lot !



Regards

Franck Valentin


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



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


Re: ANNOUNCE: galsC 0.1.0 (alpha) release

2004-04-28 Thread Christopher Hylands Brooks
Elaine Cheong and Jie Liu announced availability of 
galsC 0.1.0 (alpha)

-Christopher


--- Forwarded Message
Subject: [Ptolemy] ANNOUNCE: galsC 0.1.0 (alpha) release
Date: Sun, 25 Apr 2004 16:18:30 -0700 (PDT)

We are announcing the alpha release of galsC, a language and compiler
for use with the TinyGALS programming model, which uses TinyOS as the
underlying component model.  galsC is compatible with TinyOS 1.x and
nesC 1.1.1.  You can use the galsC compiler to compile all your
existing TinyOS programs.

TinyGALS is a globally asynchronous, locally synchronous model for
programming event-driven embedded systems, especially sensor
networks.  At the local level, software components communicate with
each other synchronously via method calls.  Components are composed to
form actors.  At the global level, actors communicate with each other
asynchronously via message passing, which separates the flow of
control between actors.  A complementary model called TinyGUYS is a
guarded yet synchronous model designed to allow thread-safe sharing of
global state between actors without explicitly passing messages.  The
TinyGALS programming model is structured such that code for all
inter-actor communication, actor triggering mechanisms, and access to
guarded global variables can be automatically generated from a high
level specification.

By raising concurrency concerns above the level of TinyOS components,
the TinyGALS programming model allows programmers to focus on the main
tasks that the application must execute.  Programs developed using
this task-oriented model are thread safe and easy to debug.

For more information and download instructions, please see:
  http://galsc.sourceforge.net/

To receive future announcements about galsC, please sign up here:
  http://lists.sourceforge.net/lists/listinfo/galsc-announce

Please visit us at IPSN'04 (Berkeley, California, April 26-27, 2004):
  http://ipsn04.cs.uiuc.edu/
--- End of Forwarded Message



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


Re: Reading a file from Matlab

2004-04-27 Thread Christopher Hylands Brooks
In comp.soft-sys.ptolemy, [EMAIL PROTECTED] (Renooj Jacob) writes:

 I have a script file in matlab which solves a series of equations. I
 would like to access this matlab file from ptolemy and plot within
 ptolemy using the matlab expression. Is it possible? If not is there
 any other way.

I'm not sure what the format of the script file is.

You could read from the file using ExpressionReader, FileReader or
LineReader and then you could use the String actors to process the
data, though you might find it easier to create a custom actor to do
custom plotting.
You could then call the Matlab Expression actor to plot the data.


 Also i have a function file in matlab. i want to execute it from
 ptolemy. How to do that?

I don't know much about Matlab, but I did create a simple test 
that reads in a function from a .m file.

Is a function file a .m fle? 

Under Windows, running 
cd $PTII ptolemy/matlab/test
$PTII/bin/vergil mFileTest.xml
will bring up a model that reads mFileTest.m that defines a 
simple file.

The model annotation says:
  This test uses a function defined in
  an m-file called mFileTest.m.
  The packageDirectories parameter of the
  MatlabExpression actor is set to include
  $PTII/ptolemy/matlab/test in the directories
  that are searched by Matlab.
  The _debugging parameter is set to 2
  so that debugging output will appear
  on standard out.

I also created a simple wireless model that uses a .m file at
$PTII/ptolemy/domains/wireless/demo/MatlabWirelessSoundDetection/

Note that at this time you cannot use .m files with pure jar file
based installers like Web Start.  We could hack something up
that would get the .m file from a jar file and copy it to a directory
and add that directory to the packageDirectories parameter of the model.

Also, it appears that gcc-5.3 has problems running the Matlab
interface.  Use gcc-5.2 instead

 Regards
 Renooj

-Christopher


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


Re: FOR LOOP

2004-04-26 Thread Christopher Hylands Brooks
[EMAIL PROTECTED] (Renooj Jacob) writes:
 1) How does one implement FOR LOOP in Ptolemy.

There was a little bit of discussion about this in November.
Searching google with:
  switch group:comp.soft-sys.ptolemy

yields this post in comp.soft-sys.ptolemy

Professor Lee wrote:
 The Switch actor will do this in DE...
  
 It will also do this in PN, without a timing model...
 
 Edward
 
 At 12:44 PM 11/19/2003 -0800, Christopher Hylands Brooks wrote:
 In comp.soft-sys, [EMAIL PROTECTED] (Dave from Dublin)
 writes:
 
  I am quite new to Ptolemy and I am working a little in the DE domain.
  I cannot seem to find an actor that will perform the equivalent of an
  IF statement, i.e. an actor that reads from a single input channel and
  chooses which output port to write to, based on the value read (e.g.
  5 write to port1, else write to port2).  Is there an actor to do this
  or is there another way to implement this kind of functionality?
  Any help greatly appreciated,
 
 
 This sounds a bit like Dynamic Dataflow (DDF), which is not supported
 in Ptolemy II.  In SDF, having an actor that fires to a different port
 depending on its value makes it difficult to figure out the balance
 equations.
 
 You could try using a Comparator connected to a BooleanSelect or
 BooleanSwitch.  Comparator is found under actor library - logic
 BooleanSelect and  BooleanSwitch are found under actor library -
 boolean flow control - boolean flow control.
 
 Someone else might have a suggestion.
 
 -Christopher



[EMAIL PROTECTED] (Renooj Jacob) writes:
 2) I am trying to simulate Electromagnetic simulation using the Finite
 Difference time domain technique whose code is written in C language.
 I would like to do the same in Ptolemy. Is it possible? Which Director
 should i choose.

I'm not sure.
Take a look at th Continuous Time domain?

-Christopher


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


Re: memory problem

2004-03-31 Thread Christopher Hylands Brooks
This bounced because of configuration problem on the mail server,
so I'm resending it.

-Christopher
--- Forwarded Message


From: Stephen Andrew Neuendorffer [EMAIL PROTECTED]
To: Nilgun Fescioglu Unver [EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED]
Subject: [Ptolemy] Re: memory problem
Date: Wed, 31 Mar 2004 08:55:16 -0800


The culprit is apparently the Display actor, which internally uses
a JTextArea, which is a known memory hog:

A quick google search turns up:

 I can't believe this exists in Swing, but I've found
 that when I loaded a 2MB file into JTextArea it
 creates literally 394,000+ java.lang.ref.Finalizer
 objects that hang around event after the JTextArea is
 released. What's worse is my memory usage spikes to
 65MB! That's 30 times the size of the text string! I
 don't know what java.lang.ref.Finalizer object is, or
 why it gets created.

After 6000 iterations, that's roughly 1.3 MB of text

At 01:26 PM 3/30/2004 -0800, Nilgun Fescioglu Unver wrote:
Hi,

Sorry if you received this message for the second
time..

I have a java.lang.OutOfMemory error problem with my
model developed in Ptolemy II version 3.0.2.

I am working on a model which uses an ArrayToken (of
180 tokens) and my actors change the value of the
tokens in each iteration. As tokens are immutable I am
creating new tokens in each iteration. During the run
time after several iterations the system stops with an
error java.lang.OutOfMemory. I thought some problem
with garbage collection is creating the problem so I
tried calling System.gc at the end of fire() function
in my actors but there was no change in the number of
iterations before getting the error.

I tried to generate the same problem with the actors
of Ptolemy and created a simple model using the
ArrayExtract actor (the xml file is attached) and ran
into the same problem after several iterations (6143
iterations on a computer with 512MB Ram, Windows XP
operating system, java version 1.4.2 ).

Could you help me to find out the reason of this
problem? And how can I continue the simulation without
running out of memory?

Thanks,
Nilgun Fescioglu Unver

Attachment deleted


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


Re: Random numbers

2004-03-19 Thread Christopher Hylands Brooks
Kostas Oikonomou [EMAIL PROTECTED] writes:

 I'm trying to see if I can use the DE domain of Ptolemy II to
 simulate a simple semi- Markov process.  The main obstacle I've run
 into is that I can't see any way of generating random numbers from
 distributions other than the exponential and normal.
 Is there some relatively easy way of doing this? (i.e. no Java code,
 because I don't know enough Java).  I remember from a while ago that
 Ptolemy Classic had such facilities.

I'm not sure.  I don't know that much about random numbers.

In Ptolemy II 3.0, there are the following actors that generate
random numbers under actor library-random 

Bernoulli - An actor that outputs a random sequence of booleans.
DiscreteRandomSource - An actor that produces tokens with a given
   probability mass function.
Gaussian - An actor that outputs a random sequence with a Gaussian
   distribution.
Rician - An actor that outputs a random sequence with a Rician distribution.
Uniform - An actor that outputs a random sequence with a uniform distribution.


Under actor library - sources - timed sources, there is
PoissonClock - A Poisson process clock source.

The expression language has random() and gaussian() functions:


 The functions random() and gaussian() shown in Table 5 on page
 96 return one or more random numbers. With the minimum number of
 arguments (zero or two, respectively), they return a single
 number. With one additional argument, they return an array of the
 specified length. With a second additional argument, they return a
 matrix with the specified number of rows and columns.

 There is a key subtlety when using these functions in Ptolemy II. In
 particular, they are evaluated only when the expression within which
 they appear is evaluated. The result of the expression may be used
 repeatedly without re-evaluating the expression. Thus, for example, if
 the ivalue/i parameter of the iConst/i actor is set to
 random()/font, then its output will be a random constant, i.e., it
 will not change on each firing. The output will change, however, on
 successive runs of the model. In contrast, if this is used in an
 Expression actor, then each firing triggers an evaluation of the
 expression, and consequently will result in a new random number.

random() and gaussian() are declared in
ptolemy/data/expr/UtilityFunctions.java.
You could add other functions to that file.

You could also use the interface to Matlab, see
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII3.0/ptII3.0.2/ptolemy/matlab/matlab.htm

Someone else on the list might have other suggestions.

-Christopher


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


Re: Using Ptolemy II embedded in my product

2004-03-04 Thread Christopher Hylands Brooks
Michael Doorley writes:

 Hi Christopher
 
 Thanks for adding me to the list.
 
   1. Can I use Ptolemy II by calling methods in the API that would
   create a model, populate it, run a simulation and extract the results?
   As a bonus for the advanced user I would like to save the model as an
   XML file that could be opened in Ptolemy II GUI tools (e.g. Vergil),
   but that is not a priority.
  
  Yes.  See ptolemy/actor/gui/MoMLSimpleApplication.java and
  ptolemy/actor/gui/PtExecuteApplication.java, which both instantiate and
  run
  a model.
  
 
 I have looked at MoMLSimpleApplication.java and my problem with it is that
 it seems to require a file as input.  I am looking for a solution where I
 can create and populate model in memory directly from my program.  The
 closest thing I have found is the Dining Philosophers demo of the CSP
 domain, which does not seem to have a file dependency, unless I am missing
 it.
 
 I am currently trying build an equivalent of that program for DE.  Do you
 know if any similar sample already exists?
 
 Thanks for your help,
 Michael

Sorry, I thought you wanted to _read_ a MoML file.

You could do something similar to how the  
ptII/ptolemy/domains/ct/demo/Helicopter/Helicopter.java
works.

You could create a similar model with domain polymorphic or DE
actors and using the DE Director


Note that if you call
System.out.println(exportMoML());
from within a TypedCompositeActor, then you will get the MoML output.

See also:
ct/demo/Lorenz/Lorenz.java
ct/demo/SigmaDelta/SigmaDelta.java
ct/demo/SquareWave/SquareWave.java
ct/demo/StickyMasses/StickyMasses.java
ct/demo/Thermostat/Thermostat.java
sdf/demo/Butterfly/Butterfly.java

For example, to run the last demo, you would do 
java -classpath ptolemy.actor.gui.CompositeActorApplication -class 
ptolemy.domains.sdf.demo.Butterfly.Butterfly


The shallow code generator will read in certain models and generate 
java files.  
(See
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/ptII/doc/codegen.htm)

Below I ran the shallow code generator on 
ptII/ptolemy/domains/de/lib/test/auto/Queue.xml
and added throws lines so that it would compile

The file is in the ptolemy/copernicus/shallow/cg/Queue
directory, so it is in the ptolemy.copernicus.shallow.cg.Queue package.

[EMAIL PROTECTED] 66% pwd
/vol/maury/maury2/cxh/ptII/ptolemy/copernicus/shallow/cg/Queue
[EMAIL PROTECTED] 67% cat CGQueue.java
/* CGQueue - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
package ptolemy.copernicus.shallow.cg.Queue;
import ptolemy.actor.IOPort;
import ptolemy.actor.TypedCompositeActor;
import ptolemy.actor.TypedIOPort;
import ptolemy.actor.TypedIORelation;
import ptolemy.actor.gui.LocationAttribute;
import ptolemy.actor.gui.SizeAttribute;
import ptolemy.actor.lib.Clock;
import ptolemy.actor.lib.Test;
import ptolemy.data.expr.Parameter;
import ptolemy.domains.de.kernel.DEDirector;
import ptolemy.domains.de.kernel.DEIOPort;
import ptolemy.domains.de.lib.Queue;
import ptolemy.kernel.ComponentPort;
import ptolemy.kernel.CompositeEntity;
import ptolemy.kernel.attributes.VersionAttribute;
import ptolemy.kernel.util.Settable;
import ptolemy.kernel.util.Workspace;
import ptolemy.kernel.util.IllegalActionException;
import ptolemy.kernel.util.NameDuplicationException;
import ptolemy.moml.Documentation;
import ptolemy.moml.Vertex;

public class CGQueue extends TypedCompositeActor
{
public VersionAttribute A_createdBy;
public SizeAttribute A_vergilSize;
public LocationAttribute A_vergilLocation;
public DEDirector ADE;
public Parameter ADE_startTime;
public Parameter ADE_stopTime;
public Parameter ADE_stopWhenQueueIsEmpty;
public Parameter ADE_synchronizeToRealTime;
public Parameter ADE_isCQAdaptive;
public Parameter ADE_minBinCount;
public Parameter ADE_binCountFactor;
public ComponentPort PQueue_input;
public ComponentPort PQueue_output;
public ComponentPort PQueue_trigger;
public ComponentPort PClock_output;
public ComponentPort PClock_trigger;
public Parameter AClock_stopTime;
public Parameter AClock_period;
public Parameter AClock_offsets;
public Parameter AClock_values;
public Parameter AClock_numberOfCycles;
public Documentation AClock__doc;
public ComponentPort PClock2_output;
public ComponentPort PClock2_trigger;
public Parameter AClock2_stopTime;
public Parameter AClock2_period;
public Parameter AClock2_offsets;
public Parameter AClock2_values;
public Parameter AClock2_numberOfCycles;
public Documentation AClock2__doc;
public ComponentPort PTest_input;
public ComponentPort PTest_output;
public Parameter ATest_correctValues;
public Parameter ATest_tolerance;
public Parameter ATest_trainingMode;
public Vertex Arelation5_vertex1;

public CGQueue(Workspace workspace) throws IllegalActionException, 
NameDuplicationException {
super(workspace);
__CGInit();
}

  

Re: Firing by events

2004-02-19 Thread Christopher Hylands Brooks
The single window tabbed interface by Jerome Blanc and Benoit Masson
of Thales might be useful here.
This interface is in the ptII developer tree in $PTII/thales.
The single window interface has not yet been publically released.
To start it up from, run vergil -single.

The ptII/thales/README says:
 For the single window mode, the principle is to catch the frames
 created on each Tableau and move its container into the main
 TabbedPane.

 In this mode, you can either create classic editors, or navigable
 graph editor where beside the actors library there is a browsable
 model tree (warning : this doesn't work with any state machine actor,
 because there is only a navigable ActorGraphFrame, and there should be
 other navigable Frame for modal models, FSM and interface automation
 actors. This could be solved by merging the NavigableActorGraphFrame
 features into the BasicGraph Frame, but as always we try to develop
 without modifying the original Ptolemy sources.)

 There is a specific effigy for navigable models (single window
 mode). To create this specific effigy, the MoML file should contain a
 property at the top level named _navigable (property
 name=3D_navigable /). It is created automatically for each new
 navigable graph editor (new menu), and could be added on existing
 models.

So, perhaps this code could be used as the basis of an applet that
would allow traversal of the model?

The other thing I was working on was extending the applet code
generator so that it would generate a Web Start setup that would 
consist of only the classes necessary to run the model. 
This work is still in progress.

-Christopher


Professor Lee wrote:

At 05:00 PM 2/18/2004 -0800, Efrat Jaeger wrote:
A different question is about applets. When I create an applet out of a 
model that contains a composite entity, is it possible to look inside the 
composite entity from within the applet? (for presenting and running the 
workflow on a web page).

This has been on the to do list for some time... But
it's not entirely clear what it should do...  replace the
current image in the web page?  Open a window?  Go to a new
page?  I'm inclined to think it should go to a new page,
so the back button takes you back...

Edward



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


Re: Ptolemy II : reuse legacy application, distributed actors

2003-11-25 Thread Christopher Hylands Brooks
BERGERO Didier [EMAIL PROTECTED] writes:

 I have 2 (newbie?) questions :
 
 * While waiting for e-ptolemy, with Ptolemy II and in the same
 simulation, how to use local actors and remote (distributed) actors ? : use
 of applets...

I'm not sure what e-ptolemy is in this context.

There are some actors that use jxta in $PTII/ptolemy/actor/lib/jxta

We have some corba actors, though they have not been released.

We are starting to look at Grid computing, but we do not have any
results to report yet.

Use of applets is covered in
http://ptolemy.eecs.berkeley.edu/papers/03/ptIIDesignSoftware

 * and how to reuse legacy application e.g. how to wrap C,FORTRAN,ADA!!
 code to be an Ptolemy II actor ?

Ptolemy II 3.0.2 includes an interface that uses JNI, see
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII3.0/ptII3.0.2/jni/doc/JNIActorHelp.pdf

See also the matlab actor in $PTII/ptolemy/matlab

-Christopher


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


Re: Is there a way to speed up the redraw?

2003-10-13 Thread Christopher Hylands Brooks
In comp.soft-sys.ptolemy, luedeke [EMAIL PROTECTED] writes:

 I have the feeling that the redraw of a ptolemy.plot.Plot object is a bit
 slow, because doubled buffering or something else is not used, so the plot
 has to be recalulated each time a redraw is needed. Is there a way to speed
 up the redraw?
 
 Alexander

Are you using the most recent version of Ptplot, Ptplot 5.3?
Ptplot 5.3 is the version that shipped with Ptolemy II 3.0

There were some changes made for double buffering betweent Ptplot 5.2
and 5.3.  Another change is that the lines are now drawn thicker.

-Christopher


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


Re: Point width on XYPlotter

2003-09-25 Thread Christopher Hylands Brooks
In the XYPlotter, click on the plot format button
in the upper right (this is the second from the right button that has
two red impulse lines)
Then select
Marks: dots

Save your model

When you run it again, it will have a dot for the single point.

The way this works is that the MoML file gets some plotml inside
a configure element that sets the marks to dots

-Christopher

Christopher Hylands Brooks [EMAIL PROTECTED]  University of California
Programmer/Analyst Chess/Ptolemy/GSRC US Mail: 558 Cory Hall #1770
ph: 510.643.9841 fax:510.642.2739 Berkeley, CA 94720-1770
home: (F-Tu) 707.665.0131 (W-F) 510.655.5480  (office: 400A Cory)




Hi,

I'm trying to plot a single point on XYPlotter. How can I control the width
of the point, so that I'll be able to view it?
It is also necessary for plotting a sequence of points, if the connected
variable is set to false.

Thanks,
Efrat


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



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


Re: diva source code of newest version

2003-09-23 Thread Christopher Hylands Brooks
Tristan Crecelius [EMAIL PROTECTED] writes:

 where can I find the newest source code of the diva lib.
 
 Last version used from Ptolemy is dated 21.04.2003 (diva.jar 1.035.788 
 Bytes)


I've created a snapshot of the Diva tree from April 22, 2003
and made it available on the Ptolemy II 3.0.2 source download page
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII3.0/index.htm

Both .tar.gz and zip files are available directly:
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII3.0/diva-22Apr03.tar.gz
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII3.0/diva-22Apr03.zip


It is not necessary to download the Diva source files to build
Ptolemy II, Ptolemy II includes diva.jar. Download the diva .tar.gz or
.zip if you are interested in extending the Ptolemy II GUI itself.

   1. Download either diva-22Apr03.tar.gz (1.8 Mb), or
  diva-22Apr03.zip (2.5Mb)
   2. Change to the Ptolemy II directory and uncompress them. For
  example:

  cd $PTII
  tar -zxf /tmp/diva-22Apr03.tar.gz

   3. Follow the instructions in $PTII/diva/README.txt 


Note that this diva snapshot will build a slightly smaller jar file
than what was shipped: 974201 bytes instead of 1035788 bytes.

One difference is that a few test directories are not included. 
There are minor differences in a few .class files as well.
I'm told that these primarily are caused by local variables being
renamed in the version of diva.jar that was shipped with Ptolemy II
3.0.2

Let me know if you have problems.

The diva home page is on
http://www.gigascale.org/diva
Note that the diva home page will move to
http://embedded.eecs.berkeley.edu/diva
at somepoint in the not to distant future. 

-Christopher

Christopher Hylands Brooks [EMAIL PROTECTED]  University of California
Programmer/Analyst Chess/Ptolemy/GSRC US Mail: 558 Cory Hall #1770
ph: 510.643.9841 fax:510.642.2739 Berkeley, CA 94720-1770
home: (F-Tu) 707.665.0131 (W-F) 510.655.5480  (office: 400A Cory)



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


Re: problems rebuilding Ptolemy classic from scratch

2003-09-12 Thread Christopher Hylands Brooks
I have some notes for compiling Ptolemy II 0.7.2 devel under Linux
at
http://ptolemy.eecs.berkeley.edu/ptolemyclassic/pt0.7.2/linux.htm

I'll see about adding a more prominent link to that page from 
the 0.7.1 page.

xv not compiling is fairly common, you can run without it.
xv is also available elsewhere.

If pigiRpc is not present, then you probably have a compilation
problem.
Try
cd $PTOLEMY
make  make.out

and then look in make.out for lines that contain three ***

-Christopher




Hi again. Thanks all for your answers to my last question. i'm trying ti re
   build
from scratch Ptolemy classic 0.7.1. I am with linux debian 3.0 (woody).I us
   e
bash, not cshell.

I got the sources to 0.7.1,, the tar-gz archives with the global src and
others. Then I untar the archives, in $PTOLEMY, and foollow the instructi
   ons
in the web page of Ptolemy project, doing make and make install. Then an er
   ror
happened, something related with Tycho. Perhaps I hasn't got Tcl/tk or some
   thing
about that.

Then, I do:

make everything

Now, I got an error related with xv. I suppose that I didn't finish my
installation or something doesn't work right, because when I try to start p
   igi
from $PTOLEMY/bin/pigi, it says that pigi.Rpc doesn't exists or is not prep
   ared
to be executable.

I think I'm doing something wrong. Perphaps it would be easier if I get som
   e
.deb files from ptolemy, but I don't know how to got them.

Can I receive some help? Thanks again and regards.


-
This mail sent through IMP: http://horde.org/imp/

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



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


Re:

2003-09-05 Thread Christopher Hylands Brooks
Hmm, I thought I sent a reply to this earlier this week, see
below

 From: Christopher Hylands Brooks [EMAIL PROTECTED]
 To: Darine Abdelahad [EMAIL PROTECTED]
 Subject: Re: Ptplot mouse code
 Cc: [EMAIL PROTECTED]
 Date: Wed, 03 Sep 2003 09:04:41 -0700
 
 Take a look at the zoom code in PlotBox.java
 It converts from window coordinates to plot coordinates.
 
 See also
 
 http://ptolemy.eecs.berkeley.edu/java/ptplot5.2/ptolemy/plot/doc/ptplotfaq.htm#ptplot
  potential features
 
-Christopher





Hi,

I have a question:
I want the user to be able to click on a point on the graph in order to 
obtain more information about it. To do so, I need the mouse click to retur
   n 
the coordinates of the point.
So I tried to add to the Plot object an instance of a class that 
implements the MouseListener interface. And then in the mouseClicked functi
   on, 
the getX()and getY() methods of the MouseEvent are supposed to return the 
coordinates of the point where the user clicked. 
But these coordinates are given with respect to the window where the 
plot is found, whereas I need the coordinates with respect to the Xaxis and

Yaxis of the plot (that is the coordinates assigned to the point by my 
application).
So I was wondering how I can obtain these coordinates upon a mouse click.

Can anyone help me with that?

Thanx



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


Re: first day with ptolemyII

2003-09-03 Thread Christopher Hylands Brooks
In comp.soft-sys.ptolemy, cfk [EMAIL PROTECTED] writes:

 Well, let me answer my own question and pose the next one.
 
 It appears the webstart is an interactive demo only.

The Web Start version if fully functional with the exception
of the Jython actor, which uses some strange caching mechanism.
See below for details.

  So, I downloaded the java run-time environment and installed it. I now
 have in /usr/bin executables such as java, jar, javadoc and other
 somewhat familiar things (although its been a few years since I
 installed java). I also have a /usr/src/ptII3.0.2 directory and
 was able to './configure', 'make' and 'make install'. The first
 two completed with no errors, but 'make install' has troubles at
 the end with '/usr/bin/jar: invalid option -- i' and no rule to
 make target 'coding/condingConfig.jar' needed by 'docConfig.jar'.

I've seen this problem with Windows Cygwin jar before, where it is not
entirely compatible with the Sun jar.

Try putting the JDK bin in your path before /usr/bin.
I'll see about making a test for this in configure.

If you really want to use /usr/bin/jar, try editing 
$PTII/mk/ptcommon.mk and change
(cd $(PTJAR_TMPDIR); $(JAR) -cvf tmp.jar .; $(JAR) -i tmp.jar)
to
(cd $(PTJAR_TMPDIR); $(JAR) -cvf tmp.jar .)

in three places.

The -i option is used to generate an index for the jar file which
make applications and applets start faster.


 I added /usr/src/ptII3.0.2/bin to my path in .bashrc. I also added
 an export of PTII=/usr/src/ptII3.0.2. At this point, if I invoke
 vergil, I can see the error couldnt find 'java/lang/Object'. I
 have been here before and I think it is the lack of a setting for
 JAVAHOME and CLASSPATH. Unfortunately, I dont know where
 java/lang/Object is, so setting the CLASSPATH and JAVAHOME are
 mysterious right now.

Seems like your Java installation is broken and not finding
any the runtime jar file that contains java.lang.Object.

I don't have a good solution for this, I don't have a Linux machine in
front of me.

Under Solaris, Object.class can be found in: 

[EMAIL PROTECTED] 9% jar -tvf /opt/local/j2sdk1.4.1_02/jre/lib/rt.jar | grep 
java/lang/Object.class
  1428 Thu Feb 20 14:58:48 PST 2003 java/lang/Object.class
[EMAIL PROTECTED] 10% 

However, adding rt.jar to the classpath should not be necessary.

The way that I would proceed is to poke around on the
Sun tutorial and make sure that your JVM works

http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.htmld

Also, you should be able to start vergil by hand by including
lib/diva.jar 

Something like the following should work:

java -classpath ${PTII}:${PTII}/lib/diva.jar ptolemy.vergil.VergilApplication

 I am hoping that someone who uses java a bit more then I have over
 the last couple of years would consider helping me navigate this
 minefield a bit.

Yep, the classpath can be a bear.
 Charles
 
 At this point, I can navigate to /usr/src/ptII3.0.2/bin
 cfk [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Gentlemen:
   I downloaded the webstart and installed the ptolemyII 3.0.2
 application ion a RedHat8 system and am currently enjoying
 reading through the examples.  But, I am puzzled by a *real*
 newbie question. How do I get back to running the application
 when I exit it. At this point, I can see that it
 is running from a new .javaws directory and I can see http and
 lastAccessed in that directory. But what do I invoke to startup
 ptolemy when I exit and reboot the comptuer.

The Java Web Start Application Manager is a standalone application
that lists the Web Start applications that are available.

http://java.sun.com/j2se/1.4.2/docs/guide/jws/Readme.html#install

Under Windows, there is a standalone Java Web Start Application under
Start - All Programs - Java Web Start

Under Solaris (for me_, there is standalone Java Web Start Application zip
file installer at
/opt/local/j2sdk1.4.1_02/jre/javaws-1_2_0_02-solaris-sparc-i.zip

  For now, I'll leave it on for a few days until I figure it out.
 
  Guess everyone has to be a newbie at something on a regular
 basis in order to get anywhere.


-Christopher

Christopher Hylands Brooks [EMAIL PROTECTED]  University of California
Programmer/Analyst Chess/Ptolemy/GSRC US Mail: 558 Cory Hall #1770
ph: 510.643.9841 fax:510.642.2739 Berkeley, CA 94720-1770
home: (F-Tu) 707.665.0131 (W-F) 510.655.5480  (office: 400A Cory)



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


Re: help me on image filtering

2003-08-18 Thread Christopher Hylands Brooks
On 7/23, in comp.soft-sys.ptolemy, Paul.Shumacher wrote: 

Hi,

I am new to Ptolemy so please forgive me if this question has been
raised already.
I am interested in doing various operations on 2-D images/frames.  For
example, using a
1-D FIR filter to smooth or find edges.  I have tried the ImageSequence
actor followed
by MatrixToSequence or ImagePartition, but I get the following error:

Conversion is not supported from ptolemy.data.IntToken '3' to the type
[int].

I am using Ptolemy II 3.0.  Any suggestions?


Well, you could use the new JAIEdgeDetection actor to do this, 
there is a test at

http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII3.0/ptII3.0-beta/ptolemy/actor/lib/jai/demo/test/JAIEdgeDetection.xml

If you install Ptolemy II 3.0 under Windows with the built in
JRE, the Java Advanced Imaging API will be included in the JRE.
If you are building from source, you would need to install
the Java Advanced Imaging API and rerun configure
cd $PTII
rm config.*; ./configure
cd ptolemy/actor/lib/jai
make

If you start up Ptolemy II 3.0 and do File - Open URL
and cut and paste the above URL in, the model will open for you.
You will need to change the JAIImageReader fileOrURL path
to an image on your local disk.

When you run the image, edge detection will occur.


The actors you refer to are part of the Vector Quantization
actors in sdf/lib/vq.  These actors are somewhat special purpose, see
the sdf/demo/HTVQ/HTVQ.xml demo for an example use.

You should be able to create a model that has

ImageSequence  -  ImagePartition  -  ImageDisplay 

1. ImageSequence reads in a series of images and outputs 
IntMatrices.

If you use it, you may need to change the imageURLTemplate
from
/ptolemy/domains/sdf/lib/vq/data/seq/missa/missa***.qcf
to
ptolemy/domains/sdf/lib/vq/data/seq/missa/missa***.qcf
(I fixed this in the release and development trees)

2. ImagePartition reads in IntegerMatrices, not integers, so this could
be part of the problem in your example

Change the partitionColumns to 88 and
the partitionRows to 72 

3.  Add a SDFDirector and set the iterations to 100

When you run it, the ImageDisplay should pop up.
You may need to mouse on the ImageDisplay actor to get it to display
each frame.


I think the problem you were having with
ImageSequence - MatrixToSequence - ImagePartition
is that ImagePartition expects an IntMatrix, not a sequence of
Integers.

You could do
ImageSequence - 
 MatrixToSequence - Quantizer - Round
   -SequenceToMatrix - ImageDisplay

1. ImageSequence needs the imageURLTemplate adjusted as per above.
2. In MatrixToSequence and SequenceToMatrix, set the rows to 144
and the columns to 176
4. Change the Quantizer to {-1.0, 40.0} to Quantize the values

-Christopher

Christopher Hylands Brooks [EMAIL PROTECTED]  University of California
Programmer/Analyst Chess/Ptolemy/GSRC US Mail: 558 Cory Hall #1770
ph: 510.643.9841 fax:510.642.2739 Berkeley, CA 94720-1770
home: (F-Tu) 707.665.0131 (W-F) 510.655.5480  (office: 400A Cory)




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