Loading...
Searching...
No Matches

GAMS Equation. More...

Inheritance diagram for Equation:
Abstract

GAMS Equation.

Represents a GAMS Equation.

Example:

c = Container();
e2 = symbol.Equation.construct(c, 'e2', 'l', {'*', '*'});
e3 = symbol.Equation.construct(c, 'e3', EquationType.EQ, '*', 'description', 'equ e3');
GAMS Transfer Container stores (multiple) symbols.
Definition: Container.m:67
GAMS Equation Type.
Definition: EquationType.m:47
Constant Property EQ
identifier for equality equation
Definition: EquationType.m:55
See also
Equation, Container.addEquation, EquationType

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 Equation.
 
static function describe (in symbols)
 Returns an overview over all equations given.
 

Public Attributes

Property type
 Equation type, e.g. leq
 
- 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 default_values
 Equation default values.
 
Property indexed
 Flag if symbol can be used in indexed mode.
 

Member Function Documentation

◆ construct()

static function construct ( in  varargin)
static

Constructs a GAMS Equation.

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 equation
  3. type (string, int or EquationType): Specifies the variable type, either as string, as integer given by any of the constants in EquationType or EquationType.

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: Equation 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();
e2 = symbol.Equation.construct(c, 'e2', 'l', {'*', '*'});
e3 = symbol.Equation.construct(c, 'e3', EquationType.EQ, '*', 'description', 'equ e3');
See also
Equation, Container.addEquation, EquationType

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

See Symbol Overview for more information.

Required Arguments:

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

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