lpsolve-calling-conventions.html 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <html lang="en">
  2. <head>
  3. <title>lpsolve calling conventions - 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="lpsolve.html#lpsolve" title="lpsolve">
  9. <link rel="prev" href="lpsolve.html#lpsolve" title="lpsolve">
  10. <link rel="next" href="lpsolve-return-values.html#lpsolve-return-values" title="lpsolve return values">
  11. <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
  12. <meta http-equiv="Content-Style-Type" content="text/css">
  13. <style type="text/css"><!--
  14. pre.display { font-family:inherit }
  15. pre.format { font-family:inherit }
  16. pre.smalldisplay { font-family:inherit; font-size:smaller }
  17. pre.smallformat { font-family:inherit; font-size:smaller }
  18. pre.smallexample { font-size:smaller }
  19. pre.smalllisp { font-size:smaller }
  20. span.sc { font-variant:small-caps }
  21. span.roman { font-family:serif; font-weight:normal; }
  22. span.sansserif { font-family:sans-serif; font-weight:normal; }
  23. --></style>
  24. </head>
  25. <body>
  26. <div class="node">
  27. <a name="lpsolve-calling-conventions"></a>
  28. <p>
  29. Next:&nbsp;<a rel="next" accesskey="n" href="lpsolve-return-values.html#lpsolve-return-values">lpsolve return values</a>,
  30. Previous:&nbsp;<a rel="previous" accesskey="p" href="lpsolve.html#lpsolve">lpsolve</a>,
  31. Up:&nbsp;<a rel="up" accesskey="u" href="lpsolve.html#lpsolve">lpsolve</a>
  32. <hr>
  33. </div>
  34. <h4 class="subsection">D.15.1 <code>lpsolve</code> calling conventions</h4>
  35. <p>The library is able to solve linear and mixed integer programming
  36. problems, depending on which function is selected. The
  37. <a name="index-linear-programming-804"></a>function to call the linear programming solver is of the form
  38. <ul>
  39. <li><code>library('lpsolve','stdform')</code>
  40. </ul>
  41. <p class="noindent"><a name="index-mixed-integer-programming-805"></a>and the mixed integer programming functions are of the form
  42. <ul>
  43. <li><code>library('lpsolve','iform')</code>
  44. <li><code>library('lpsolve','bform')</code>
  45. <li><code>library('lpsolve','biform')</code>
  46. </ul>
  47. <p class="noindent">The argument to the <code>stdform</code> function represents a triple
  48. <code>(</code><var>c</var><code>,(</code><var>m</var><code>,</code><var>y</var><code>))</code>, which has the same interpretation
  49. described in <a href="glpk-input-parameters.html#glpk-input-parameters">glpk input parameters</a>. The arguments to the <code>iform</code>,
  50. <code>bform</code>, and <code>biform</code> functions are tuples
  51. <code>(</code><var>i</var><code>,(</code><var>c</var><code>,(</code><var>m</var><code>,</code><var>y</var><code>)))</code>
  52. <code>(</code><var>b</var><code>,(</code><var>c</var><code>,(</code><var>m</var><code>,</code><var>y</var><code>)))</code>, and
  53. <code>((</code><var>b</var><code>,</code><var>i</var><code>),(</code><var>c</var><code>,(</code><var>m</var><code>,</code><var>y</var><code>)))</code>, respectively, where
  54. <var>c</var>, <var>m</var>, and <var>y</var> are as above, and
  55. <ul>
  56. <li><var>b</var> is a list of binary variable column indices
  57. <li><var>i</var> is a list of integer variable column indices
  58. </ul>
  59. <p class="noindent">where column indices pertain to the constraint matrix, and are
  60. numbered from zero. Specifying some or all variables as integers
  61. directs the solver to seek only solutions in which those variables
  62. have integer values, and specifying any as binary directs the solver
  63. to seek only solutions in which those variables have values of zero or
  64. one. The IEEE floating point representation is used for all variables
  65. regardless (<a href="math.html#math">math</a>).
  66. </body></html>