Loading...
Searching...
No Matches

GAMS Alias. More...

Inherits handle.

GAMS Alias.

This class represents a GAMS Alias, which is a link to another GAMS Set.

Example:

c = Container();
s = Set(c, 's');
a = Alias(c, 'a', s);
GAMS Alias.
Definition: Alias.m:66
GAMS Transfer Container stores (multiple) symbols.
Definition: Container.m:104
GAMS Set.
Definition: Set.m:81
See also
Set, Container

Public Member Functions

function Alias (in container, in name, in alias_with)
 Constructs a GAMS Alias.
 
function setRecords (in obj, in varargin)
 Sets symbol records in supported format.
 
function transformRecords (in obj, in target_format)
 Transforms symbol records into given format.
 
function equals (in obj, in symbol)
 Checks equivalence with other symbol.
 
function copy (in obj, in varargin)
 Copies symbol to destination container.
 
function isValid (in obj, in varargin)
 Checks correctness of alias.
 
function getDomainViolations (in obj)
 Get domain violations.
 
function resolveDomainViolations (in obj)
 Extends domain sets in order to resolve domain violations.
 
function getSparsity (in obj)
 Returns the sparsity of symbol records.
 
function getMaxValue (in obj, in varargin)
 Returns the largest value in records.
 
function getMinValue (in obj, in varargin)
 Returns the smallest value in records.
 
function getMeanValue (in obj, in varargin)
 Returns the mean value over all values in records.
 
function getMaxAbsValue (in obj, in varargin)
 Returns the largest absolute value in records.
 
function countNA (in obj, in varargin)
 Returns the number of GAMS NA values in records.
 
function countUndef (in obj, in varargin)
 Returns the number of GAMS UNDEF values in records.
 
function countEps (in obj, in varargin)
 Returns the number of GAMS EPS values in records.
 
function countPosInf (in obj, in varargin)
 Returns the number of GAMS PINF (positive infinity) values in records.
 
function countNegInf (in obj, in varargin)
 Returns the number of GAMS MINF (negative infinity) values in records.
 
function getNumberRecords (in obj)
 Returns the number of GDX records (not available for matrix formats)
 
function getNumberValues (in obj, in varargin)
 Returns the number of values stored for this symbol.
 
function getUELs (in obj, in dim, in varargin)
 Returns the UELs used in this symbol.
 
function setUELs (in obj, in uels, in dim, in varargin)
 Sets the UELs with updating UEL codes in records.
 
function addUELs (in obj, in uels, in dim)
 Adds UELs to the symbol.
 
function removeUELs (in obj, in varargin)
 Removes UELs from the symbol.
 
function renameUELs (in obj, in uels, in dim)
 Renames UELs in the symbol.
 
function lowerUELs (in obj, in dim)
 Converts UELs to lower case.
 
function upperUELs (in obj, in dim)
 Converts UELs to lower case.
 

Public Attributes

Property name
 Alias name.
 
Property alias_with
 Aliased GAMS Set.
 
Property modified
 Flag to indicate modification.
 
Property description
 Aliased GAMS Set description.
 
Property is_singleton
 Indicator if aliased GAMS Set is singleton.
 
Property dimension
 Aliased GAMS Set dimension (in [0,20])
 
Property size
 Aliased GAMS Set Shape (length == dimension)
 
Property domain
 Aliased GAMS Set domain (length == dimension)
 
Property domain_names
 Aliased GAMS Set domain names.
 
Property domain_labels
 Expected domain labels in records.
 
Property domain_type
 Specifies if domains are stored 'relaxed' or 'regular'.
 
Property records
 Storage of aliased Set records.
 
Property format
 Records format.
 

Constructor & Destructor Documentation

◆ Alias()

function Alias ( in  container,
in  name,
in  alias_with 
)

Constructs a GAMS Alias.

See Creating a Symbol for more information.

Required Arguments:

  1. container (Container): Container object this symbol should be stored in
  2. name (string): name of alias
  3. alias_with (Set or Alias): GAMS Set to be linked to

Example:

c = Container();
s = Set(c, 's');
a = Alias(c, 'a', s);
See also
Set, Container

Member Function Documentation

◆ addUELs()

function addUELs ( in  obj,
in  uels,
in  dim 
)

Adds UELs to the symbol.

See also
Symbol.addUELs

◆ copy()

function copy ( in  obj,
in  varargin 
)

Copies symbol to destination container.

If destination container does not have a symbol equal to the aliased symbol, an error is raised.

Required Arguments:

  1. destination (Container): Destination container

Optional Arguments:

  1. overwrite (bool): Overwrites symbol with same name in destination if true. Default: false.

◆ countEps()

function countEps ( in  obj,
in  varargin 
)

Returns the number of GAMS EPS values in records.

See also
Symbol.countEps

◆ countNA()

function countNA ( in  obj,
in  varargin 
)

Returns the number of GAMS NA values in records.

See also
Symbol.countNA

◆ countNegInf()

function countNegInf ( in  obj,
in  varargin 
)

Returns the number of GAMS MINF (negative infinity) values in records.

See also
Symbol.countNegInf

◆ countPosInf()

function countPosInf ( in  obj,
in  varargin 
)

Returns the number of GAMS PINF (positive infinity) values in records.

See also
Symbol.countPosInf

◆ countUndef()

function countUndef ( in  obj,
in  varargin 
)

Returns the number of GAMS UNDEF values in records.

See also
Symbol.countUndef

◆ equals()

function equals ( in  obj,
in  symbol 
)

Checks equivalence with other symbol.

Note
A symbol is always linked to a container. This method does not check equivalence of the linked containers.

Required Arguments:

  1. symbol (any): Other symbol

◆ getDomainViolations()

function getDomainViolations ( in  obj)

Get domain violations.

See also
Symbol.getDomainViolations

◆ getMaxAbsValue()

function getMaxAbsValue ( in  obj,
in  varargin 
)

Returns the largest absolute value in records.

See also
Symbol.getMaxAbsValue

◆ getMaxValue()

function getMaxValue ( in  obj,
in  varargin 
)

Returns the largest value in records.

See also
Symbol.getMaxValue

◆ getMeanValue()

function getMeanValue ( in  obj,
in  varargin 
)

Returns the mean value over all values in records.

See also
Symbol.getMeanValue

◆ getMinValue()

function getMinValue ( in  obj,
in  varargin 
)

Returns the smallest value in records.

See also
Symbol.getMinValue

◆ getNumberRecords()

function getNumberRecords ( in  obj)

Returns the number of GDX records (not available for matrix formats)

See also
Symbol.getNumberRecords

◆ getNumberValues()

function getNumberValues ( in  obj,
in  varargin 
)

Returns the number of values stored for this symbol.

See also
Symbol.getNumberValues

◆ getSparsity()

function getSparsity ( in  obj)

Returns the sparsity of symbol records.

See also
Symbol.getSparsity

◆ getUELs()

function getUELs ( in  obj,
in  dim,
in  varargin 
)

Returns the UELs used in this symbol.

See also
Symbol.getUELs

◆ isValid()

function isValid ( in  obj,
in  varargin 
)

Checks correctness of alias.

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)

◆ lowerUELs()

function lowerUELs ( in  obj,
in  dim 
)

Converts UELs to lower case.

See also
Symbol.lowerUELs

◆ removeUELs()

function removeUELs ( in  obj,
in  varargin 
)

Removes UELs from the symbol.

See also
Symbol.removeUELs

◆ renameUELs()

function renameUELs ( in  obj,
in  uels,
in  dim 
)

Renames UELs in the symbol.

See also
Symbol.renameUELs

◆ resolveDomainViolations()

function resolveDomainViolations ( in  obj)

Extends domain sets in order to resolve domain violations.

See also
Symbol.resolveDomainViolations

◆ setRecords()

function setRecords ( in  obj,
in  varargin 
)

Sets symbol records in supported format.

See also
Symbol.setRecords

◆ setUELs()

function setUELs ( in  obj,
in  uels,
in  dim,
in  varargin 
)

Sets the UELs with updating UEL codes in records.

See also
Symbol.setUELs

◆ transformRecords()

function transformRecords ( in  obj,
in  target_format 
)

Transforms symbol records into given format.

See also
Symbol.transformRecords

◆ upperUELs()

function upperUELs ( in  obj,
in  dim 
)

Converts UELs to lower case.

See also
Symbol.upperUELs

Member Data Documentation

◆ format

Property format

Records format.

If records are changed, this gets reset to RecordsFormat.UNKNOWN. Calling Alias.isValid will detect the format again.

◆ modified

Property modified

Flag to indicate modification.

If the symbol has been modified since last reset of flag (false), this flag will be true.