Solver NOTES: Difference between revisions
Jump to navigation
Jump to search
Restored page from Google Cache, uploaded by John Pye |
No edit summary |
||
| Line 1: | Line 1: | ||
{{stub}} | |||
{{experimental}} | |||
Solver NOTES are a special kind of [[NOTES]] in ASCEND that allow you to specify parameters for use in the solver when running a particular model. This uses the [[ExtPy]] mechanism, which isn't yet considered stable. | Solver NOTES are a special kind of [[NOTES]] in ASCEND that allow you to specify parameters for use in the solver when running a particular model. This uses the [[ExtPy]] mechanism, which isn't yet considered stable. | ||
| Line 28: | Line 29: | ||
The above specifies that the preferred solver for the model <tt>mymodel</tt> is [[QRSlv]], then sets the <tt>iterationlimit</tt> and <tt>singtol</tt> parameters when using that solver. The external method, <tt>solvernotes</tt> must be <tt>[[IMPORT]]</tt>ed, and called using the <tt>[[EXTERNAL]]</tt> statement. | The above specifies that the preferred solver for the model <tt>mymodel</tt> is [[QRSlv]], then sets the <tt>iterationlimit</tt> and <tt>singtol</tt> parameters when using that solver. The external method, <tt>solvernotes</tt> must be <tt>[[IMPORT]]</tt>ed, and called using the <tt>[[EXTERNAL]]</tt> statement. | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
Revision as of 08:14, 29 March 2011
This page documents an experimental feature. Please tell us if you experience any problems.
Solver NOTES are a special kind of NOTES in ASCEND that allow you to specify parameters for use in the solver when running a particular model. This uses the ExtPy mechanism, which isn't yet considered stable.
To use solver notes, try
IMPORT "johnpye/solvernotes"; ADD NOTES IN mymodel; 'solver' name {QRSlv} 'QRSlv' iterationlimit {50} 'QRSlv' singtol {1e-10} END NOTES; MODEL mymodel; x, y IS_A solver_var; x = y^2; METHODS METHOD on_load; EXTERNAL solvernotes(SELF); END on_load; END mymodel;
The above specifies that the preferred solver for the model mymodel is QRSlv, then sets the iterationlimit and singtol parameters when using that solver. The external method, solvernotes must be IMPORTed, and called using the EXTERNAL statement.