GAMSX (GAMSX) API Documentation

Generated for GAMS 24.8.5

Functions, Procedures and Properties

Execute GAMS

gamsxSW(Set)
Show Window Option
gamsxRunExecDLL
Execute GAMS
gamsxShowError
Get Error strings

Debugging (Internal Use)

gamsxStepThrough(Set)
Step from line to line in debug mode
gamsxRunToEnd(Set)
Ignore break points and run to the end
gamsxCB1Defined
True if CB1 was set
gamsxCB2Defined
True if CB2 was set
gamsxAddBreakPoint
Add break point
gamsxClearBreakPoints
Remove all break points
gamsxSystemInfo
Get system counts
gamsxSymbolInfo
Get symbol information
gamsxUelName
Get unique element name
gamsxFindSymbol
Get symbol index
gamsxDataReadRawStart
Initialize reading of a symbol
gamsxDataReadRaw
Read next record
gamsxDataReadDone
Finish reading of a symbol
gamsxDataWriteRawStart
Initialize writing of a symbol
gamsxDataWriteRaw
Write next record
gamsxDataWriteDone
Finish writing of a symbol
gamsxRegisterCB1
Register callback function 1 executed at break point
gamsxRegisterCB2
Register callback function 2 executed at break point
gamsxGetCB1
Get address of callback function 1
gamsxGetCB2
Get address of callback function 2
gamsxGetCB1UM
Get pointer to user memory of callback function 1
gamsxGetCB2UM1
Get pointer to user memory 1 of callback function 2
gamsxGetCB2UM2
Get pointer to user memory 2 of callback function 2

Arguments

AVerbose
Verbosity level
CB1
Callback function 1
CB2
Callback function 2
DoMerge
True: merge into existing symbol, False: overwrite existing symbol
Elements
Index array of the record
errorLine
One line of log containing the error message
errorTyp
Compilation or execution error
FDim
First index position in Elements that changed
fn
Filename
fNameLog
Name of a log file
gmsLine
Line of gms file with error
lineNr
Original line number
Msg
Message
NrSy
Number of symbols
NrUel
Number of unique elements
optPtr
Pointer to option object
result
Return value
SyCount
Symbol: Number of records
SyDim
Symbol: Dimension
SyExplTxt
Symbol: Explanatory text
SyName
Symbol: Name
SyNr
Symbol: Number
sysDir
GAMS system directory
SyTyp
Symbol: Type
SyUserInfo
User field value
uel
Unique element index
userMem
Pointer to user memory
userMem1
Pointer to user memory
userMem2
Pointer to user memory
Vals
Data of the record

Calling Sequences

gamsxAddBreakPoint

  • Add break point
  • Procedure
  • Arguments:
    • const fn : ShortString
      Filename
      lineNr : Integer
      Original line number

gamsxCB1Defined

  • True if CB1 was set
  • Property of type Boolean
  • Actions
    • r

gamsxCB2Defined

  • True if CB2 was set
  • Property of type Boolean
  • Actions
    • r

gamsxClearBreakPoints

  • Remove all break points
  • Procedure

gamsxDataReadDone

  • Finish reading of a symbol
  • Function returns Integer

gamsxDataReadRaw

  • Read next record
  • Function returns Integer
  • Arguments:
    • var Elements : TgdxUELIndex
      Index array of the record
      var Vals : TgdxValues
      Data of the record
      var FDim : Integer
      First index position in Elements that changed

gamsxDataReadRawStart

  • Initialize reading of a symbol
  • Function returns Integer
  • Arguments:
    • SyNr : Integer
      Symbol: Number
      var SyCount : Integer
      Symbol: Number of records

gamsxDataWriteDone

  • Finish writing of a symbol
  • Function returns Integer

gamsxDataWriteRaw

  • Write next record
  • Function returns Integer
  • Arguments:
    • const Elements : TgdxUELIndex
      Index array of the record
      const Vals : TgdxValues
      Data of the record

gamsxDataWriteRawStart

  • Initialize writing of a symbol
  • Function returns Integer
  • Arguments:
    • SyNr : Integer
      Symbol: Number
      const DoMerge : Boolean
      True: merge into existing symbol, False: overwrite existing symbol

gamsxFindSymbol

  • Get symbol index
  • Function returns Integer
  • Arguments:
    • const SyName : ShortString
      Symbol: Name

gamsxGetCB1

  • Get address of callback function 1
  • Function returns

gamsxGetCB1UM

  • Get pointer to user memory of callback function 1
  • Function returns Pointer

gamsxGetCB2

  • Get address of callback function 2
  • Function returns

gamsxGetCB2UM1

  • Get pointer to user memory 1 of callback function 2
  • Function returns Pointer

gamsxGetCB2UM2

  • Get pointer to user memory 2 of callback function 2
  • Function returns Pointer

gamsxRegisterCB1

  • Register callback function 1 executed at break point
  • Procedure
  • Arguments:
    • CB1 : TBrkPCallBack1
      Callback function 1 Function(const fn:ShortString, linNr:Integer, lstNr:Integer, usrMem:Pointer) returns Integer
      userMem : Pointer
      Pointer to user memory

gamsxRegisterCB2

  • Register callback function 2 executed at break point
  • Procedure
  • Arguments:
    • CB2 : TBrkPCallBack2
      Callback function 2 Function(const fn:ShortString, linNr:Integer, lstNr:Integer, userMem1:Pointer, userMem2:Pointer) returns Integer
      userMem1 : Pointer
      Pointer to user memory
      userMem2 : Pointer
      Pointer to user memory

gamsxRunExecDLL

  • Execute GAMS
  • Function returns Integer
  • Arguments:
    • optPtr : Pointer
      Pointer to option object
      const sysDir : ShortString
      GAMS system directory
      AVerbose : Integer
      Verbosity level
      out Msg : ShortString
      Message

gamsxRunToEnd(Set)

  • Ignore break points and run to the end
  • Property of type Boolean
  • Actions
    • r
    • w

gamsxShowError

  • Get Error strings
  • Function returns Boolean
  • Arguments:
    • const fNameLog : ShortString
      Name of a log file
      out errorLine : ShortString
      One line of log containing the error message
      out errorTyp : ShortString
      Compilation or execution error
      out gmsLine : ShortString
      Line of gms file with error

gamsxStepThrough(Set)

  • Step from line to line in debug mode
  • Property of type Boolean
  • Actions
    • r
    • w

gamsxSW(Set)

  • Show Window Option
  • Property of type Integer
  • Actions
    • w

gamsxSymbolInfo

  • Get symbol information
  • Function returns Integer
  • Arguments:
    • SyNr : Integer
      Symbol: Number
      out SyName : ShortString
      Symbol: Name
      out SyExplTxt : ShortString
      Symbol: Explanatory text
      var SyDim : Integer
      Symbol: Dimension
      var SyTyp : Integer
      Symbol: Type
      var SyCount : Integer
      Symbol: Number of records
      var SyUserInfo: Integer
      User field value

gamsxSystemInfo

  • Get system counts
  • Function returns Integer
  • Arguments:
    • var NrSy : Integer
      Number of symbols
      var NrUel : Integer
      Number of unique elements

gamsxUelName

  • Get unique element name
  • Function returns ShortString
  • Arguments:
    • uel : Integer
      Unique element index