Skip to content

Commit eb5011f

Browse files
committed
Make analog function output variables have correct dependency
In my other commits on this branch, I modified adms.implicit.xml to propagate probe and variable dependencies from analog function argument lists into output variables (other than the return value, which was already handled correctly). In doing so, I had neglected setting the "dependency" element of the ADMS data tree on those variables, and so they were incorrectly being set to "constant". This led to the incorrect setting downstream of the OPdependent element as well. This commit correctly sets "dependency", and therefore OPdependent (which is set later by probing "dependency"). #67
1 parent ed6cac8 commit eb5011f

File tree

2 files changed

+873
-0
lines changed

2 files changed

+873
-0
lines changed

admsXml/adms.implicit.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,20 @@
192192
format="%(function/name) output arg $position is %(.), must be a variable\n"/>
193193
<admst:push into="$function/arguments[position(.)=$position]/probe" select="$function/@probe" onduplicate="ignore"/>
194194
<admst:push into="$function/arguments[position(.)=$position]/variable" select="$function/@variable" onduplicate="ignore"/>
195+
<admst:choose>
196+
<admst:when test="$function/arguments/dependency[.='linear' or .='nonlinear']">
197+
<admst:value-to select="$function/arguments[position(.)=$position]/dependency" string="nonlinear"/>
198+
<admst:value-to select="$function/arguments[position(.)=$position]/prototype/dependency" string="nonlinear"/>
199+
</admst:when>
200+
<admst:when test="$function/arguments/dependency[.='noprobe']">
201+
<admst:value-to select="$function/arguments[position(.)=$position]/dependency" string="noprobe"/>
202+
<admst:value-to select="$function/arguments[position(.)=$position]/prototype/dependency" string="noprobe"/>
203+
</admst:when>
204+
<admst:otherwise>
205+
<admst:value-to select="$function/arguments[position(.)=$position]/dependency" string="constant"/>
206+
<admst:value-to select="$function/arguments[position(.)=$position]/prototype/dependency" string="constant"/>
207+
</admst:otherwise>
208+
</admst:choose>
195209
<admst:choose>
196210
<admst:when test="[$globalpartitionning='initial_model']">
197211
<admst:value-to select="$function/arguments[position(.)=$position]/setinmodel" string="yes"/>

0 commit comments

Comments
 (0)