Loading...
Searching...
No Matches
Matlab.GAMS.GAMSEquation Class Reference

Representation of an equation symbol in GAMS. More...

Inheritance diagram for Matlab.GAMS.GAMSEquation:
Matlab.GAMS.GAMSSymbol

Public Member Functions

GAMSEquationRecord addRecord (varargin)
 Add record to GAMSSymbol.
 
GAMSEquationRecord findRecord (varargin)
 Find record in GAMSSymbol.
 
GAMSEquationRecord getFirstRecord (varargin)
 Get the first record of GAMSSymbol.
 
GAMSEquationRecord getLastRecord (varargin)
 Get the last record of GAMSSymbol.
 
GAMSIterator iterator ()
 Returns an iterator over a set of GAMSSymbolRecord instances.
 
GAMSEquationRecord mergeRecord (varargin)
 Find record with specified keys in GAMSSymbol.
 
- Public Member Functions inherited from Matlab.GAMS.GAMSSymbol
GAMSSymbolRecord addRecord (varargin)
 Add record to GAMSSymbol.
 
logical checkDomains ()
 Check domains of all GAMSSymbolRecord instances of the symbol.
 
logical clear ()
 Clear symbol by removing all records of this symbol.
 
void copySymbol (GAMS.GAMSSymbol target)
 Copy all records of this GAMSSymbol to target GAMSSymbol.
 
logical deleteRecord (varargin)
 Delete record from GAMSSymbol.
 
logical equals (any object)
 Indicates whether some other object is "equal to" this one.
 
GAMSSymbolRecord findRecord (varargin)
 Find record in GAMSSymbol.
 
GAMSSymbolRecord getFirstRecord (varargin)
 Get the first record of GAMSSymbol.
 
GAMSSymbolRecord getLastRecord (varargin)
 Get the last record of GAMSSymbol.
 
cell getSymbolDomainViolations (integer maxNoViolation)
 Check domains of all GAMSSymbolRecord instances in the Symbol.
 
integer hashCode ()
 Returns a hash code value for the object.
 
GAMSIterator iterator ()
 Returns an iterator over a set of GAMSSymbolRecord instances.
 
GAMSSymbolRecord mergeRecord (varargin)
 Find record with specified keys in GAMSSymbol.
 

Public Attributes

EquType equType
 (read only) SubType of this GAMSEquation
 
- Public Attributes inherited from Matlab.GAMS.GAMSSymbol
GAMSDatabase database
 (read only) GAMSDatabase containing GAMSSymbol
 
integer dimension
 (read only) GAMSSymbol dimension
 
cell domains
 (read only) Domains of GAMSSymbol, each element is either a GAMSSet (real domain) or a string (relaxed domain)
 
cell domainsAsStrings
 (read only) Domains of GAMSSymbol, each element is a string
 
GAMSSymbolRecord firstRecord
 (read only) first record of GAMSSymbol
 
GAMSSymbolRecord lastRecord
 (read only) last record of GAMSSymbol
 
string name
 (read only) GAMSSymbol name
 
integer numberOfRecords
 (read only) Number of records of the GAMSSymbol
 
GAMSSymbolRecord record
 (read only) record of GAMSSymbol
 
cell records
 (read only) list of GAMSSymbolRecord instances contained in GAMSSymbol
 
string text
 (read only) GAMSSymbol explanatory text
 

Detailed Description

Representation of an equation symbol in GAMS.

A GAMSSymbol exists in a GAMSDatabase and contains GAMSEquationRecord instances which one can iterate through.

See also
GAMSDatabase, GAMSEquationRecord

Member Function Documentation

◆ addRecord()

GAMSEquationRecord Matlab.GAMS.GAMSEquation.addRecord ( varargin  )

Add record to GAMSSymbol.

Valid VARARGIN signatures:

  • {string key1, ..., string keyN}
  • string key1, ..., string keyN

Arguments:

  • key1,...,keyN: Keys of record. Empty string is not a valid key.

Return: instance of GAMSSymbolRecord

See also
GAMSSymbolRecord

Reimplemented from Matlab.GAMS.GAMSSymbol.

◆ findRecord()

GAMSEquationRecord Matlab.GAMS.GAMSEquation.findRecord ( varargin  )

Find record in GAMSSymbol.

Valid VARARGIN signatures:

  • {string key1, ..., string keyN}
  • string key1, ..., string keyN

Arguments:

  • key1,...,keyN: Keys of record. Empty string is not a valid key.

Reimplemented from Matlab.GAMS.GAMSSymbol.

◆ getFirstRecord()

GAMSEquationRecord Matlab.GAMS.GAMSEquation.getFirstRecord ( varargin  )

Get the first record of GAMSSymbol.

Retrieve the first record in GAMSSymbol that meets the slice criteria. For example:

* try
* fprintf('Transportation costs to chicago\n');
* slice = {' ', 'chicago'};
* c = t1.outDB.getParameter('c');
* x1 = c.getFirstRecord(slice);
* while true
* fprintf('from %s to %s\n', x1.key(1), x1.key(2));
* if ~x1.moveNext()
* break;
* end
* end
* catch
* fprintf('No records found\n');
* end
* 

Valid VARARGIN signatures:

  • {string slice1, ..., string sliceN}
  • string slice1, ..., string sliceN

Arguments:

  • slice1,...,sliceN: Define filter for elements whose record should be retrieved

Return: instance of first GAMSSymbolRecord found

See also
GAMSSymbolRecord

Reimplemented from Matlab.GAMS.GAMSSymbol.

◆ getLastRecord()

GAMSEquationRecord Matlab.GAMS.GAMSEquation.getLastRecord ( varargin  )

Get the last record of GAMSSymbol.

Retrieve the first record in GAMSSymbol that meets the slice criteria.

Valid VARARGIN signatures:

  • {string slice1, ..., string sliceN}
  • string slice1, ..., string sliceN

Arguments:

  • slice1,...,sliceN: Define filter for elements whose record should be retrieved

Return: instance of first GAMSSymbolRecord found

See also
GAMSSymbolRecord

Reimplemented from Matlab.GAMS.GAMSSymbol.

◆ iterator()

GAMSIterator Matlab.GAMS.GAMSEquation.iterator ( )

Returns an iterator over a set of GAMSSymbolRecord instances.

Return: an iterator over a set of GAMSSymbolRecord instances

Reimplemented from Matlab.GAMS.GAMSSymbol.

◆ mergeRecord()

GAMSEquationRecord Matlab.GAMS.GAMSEquation.mergeRecord ( varargin  )

Find record with specified keys in GAMSSymbol.

In case the record is not found, the record with the specified keys will be added and returned the call.

Valid VARARGIN signatures:

  • {string key1, ..., string keyN}
  • string key1, ..., string keyN

Arguments:

  • key1,...,keyN: Keys of record. Empty string is not a valid key.

Return: Reference to record that is found or added

Reimplemented from Matlab.GAMS.GAMSSymbol.