Loading...
Searching...
No Matches

GAMS Parameter. More...

Inheritance diagram for Parameter:
Abstract

GAMS Parameter.

Represents a GAMS Parameter.

Example:

c = Container();
p1 = symbol.Parameter.construct(c, 'p1');
p2 = symbol.Parameter.construct(c, 'p2', {'*', '*'});
p3 = symbol.Parameter.construct(c, 'p3', '*', 'description', 'par p3');
GAMS Transfer Container stores (multiple) symbols.
Definition: Container.m:67
See also
Parameter, Container.addParameter

Public Member Functions

function copy (in obj, in varargin)
 Copies symbol to destination container.
 
function dropZeros (in obj)
 Drops zero values from records.
 
- 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 Parameter.
 
static function describe (in symbols)
 Returns an overview over all parameters given.
 

Private Attributes

Property indexed
 Flag if symbol can be used in indexed mode.
 

Additional Inherited Members

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

Member Function Documentation

◆ construct()

static function construct ( in  varargin)
static

Constructs a GAMS Parameter.

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 parameter

Optional Arguments:

  1. domain (cellstr or Set): List of domains given either as string or as reference to a symbol.Set object. Default is {} (for scalar).

Parameter Arguments:

  • records: Parameter records. Default is [].
  • description (string): Description of symbol. Default is "".
  • domain_forwarding (logical): If true, 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();
p1 = symbol.Parameter.construct(c, 'p1');
p2 = symbol.Parameter.construct(c, 'p2', {'*', '*'});
p3 = symbol.Parameter.construct(c, 'p3', '*', 'description', 'par p3');
See also
Parameter, Container.addParameter

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

  1. destination (Container): Destination Container

Optional Arguments:

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

◆ describe()

static function describe ( in  symbols)
static

Returns an overview over all parameters given.

See Symbol Overview for more information.

Required Arguments:

  1. symbols (list): List of parameters to include.

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

◆ dropZeros()

function dropZeros ( in  obj)

Drops zero values from records.

For table-like record formats rows are dropped if values are zero. For matrix-like records formats, nothing happens.