Loading...
Searching...
No Matches

GAMS Transfer Symbol Types. More...

GAMS Transfer Symbol Types.

This class holds the possible GAMS Transfer symbol types similar to an enumeration class. Note that it is not an enumeration class due to compatibility (e.g. for Octave).

Static Public Member Functions

static function int2str (in value_int)
 Converts a symbol type identifier to string.
 
static function str2int (in value_str)
 Converts a symbol type name to an identifier.
 
static function isValid (in value)
 Checks if a symbol type name or identifier is valid.
 

Public Attributes

Constant Property SET = 0
 GAMS Set.
 
Constant Property PARAMETER = 1
 GAMS Parameter.
 
Constant Property VARIABLE = 2
 GAMS Variable.
 
Constant Property EQUATION = 3
 GAMS Equation.
 
Constant Property ALIAS = 4
 GAMS Alias.
 

Member Function Documentation

◆ int2str()

static function int2str ( in  value_int)
static

Converts a symbol type identifier to string.

  • s = SymbolType.int2str(i) returns a string with the symbol type name for the given symbol type identifier i. If i is an invalid identifier, this function raises an error.

Example:

GAMS Transfer Symbol Types.
Definition: SymbolType.m:44
static function int2str(in value_int)
Converts a symbol type identifier to string.
Constant Property SET
GAMS Set.
Definition: SymbolType.m:52

s equals "set"

◆ isValid()

static function isValid ( in  value)
static

Checks if a symbol type name or identifier is valid.

  • b = SymbolType.isValid(s) returns true if s is a valid symbol type name or variable type identifier and false otherwise.

Example:

SymbolType.isValid('set') is true
SymbolType.isValid('not_a_valid_name') is false
static function isValid(in value)
Checks if a symbol type name or identifier is valid.

◆ str2int()

static function str2int ( in  value_str)
static

Converts a symbol type name to an identifier.

  • i = SymbolType.str2int(s) returns an integer identifier for the given symbol type name s. If s is an invalid type name, this function raises an error.

Example:

i = SymbolType.str2int('set')
static function str2int(in value_str)
Converts a symbol type name to an identifier.

i equals SymbolType.SET