ContentsIndexHome
PreviousUpNext
IAimmsMathProgramInfo::GetMatrixData Method

Get the matrix coefficients.

virtual _LONG_T GetMatrixData(
    _LONG_T is_update, 
    _LONG_T max_no, 
    _LONG_T row_no[], 
    _LONG_T col_no[], 
    double val[], 
    _LONG_T nl_flag[]
) = 0;
Parameters 
Description 
_LONG_T is_update 
An integer indicator for full (value 0) or update (value 1) retrieval. 
_LONG_T max_no 
The maximum number of non-zero matrix elements to retrieve. If this value is smaller than the total number of non-zero elements, the method must be called repeatedly. 
_LONG_T row_no[] 
Array with the row numbers of the matrix elements. Length must be at least max_no
_LONG_T col_no[] 
Array with the column numbers of the matrix elements. Length must be at least max_no
double val[] 
Array with the values of the matrix coefficients. Length must be at least max_no
_LONG_T nl_flag[] 
Array of nonlinearity indicators. Its length must be at least max_no. Value equals 0 if the matrix element is constant (i.e., depends linearly on the variable), and 1 if the matrix element depends nonlinearly on the variable. For LP and MIP solvers this argument must be NULL. 

The GetMatrixData method returns the actual number of matrix elements retrieved.

The GetMatrixData method is used to retrieve non-zero matrix elements from AIMMS. The matrix elements are retrieved in a row or column wise manner, depending on the value passed to the SetMatrixOrder method. In case of a full retrieval, this method returns a list of index-value pairs in ascending order. In case of an update retrieval, the retrievals will in general neither be ordered row nor column wise.

  1. Mixing of update and full retrievals in one solve is not allowed.
  2. In case the model is nonlinear, the values passed in val are the Jacobian values with respect to the initial level values passed to the solver via the GetColumnData method.
  3. If you have specified the capability flag SolverCapability::CAPAB_FORT_CONV in the GetInitialInfo method, then the row and column numbering will start at 1. Otherwise the C-style is used and numbering starts at 0.

Copyright © 1993–2016 by AIMMS B.V. All rights reserved.