[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### D.4.1 `glpk` input parameters

The argument must be a triple of the form, `(c,(m,y))`, subject to the following specification.

- c is a list of cost function coefficients as floating point numbers (see `math`). There should be one item of c for each variable in the linear programming problem (Note that there is no additive constant, which would require one extra).

  The interpretation of c is that an assignment of non-negative values to the variables x is sought to make the vector inner product c x as small as possible.

- m is a sparse matrix represented as a list of triples in the form

      <((i,j),a)...>

  where i and j are row and column indices as natural numbers starting from 0 and a is a non-zero floating point number. The presence of a triple `((i,j),a)` in the list indicates that the i,j-th entry in the matrix has a value of a. Missing combinations of i and j indicate that the corresponding entry is zero.

  The interpretation of m is that together with y it specifies a system of equations the variables in the solution x must satisfy simultaneously, as explained below.

- y is a list of floating point numbers, with one number for each distinct value of i in m, above, needed to complete the equations.

  The interpretation of y is that in matrix notation, the condition m x = y must be met by any acceptable solution x.

  To put it another way, for each distinct value of i, the i-th item of y has to equal the sum over all j of xj a, where a is the real number appearing in the triple `((i,j),a)` in m, if any, and xj is the j-th variable of the solution.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated on November 8, 2012 using texi2html 1.82.