Public Member Functions |
Static Public Member Functions |
Public Attributes |
Private Attributes |
List of all members
Set Class Reference
GAMS Set. More...
Inheritance diagram for Set:
GAMS Set.
Represents a GAMS Set.
Example:
c = Container();
s1 = symbol.Set.construct(c, 's1');
s2 = symbol.Set.construct(c, 's2', {s1, '*', '*'});
s3 = symbol.Set.construct(c, 's3', '*', 'records', {'e1', 'e2', 'e3'}, 'description', 'set s3');
GAMS Transfer Container stores (multiple) symbols.
Definition: Container.m:67
- See also
- Set, Container.addSet
Public Member Functions | |
function | copy (in obj, in varargin) |
Copies symbol to destination container. | |
Public Member Functions inherited from Abstract | |
function | copy (in obj, in varargin) |
(Abstract) Copies symbol to destination container | |
function | equals (in obj, in symbol) |
Checks equivalence with other symbol. | |
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 | isValid (in obj, in varargin) |
Checks correctness of symbol. | |
function | getDomainViolations (in obj, in varargin) |
Get domain violations. | |
function | resolveDomainViolations (in obj, in varargin) |
Extends domain sets in order to resolve domain violations. | |
function | getSparsity (in obj) |
Returns the sparsity of symbol records. | |
function | countDuplicateRecords (in obj) |
Counts duplicate records. | |
function | findDuplicateRecords (in obj, in varargin) |
Finds duplicate records. | |
function | hasDuplicateRecords (in obj) |
Checks if duplicate records exist. | |
function | dropDuplicateRecords (in obj, in varargin) |
Drops duplicate records. | |
function | countDomainViolations (in obj) |
Counts domain violations. | |
function | findDomainViolations (in obj) |
Counts domain violations. | |
function | hasDomainViolations (in obj) |
Checks if duplicate records exist. | |
function | dropDomainViolations (in obj) |
Drops duplicate records in symbols. | |
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 | dropDefaults (in obj, in varargin) |
Drops default values from records. | |
function | dropNA (in obj, in varargin) |
Drops NA values from records. | |
function | dropUndef (in obj, in varargin) |
Drops Undef values from records. | |
function | dropMissing (in obj, in varargin) |
Drops NaN (includes NA and Undef) values from records. | |
function | dropEps (in obj, in varargin) |
Drops Eps values from records. | |
function | getUELs (in obj, in varargin) |
Returns the UELs used in this symbol. | |
function | setUELs (in obj, in varargin) |
Sets UELs. | |
function | reorderUELs (in obj, in varargin) |
Reorders UELs. | |
function | addUELs (in obj, in varargin) |
Adds UELs to the symbol. | |
function | removeUELs (in obj, in varargin) |
Removes UELs from the symbol. | |
function | renameUELs (in obj, in varargin) |
Renames UELs in the symbol. | |
function | lowerUELs (in obj, in varargin) |
Converts UELs to lower case. | |
function | upperUELs (in obj, in varargin) |
Converts UELs to upper case. | |
Static Public Member Functions | |
static function | construct (in varargin) |
Constructs a GAMS Set. | |
static function | describe (in symbols) |
Returns an overview over all sets given. | |
Public Attributes | |
Property | is_singleton |
indicator if Set is is_singleton | |
Public Attributes inherited from Abstract | |
Property | container |
Container the symbol is stored in. | |
Property | name |
Symbol name. | |
Property | description |
Symbol description. | |
Property | dimension |
Dimension of symbol (in [0,20]) | |
Property | size |
Shape of symbol (length == dimension) | |
Property | domain |
Domain of symbol (length == dimension) | |
Property | domain_labels |
Domain labels in records. | |
Property | domain_forwarding |
Enables domain entries in records to be recursively added to the domains in case they are not present in the domains already. | |
Property | records |
Storage of symbol records. | |
Property | format |
Format in which records are stored in. | |
Property | modified |
Flag to indicate modification. | |
Private Attributes | |
Property | indexed |
Flag if symbol can be used in indexed mode. | |
Member Function Documentation
◆ construct()
|
static |
Constructs a GAMS Set.
Required Arguments:
- container (
Container
): Container object this symbol should be stored in - name (
string
): Name of set
Optional Arguments:
- domain (
cellstr
orSet
): List of domains given either asstring
or as reference to a symbol.Set object. Default is{"*"}
(for 1-dim with universe domain).
Parameter Arguments:
- records: Set records, e.g. a list of strings. Default is
[]
. - description (
string
): Description of symbol. Default is""
. - is_singleton (
logical
): Indicates if set is a is_singleton set (true
) or not (false
). Default isfalse
. - domain_forwarding (
logical
): Iftrue
, domain entries in records will recursively be added to the domains in case they are not present in the domains already. With a logical vector domain forwarding can be enabled/disabled independently for each domain. Default:false
.
Example:
c = Container();
s1 = symbol.Set.construct(c, 's1');
s2 = symbol.Set.construct(c, 's2', {s1, '*', '*'});
s3 = symbol.Set.construct(c, 's3', '*', 'records', {'e1', 'e2', 'e3'}, 'description', 'set s3');
- See also
- Set, Container.addSet
◆ copy()
function copy | ( | in | obj, |
in | varargin | ||
) |
Copies symbol to destination container.
Symbol domains are downgraded to relaxed
if the destination container does not have equivalent domain sets, see also Symbol Domain.
Required Arguments:
- destination (
Container
): Destination Container
Optional Arguments:
- overwrite (
bool
): Overwrites symbol with same name in destination iftrue
. Default:false
.
◆ describe()
|
static |
Returns an overview over all sets given.
See Symbol Overview for more information.
Required Arguments:
- symbols (list): List of sets to include.
The overview is in form of a table listing for each symbol its main characteristics and some statistics.