Additional-kinsol-notes.html 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <html lang="en">
  2. <head>
  3. <title>Additional kinsol notes - avram - a virtual machine code interpreter</title>
  4. <meta http-equiv="Content-Type" content="text/html">
  5. <meta name="description" content="avram - a virtual machine code interpreter">
  6. <meta name="generator" content="makeinfo 4.13">
  7. <link title="Top" rel="start" href="index.html#Top">
  8. <link rel="up" href="kinsol.html#kinsol" title="kinsol">
  9. <link rel="prev" href="kinsol-exceptions.html#kinsol-exceptions" title="kinsol exceptions">
  10. <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
  11. <meta http-equiv="Content-Style-Type" content="text/css">
  12. <style type="text/css"><!--
  13. pre.display { font-family:inherit }
  14. pre.format { font-family:inherit }
  15. pre.smalldisplay { font-family:inherit; font-size:smaller }
  16. pre.smallformat { font-family:inherit; font-size:smaller }
  17. pre.smallexample { font-size:smaller }
  18. pre.smalllisp { font-size:smaller }
  19. span.sc { font-variant:small-caps }
  20. span.roman { font-family:serif; font-weight:normal; }
  21. span.sansserif { font-family:sans-serif; font-weight:normal; }
  22. --></style>
  23. </head>
  24. <body>
  25. <div class="node">
  26. <a name="Additional-kinsol-notes"></a>
  27. <p>
  28. Previous:&nbsp;<a rel="previous" accesskey="p" href="kinsol-exceptions.html#kinsol-exceptions">kinsol exceptions</a>,
  29. Up:&nbsp;<a rel="up" accesskey="u" href="kinsol.html#kinsol">kinsol</a>
  30. <hr>
  31. </div>
  32. <h4 class="subsection">D.9.4 Additional <code>kinsol</code> notes</h4>
  33. <p>When a user supplied Jacobian function <var>j</var> is specified, the
  34. <a name="index-Jacobian-745"></a>solution is likely to be found faster and more accurately. The
  35. Jacobian should be given if an analytical form for <var>f</var> is known,
  36. from which the Jacobian can be obtained easily by partial
  37. differentiation. If the Jacobian is unavailable, a finite difference
  38. method implemented internally by <code>kinsol</code> is used as a substitute
  39. and will usually yield acceptable results.
  40. <p>Tolerances are not explicitly specified on the virtual side of the
  41. interface although the native <code>kinsol</code> API requires them. A range
  42. of tolerances over ten orders of magnitude is automatically tried
  43. before giving up.
  44. <p>Similarly to the <code>glpk</code> and <code>lpsolve</code> library interfaces
  45. (<a href="glpk.html#glpk">glpk</a> and <a href="lpsolve.html#lpsolve">lpsolve</a>), the only expressible constraint through
  46. <a name="index-constraints-746"></a>the virtual code interface is that all variables are
  47. non-negative. Arbitrary upper and lower bounds can be simulated by
  48. appropriate variable substitutions in the formulation of the problem.
  49. <p>The <code>kinsol</code> library natively requires a system function <var>f</var>
  50. with equally many inputs as outputs, and will search only for the
  51. input associated with an output vector of all zeros, but the virtual
  52. code interface relaxes these requirements by allowing a function that
  53. transforms between lists of unequal lengths, and will search for the
  54. input of <var>f</var> causing it to match any given &ldquo;optimal&rdquo; output
  55. <var>o</var>. These effects are achieved by padding the shorter of the two
  56. vectors transparently and subtracting the specified optimum from the
  57. result.
  58. <p>The <code>kinsol</code> library can be configured to use single precision,
  59. double precision, or extended precision arithmetic, but only a double
  60. precision configuration is compatible with <code>avram</code>. This
  61. condition is checked when <code>avram</code> is configured and it will not
  62. interface with alternative <code>kinsol</code> configurations.
  63. <p>The <code>kinsol</code> library has some more advanced features to which
  64. this interface doesn't do justice, such as preconditioning, scaling,
  65. solution of systems with band limited Jacobians, and concurrent
  66. computation.
  67. </body></html>