GAMS IDX API (IDX) Documentation

Generated for GAMS ..

Functions, Procedures, and Properties

 
Integer idxGetLastError
 Returns the last error number or 0 if there was no error. Calling this function will clear the last error stored.
 
void idxErrorStr
 Returns the text for a given error number. Always nonzero.
 
Integer idxOpenRead
 Open an existing gdx file for input. Nonzero if the file can be opened, 0 otherwise.
 
Integer idxOpenWrite
 Open a new gdx file for output. Nonzero if the file can be opened, 0 otherwise.
 
Integer idxClose
 Close a gdx file that was previously opened for reading or writing. Any pending write operations will be finished before closing
 
Integer idxGetSymCount
 Returns the number of indexed symbols in GDX
 
Integer idxGetSymbolInfo
 Get information for indexed symbols in GDX. Returns 1 on success, 0 on failure
 
Integer idxGetSymbolInfoByName
 Get information for indexed symbols in GDX.
 
Integer idxGetIndexBase
 the index base 0 or 1
 
Integer idxSetIndexBase
 Sets the index base 0 or 1.
 
Integer idxDataReadStart
 Initialize the reading of a symbol.
 
Integer idxDataRead
 Read the next record.
 
Integer idxDataReadDone
 Finish reading of a symbol.
 
Integer idxDataReadSparseColMajor
 Returns 1 for OK, 0 for error
 
Integer idxDataReadSparseRowMajor
 Returns 1 for OK, 0 for error
 
Integer idxDataReadDenseColMajor
 Returns 1 for OK, 0 for error
 
Integer idxDataReadDenseRowMajor
 Returns 1 for OK, 0 for error
 
Integer idxDataWriteStart
 Start writing a new symbol.
 
Integer idxDataWrite
 Write a data element in raw mode. 0 if the operation is not possible.
 
Integer idxDataWriteDone
 
 
Integer idxDataWriteSparseColMajor
 Returns 1 if OK, 0 if error
 
Integer idxDataWriteSparseRowMajor
 Returns 1 if OK, 0 if error
 
Integer idxDataWriteDenseColMajor
 Returns 1 for OK, 0 for error
 
Integer idxDataWriteDenseRowMajor
 Returns 1 for OK, 0 for error
 

Definitions

idxClose 

Close a gdx file that was previously opened for reading or writing. Any pending write operations will be finished before closing

Type
Function returns Integer

idxDataRead 

Read the next record.

Type
Function returns Integer
Returns
0 if the operation is not possible.
Parameters
  var  TgdxUELIndex    keys
  out  Double    val
  out  Integer    changeIdx

idxDataReadDenseColMajor 

Returns 1 for OK, 0 for error

Type
Function returns Integer
Parameters
   PDoubleArray    vals

idxDataReadDenseRowMajor 

Returns 1 for OK, 0 for error

Type
Function returns Integer
Parameters
   PDoubleArray    vals

idxDataReadDone 

Finish reading of a symbol.

Type
Function returns Integer
Returns
0 if the operation is not possible.

idxDataReadSparseColMajor 

Returns 1 for OK, 0 for error

Type
Function returns Integer
Parameters
   Integer    idxBase
   PLongIntArray    colPtr
   PLongIntArray    rowIdx
   PDoubleArray    vals

idxDataReadSparseRowMajor 

Returns 1 for OK, 0 for error

Type
Function returns Integer
Parameters
   Integer    idxBase
   PLongIntArray    rowPtr
   PLongIntArray    colIdx
   PDoubleArray    vals

idxDataReadStart 

Initialize the reading of a symbol.

Type
Function returns Integer
Returns
0 if the operation is not possible.
Parameters
  const  ShortString    symName
  out  Integer    symDim
  var  TgdxUELIndex    dims
  out  Integer    nRecs
  out  ShortString    ErrMsg
     Error text

idxDataWrite 

Write a data element in raw mode. 0 if the operation is not possible.

Type
Function returns Integer
Parameters
  const  TgdxUELIndex    keys
   Double    val

idxDataWriteDenseColMajor 

Returns 1 for OK, 0 for error

Type
Function returns Integer
Parameters
   Integer    dataDim
  const  PDoubleArray    vals

idxDataWriteDenseRowMajor 

Returns 1 for OK, 0 for error

Type
Function returns Integer
Parameters
   Integer    dataDim
  const  PDoubleArray    vals

idxDataWriteDone 

Type
Function returns Integer

idxDataWriteSparseColMajor 

Returns 1 if OK, 0 if error

Type
Function returns Integer
Parameters
  const  PLongIntArray    colPtr
  const  PLongIntArray    rowIdx
  const  PDoubleArray    vals

idxDataWriteSparseRowMajor 

Returns 1 if OK, 0 if error

Type
Function returns Integer
Parameters
  const  PLongIntArray    rowPtr
  const  PLongIntArray    colIdx
  const  PDoubleArray    vals

idxDataWriteStart 

Start writing a new symbol.

Type
Function returns Integer
Returns
0 if the operation is not possible.
Parameters
  const  ShortString    symName
  const  ShortString    explTxt
   Integer    symDim
  const  TgdxUELIndex    dims
  out  ShortString    ErrMsg
     Error text

idxErrorStr 

Returns the text for a given error number. Always nonzero.

Type
Procedure
Parameters
   Integer    ErrNr
     Error number (gdxErrorStr)/Error code or zero if there is no error
  out  ShortString    ErrMsg
     Error text

idxGetIndexBase 

the index base 0 or 1

Type
Function returns Integer

idxGetLastError 

Returns the last error number or 0 if there was no error. Calling this function will clear the last error stored.

Type
Function returns Integer

idxGetSymbolInfo 

Get information for indexed symbols in GDX. Returns 1 on success, 0 on failure

Type
Function returns Integer
Parameters
   Integer    iSym
  out  ShortString    symName
  out  Integer    symDim
  var  TgdxUELIndex    dims
  out  Integer    nNZ
  out  ShortString    explText
     Explanatory text for the symbol

idxGetSymbolInfoByName 

Get information for indexed symbols in GDX.

Type
Function returns Integer
Returns
1 on success, 0 on failure
Parameters
  const  ShortString    symName
  out  Integer    iSym
  out  Integer    symDim
  var  TgdxUELIndex    dims
  out  Integer    nNZ
  out  ShortString    explText
     Explanatory text for the symbol

idxGetSymCount 

Returns the number of indexed symbols in GDX

Type
Function returns Integer
Returns
1 on success, 0 on failure
Parameters
  out  Integer    symCount

idxOpenRead 

Open an existing gdx file for input. Nonzero if the file can be opened, 0 otherwise.

Type
Function returns Integer
Parameters
  const  ShortString    FileName
     File name of the gdx file to be opened
  out  Integer    ErrNr
     Error number (gdxErrorStr)/Error code or zero if there is no error

idxOpenWrite 

Open a new gdx file for output. Nonzero if the file can be opened, 0 otherwise.

Type
Function returns Integer
Parameters
  const  ShortString    FileName
     File name of the gdx file to be opened
  const  ShortString    Producer
     Name of program that appends to/creates the gdx file
  out  Integer    ErrNr
     Error number (gdxErrorStr)/Error code or zero if there is no error

idxSetIndexBase 

Sets the index base 0 or 1.

Type
Function returns Integer
Returns
1 on success, 0 on failure
Parameters
   Integer    idxBase