Yes, let's make this change. Thanks. Edward
On 8/8/12 4:45 PM, Christopher Brooks wrote:
On 8/4/12 10:53 AM, Edward A. Lee wrote:Jennifer suggests changing the default iterations count of the SDF director from 0 to 1. I think this is a good idea, but we should then change all the demos that use the default. Any idea how to find them? These would be demos with an SDFDirector that do _not_ set the iterations parameter.Edward, I hacked up an awk script that attempts to insert the iterations parameter if it is not set in SDFDirector or any of the derived classes. The body of the script looks like:awk '{ if ($0 ~ /SDFDirector"/ || $0 ~/DTDirector"/ || $0 ~ /HDFDirector"/ || $0 ~ /PthalesDirector"/) { sawSDFDirector=1 split($0, indent, "<") closer= indent[1] "</property>" } if (sawSDFDirector == 1) { if ($0 ~ /<property name="iterations"/) { sawIterations=1 } if ($0 == closer) { if (sawIterations == 0) { print indent[1] " <property name=\"iterations\" class=\"ptolemy.data.expr.Parameter\" value=\"0\">" print indent[1] " </property>" } sawSDFDirector=0 sawIterations=0 } } print $0 }' $fileBasically, it looks for SDFDirector or its subclasses and the inserts the iterations parameter if it is not already set. I ran the tests and while there are a number of failures, it is not looking so bad. Shall I check in the changed .xml files? Note that there is an open Kepler bug: " SDF director iterations parameter default of 0 is unfriendly" http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5546 This change will requires updating documentation in both Ptolemy II and Kepler. _Christopher -- Christopher Brooks, PMP University of California CHESS Executive Director US Mail: 337 Cory Hall Programmer/Analyst CHESS/Ptolemy/Trust Berkeley, CA 94720-1774 ph: 510.643.9841 (Office: 545Q Cory) home: (F-Tu) 707.665.0131 cell: 707.332.0670
<<attachment: eal.vcf>>
_______________________________________________ Kepler-dev mailing list [email protected] http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
