Loading...
Searching...
No Matches

GAMS Variable Type. More...

GAMS Variable Type.

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

See also
Variable, symbol.Variable

Public Member Functions

function VariableType (in value)
 Constructs a Variable Type.
 

Static Public Member Functions

static function binary ()
 Constructs a Variable Type as BINARY.
 
static function integer ()
 Constructs a Variable Type as INTEGER.
 
static function positive ()
 Constructs a Variable Type as POSITIVE.
 
static function negative ()
 Constructs a Variable Type as NEGATIVE.
 
static function free ()
 Constructs a Variable Type as FREE.
 
static function sos1 ()
 Constructs a Variable Type as SOS1.
 
static function sos2 ()
 Constructs a Variable Type as SOS2.
 
static function semiCont ()
 Constructs a Variable Type as SEMICONT.
 
static function semiInt ()
 Constructs a Variable Type as SEMIINT.
 
static function values (in input)
 Converts input to Variable Type enumeration values.
 
static function selects (in input)
 Converts input to Variable Type enumeration labels (selections)
 

Public Attributes

Constant Property BINARY = uint8
 identifier for binary variable
 
Constant Property INTEGER = uint8
 identifier for integer variable
 
Constant Property POSITIVE = uint8
 identifier for positive variable
 
Constant Property NEGATIVE = uint8
 identifier for negative variable
 
Constant Property FREE = uint8
 identifier for free variable
 
Constant Property SOS1 = uint8
 identifier for SOS1 variable
 
Constant Property SOS2 = uint8
 SOS2 identifier for SOS2 variable.
 
Constant Property SEMICONT = uint8
 identifier for semi-continuous variable
 
Constant Property SEMIINT = uint8
 identifier for semi-integer variable
 
Property select
 Selection of enum option.
 
Property value
 Value of enum option.
 

Constructor & Destructor Documentation

◆ VariableType()

function VariableType ( in  value)

Constructs a Variable Type.

Optional Arguments:

  1. value (numeric or string) Enumeration value or label. Default: 5 (FREE).

Member Function Documentation

◆ selects()

static function selects ( in  input)
static

Converts input to Variable Type enumeration labels (selections)

Required Arguments:

  1. input (numeric, cell or string) Enumeration values or labels.

◆ values()

static function values ( in  input)
static

Converts input to Variable Type enumeration values.

Required Arguments:

  1. input (numeric, cell or string) Enumeration values or labels.