1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Some Useful Set and Get Methods</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="CLP User Guide"><link rel="up" href="ch02.html" title="Chapter 2. |
---|
2 | Basic Model Classes |
---|
3 | "><link rel="prev" href="ch02s05.html" title="Tolerances"><link rel="next" href="ch02s07.html" title=" |
---|
4 | Simplex-specific Methods |
---|
5 | "></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Some Useful Set and Get Methods</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s05.html">Prev</a> </td><th width="60%" align="center">Chapter 2. |
---|
6 | Basic Model Classes |
---|
7 | </th><td width="20%" align="right"> <a accesskey="n" href="ch02s07.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="setsandgets"></a>Some Useful Set and Get Methods</h2></div></div></div><div class="table"><a name="id4769146"></a><p class="title"><b>Table 2.2. Some Useful Set and Get Methods</b></p><table summary="Some Useful Set and Get Methods" border="0"><colgroup><col><col></colgroup><thead><tr><th> |
---|
8 | Method(s) |
---|
9 | </th><th> |
---|
10 | Description |
---|
11 | </th></tr></thead><tbody><tr><td align="left" valign="top"> |
---|
12 | <tt class="function">setMaximumIterations(int value)</tt><br> |
---|
13 | <tt class="function">int maximumIterations()</tt><br> |
---|
14 | <tt class="function">setMaximumSeconds(double value)</tt><br> |
---|
15 | <tt class="function">double maximumIterations()</tt> |
---|
16 | </td><td align="left" valign="top"> |
---|
17 | These methods tell CLP to stop after a given number of iterations or |
---|
18 | seconds (and returns these values). |
---|
19 | </td></tr><tr><td align="left" valign="top"> |
---|
20 | <tt class="function">double objectiveValue()</tt> |
---|
21 | </td><td align="left" valign="top"> |
---|
22 | This method returns the objective value. |
---|
23 | </td></tr><tr><td align="left" valign="top"> |
---|
24 | <tt class="function">const double * getObjCoefficients()</tt><br> |
---|
25 | <tt class="function">double * objective()</tt> |
---|
26 | </td><td align="left" valign="top"> |
---|
27 | These methods return the objective coefficients. |
---|
28 | </td></tr><tr><td align="left" valign="top"> |
---|
29 | <tt class="function">const double * getRowLower()</tt><br> |
---|
30 | <tt class="function">double * rowLower()</tt><br> |
---|
31 | <tt class="function">const double * getRowUpper()</tt><br> |
---|
32 | <tt class="function">double * rowUpper()</tt><br> |
---|
33 | <tt class="function">const double * getColLower()</tt><br> |
---|
34 | <tt class="function">double * columnLower()</tt><br> |
---|
35 | <tt class="function">const double * getColUpper()</tt><br> |
---|
36 | <tt class="function">double * columnUpper()</tt> |
---|
37 | </td><td align="left" valign="top"> |
---|
38 | These methods give lower and upper bounds on row and column activities. |
---|
39 | </td></tr><tr><td align="left" valign="top"> |
---|
40 | <tt class="function">double * infeasibilityRay()</tt><br> |
---|
41 | <tt class="function">double * unboundedRay()</tt> |
---|
42 | </td><td align="left" valign="top"> |
---|
43 | If the problem was primal or dual infeasible, these methods will give a |
---|
44 | pointer to a ray proving infeasibility. |
---|
45 | </td></tr><tr><td align="left" valign="top"> |
---|
46 | <tt class="function">CoinPackMatrix * matrix()</tt> |
---|
47 | </td><td align="left" valign="top"> |
---|
48 | There are more options as the user has great flexibility in how the problem |
---|
49 | matrix is stored, but the default matrix class is |
---|
50 | <tt class="classname">CoinPackedMatrix</tt> (see |
---|
51 | <a href="ch03s02.html" title="Matrix Classes">the section called “Matrix Classes”</a>). |
---|
52 | So we have that this method returns a pointer to a |
---|
53 | <tt class="classname">CoinPackedMatrix</tt> which can be further manipulated. |
---|
54 | </td></tr><tr><td align="left" valign="top"> |
---|
55 | <tt class="function">CoinBigIndex getNumElements()</tt> |
---|
56 | <sup>[<a name="id4769448" href="#ftn.id4769448">a</a>]</sup> |
---|
57 | </td><td align="left" valign="top"> |
---|
58 | Returns the number of elements in the problem matrix. |
---|
59 | </td></tr><tr><td align="left" valign="top"> |
---|
60 | <tt class="function">void setOptimizationDirection(double value)</tt><br> |
---|
61 | <tt class="function">double optimizationDirection()</tt> |
---|
62 | </td><td align="left" valign="top"> |
---|
63 | These methods set and get the objective sense. The parameter |
---|
64 | <i class="parameter"><tt>value</tt></i> should be +1 to minimize, -1 to maximize, |
---|
65 | and 0 to ignore. |
---|
66 | </td></tr></tbody><tbody class="footnotes"><tr><td colspan="2"><div class="footnote"><p><sup>[<a name="ftn.id4769448" href="#id4769448">a</a>] </sup> |
---|
67 | <span class="type">CoinBigIndex</span> is a <tt class="function">typedef</tt> which in |
---|
68 | most cases is the same as <span class="type">int</span>. |
---|
69 | </p></div></td></tr></tbody></table></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Tolerances </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> |
---|
70 | Simplex-specific Methods |
---|
71 | </td></tr></table></div></body></html> |
---|