Loading...
Searching...
No Matches

GAMS Alias to Universe. More...

Inherits handle.

GAMS Alias to Universe.

This class represents a GAMS Alias to Universe.

Example:

c = Container();
u = UniverseAlias(c, 'u');
GAMS Transfer Container stores (multiple) symbols.
Definition: Container.m:104
GAMS Alias to Universe.
Definition: UniverseAlias.m:62
See also
Set, Container, Alias

Public Member Functions

function UniverseAlias (in container, in name)
 Constructs a GAMS Alias.
 
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 getUELs (in obj, in varargin)
 Returns the UELs used in all symbols.
 
function removeUELs (in obj, in varargin)
 Removes UELs from all symbols.
 
function renameUELs (in obj, in uels)
 Renames UELs in all symbols.
 
function lowerUELs (in obj)
 Converts UELs to lower case.
 
function upperUELs (in obj, in dim)
 Converts UELs to lower case.
 

Public Attributes

Property name
 Alias name.
 
Property modified
 Flag to indicate modification.
 

Private Attributes

Property alias_with
 Aliased GAMS Set.
 
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

◆ UniverseAlias()

function UniverseAlias ( in  container,
in  name 
)

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);
GAMS Alias.
Definition: Alias.m:66
GAMS Set.
Definition: Set.m:81
See also
Set, Container

Member Function Documentation

◆ 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.

◆ 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

◆ getUELs()

function getUELs ( in  obj,
in  varargin 
)

Returns the UELs used in all symbols.

See also
Container.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)

Converts UELs to lower case.

See also
Container.lowerUELs

◆ removeUELs()

function removeUELs ( in  obj,
in  varargin 
)

Removes UELs from all symbols.

See also
Container.removeUELs

◆ renameUELs()

function renameUELs ( in  obj,
in  uels 
)

Renames UELs in all symbols.

See also
Container.renameUELs

◆ upperUELs()

function upperUELs ( in  obj,
in  dim 
)

Converts UELs to lower case.

See also
Container.upperUELs

Member Data Documentation

◆ format

Property format
private

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.