Container base (only use subclasses) More...

Inheritance diagram for BaseContainer:
ConstContainer Container

Container base (only use subclasses)

Public Member Functions

function BaseContainer (in gams_dir, in indexed, in features)
 Constructs a GAMSTransfer BaseContainer.
 
function hasSymbols (in obj, in names)
 Checks if symbol exists in container (case insensitive) More...
 
function getSymbolNames (in obj, in names)
 Get symbol names by names (case insensitive) More...
 
function listSymbols (in obj, in varargin)
 Lists all symbols in container. More...
 
function listSets (in obj, in varargin)
 Lists all sets in container. More...
 
function listParameters (in obj, in varargin)
 Lists all parameters in container. More...
 
function listVariables (in obj, in varargin)
 Lists all variables in container. More...
 
function listEquations (in obj, in varargin)
 Lists all equations in container. More...
 
function listAliases (in obj, in varargin)
 Lists all aliases in container. More...
 
function describeSets (in obj, in varargin)
 Returns an overview over all sets in container. More...
 
function describeParameters (in obj, in varargin)
 Returns an overview over all parameters in container. More...
 
function describeVariables (in obj, in varargin)
 Returns an overview over all variables in container. More...
 
function describeEquations (in obj, in varargin)
 Returns an overview over all equations in container. More...
 
function describeAliases (in obj, in varargin)
 Returns an overview over all aliases in container. More...
 
function isValid (in obj, in varargin)
 Checks correctness of all symbols. More...
 

Protected Attributes

Property gams_dir
 GAMS system directory.
 
Property indexed
 Flag for indexed mode.
 
Property data
 GAMS (GDX) symbols.
 

Member Function Documentation

◆ describeAliases()

function describeAliases ( in  obj,
in  varargin 
)

Returns an overview over all aliases in container.

See Symbol Overview for more information.

Optional Arguments:

  1. symbols (cellstr): List of symbols to include. Default: listAliases().

The overview is in form of a table listing for each symbol its main characteristics and some statistics.

◆ describeEquations()

function describeEquations ( in  obj,
in  varargin 
)

Returns an overview over all equations in container.

See Symbol Overview for more information.

Optional Arguments:

  1. symbols (cellstr): List of symbols to include. Default: listEquations().

The overview is in form of a table listing for each symbol its main characteristics and some statistics.

◆ describeParameters()

function describeParameters ( in  obj,
in  varargin 
)

Returns an overview over all parameters in container.

See Symbol Overview for more information.

Optional Arguments:

  1. symbols (cellstr): List of symbols to include. Default: listParameters().

The overview is in form of a table listing for each symbol its main characteristics and some statistics.

◆ describeSets()

function describeSets ( in  obj,
in  varargin 
)

Returns an overview over all sets in container.

See Symbol Overview for more information.

Note
This method includes set aliases.

Optional Arguments:

  1. symbols (cellstr): List of symbols to include. Default: listSets().

The overview is in form of a table listing for each symbol its main characteristics and some statistics.

◆ describeVariables()

function describeVariables ( in  obj,
in  varargin 
)

Returns an overview over all variables in container.

See Symbol Overview for more information.

Optional Arguments:

  1. symbols (cellstr): List of symbols to include. Default: listVariables().

The overview is in form of a table listing for each symbol its main characteristics and some statistics.

◆ getSymbolNames()

function getSymbolNames ( in  obj,
in  names 
)

Get symbol names by names (case insensitive)

  • s = c.getSymbolNames(a) returns GAMS symbol names named a where a may have different casing.
  • s = c.getSymbolNames(b) returns a list GAMS symbol names where names equal b case insensitively.

Example:

v1 = c.getSymbolNames('v1'); % equals c.getSymbolNames('V1');

◆ hasSymbols()

function hasSymbols ( in  obj,
in  names 
)

Checks if symbol exists in container (case insensitive)

  • s = c.hasSymbols(a) returns true if GAMS symbol named a (case does not matter) exists. false otherwise.
  • s = c.hasSymbols(b) returns a list of bools where an entry s{i} is true if GAMS symbol named b{i} (case does not matter) exists. false otherwise.

◆ isValid()

function isValid ( in  obj,
in  varargin 
)

Checks correctness of all symbols.

See Validate Symbol Records for more information.

Optional Arguments:

  1. verbose (logical): If true, the reason for an invalid symbol is printed
  2. force (logical): If true, forces reevaluation of validity (resets cache)
See also
Symbol.isValid

◆ listAliases()

function listAliases ( in  obj,
in  varargin 
)

Lists all aliases in container.

Parameter Arguments:

  • is_valid (logical or any): Enable valid filter if argument is of type logical. If true, only include symbols that are valid and, if false, only invalid symbols. Default: not logical.
See also
BaseContainer.listSymbols, BaseContainer.listSets, BaseContainer.listParameters, BaseContainer.listVariables, BaseContainer.listEquations

◆ listEquations()

function listEquations ( in  obj,
in  varargin 
)

Lists all equations in container.

Parameter Arguments:

  • is_valid (logical or any): Enable valid filter if argument is of type logical. If true, only include symbols that are valid and, if false, only invalid symbols. Default: not logical.
  • types (any): Enable filter for equation type, e.g. type = {"g", "l"}. Default: not applied.
See also
BaseContainer.listSymbols, BaseContainer.listSets, BaseContainer.listParameters, BaseContainer.listVariables, BaseContainer.listAliases

◆ listParameters()

function listParameters ( in  obj,
in  varargin 
)

Lists all parameters in container.

Parameter Arguments:

  • is_valid (logical or any): Enable valid filter if argument is of type logical. If true, only include symbols that are valid and, if false, only invalid symbols. Default: not logical.
See also
BaseContainer.listSymbols, BaseContainer.listSets, BaseContainer.listVariables, BaseContainer.listEquations, BaseContainer.listAliases

◆ listSets()

function listSets ( in  obj,
in  varargin 
)

Lists all sets in container.

Parameter Arguments:

  • is_valid (logical or any): Enable valid filter if argument is of type logical. If true, only include symbols that are valid and, if false, only invalid symbols. Default: not logical.
See also
BaseContainer.listSymbols, BaseContainer.listParameters, BaseContainer.listVariables, BaseContainer.listEquations, BaseContainer.listAliases

◆ listSymbols()

function listSymbols ( in  obj,
in  varargin 
)

Lists all symbols in container.

Parameter Arguments:

  • is_valid (logical or any): Enable valid filter if argument is of type logical. If true, only include symbols that are valid and, if false, only invalid symbols. Default: not logical.
See also
BaseContainer.listSets, BaseContainer.listParameters, BaseContainer.listVariables, BaseContainer.listEquations, BaseContainer.listAliases

◆ listVariables()

function listVariables ( in  obj,
in  varargin 
)

Lists all variables in container.

Parameter Arguments:

  • is_valid (logical or any): Enable valid filter if argument is of type logical. If true, only include symbols that are valid and, if false, only invalid symbols. Default: not logical.
  • types (any): Enable filter for variable type, e.g. type = {"binary", "integer"}. Default: not applied.
See also
BaseContainer.listSymbols, BaseContainer.listSets, BaseContainer.listParameters, BaseContainer.listEquations, BaseContainer.listAliases