Representation of an equation symbol in GAMS. More...
Public Member Functions | |
gams.control.EquationRecord | addRecord (varargin) |
Add record to Symbol. | |
gams.control.EquationRecord | findRecord (varargin) |
Find record in Symbol. | |
gams.control.EquationRecord | getFirstRecord (varargin) |
Get the first record of Symbol. | |
gams.control.EquationRecord | getLastRecord (varargin) |
Get the last record of Symbol. | |
Iterator | iterator () |
Returns an iterator over a set of SymbolRecord instances. | |
gams.control.EquationRecord | mergeRecord (varargin) |
Find record with specified keys in Symbol. | |
Public Member Functions inherited from matlab.gams.control.Symbol | |
gams.control.SymbolRecord | addRecord (varargin) |
Add record to Symbol. | |
logical | checkDomains () |
Check domains of all SymbolRecord instances of the symbol. | |
logical | clear () |
Clear symbol by removing all records of this symbol. | |
void | copySymbol (gams.control.Symbol target) |
Copy all records of this Symbol to target Symbol. | |
logical | deleteRecord (varargin) |
Delete record from Symbol. | |
logical | equals (any object) |
Indicates whether some other object is "equal to" this one. | |
gams.control.SymbolRecord | findRecord (varargin) |
Find record in Symbol. | |
gams.control.SymbolRecord | getFirstRecord (varargin) |
Get the first record of Symbol. | |
gams.control.SymbolRecord | getLastRecord (varargin) |
Get the last record of Symbol. | |
cell | getSymbolDomainViolations (integer maxNoViolation) |
Check domains of all SymbolRecord instances in the Symbol. | |
integer | hashCode () |
Returns a hash code value for the object. | |
Iterator | iterator () |
Returns an iterator over a set of SymbolRecord instances. | |
gams.control.SymbolRecord | mergeRecord (varargin) |
Find record with specified keys in Symbol. | |
Public Attributes | |
gams.control.globals.EquType | equType |
(read only) SubType of this Equation | |
Public Attributes inherited from matlab.gams.control.Symbol | |
gams.control.Database | database |
(read only) Database containing Symbol | |
integer | dimension |
(read only) Symbol dimension | |
cell | domains |
(read only) Domains of Symbol, each element is either a Set (real domain) or a string (relaxed domain) | |
cell | domainsAsStrings |
(read only) Domains of Symbol, each element is a string | |
gams.control.SymbolRecord | firstRecord |
(read only) first record of Symbol | |
gams.control.SymbolRecord | lastRecord |
(read only) last record of Symbol | |
string | name |
(read only) Symbol name | |
integer | numberOfRecords |
(read only) Number of records of the Symbol | |
gams.control.SymbolRecord | record |
(read only) record of Symbol | |
cell | records |
(read only) list of SymbolRecord instances contained in Symbol | |
string | text |
(read only) Symbol explanatory text | |
Detailed Description
Representation of an equation symbol in GAMS.
A Symbol exists in a Database and contains EquationRecord instances which one can iterate through.
- See also
- Database, EquationRecord
Member Function Documentation
◆ addRecord()
gams.control.EquationRecord matlab.gams.control.Equation.addRecord | ( | varargin | ) |
Add record to Symbol.
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 SymbolRecord
- See also
- SymbolRecord
Reimplemented from matlab.gams.control.Symbol.
◆ findRecord()
gams.control.EquationRecord matlab.gams.control.Equation.findRecord | ( | varargin | ) |
Find record in Symbol.
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.control.Symbol.
◆ getFirstRecord()
gams.control.EquationRecord matlab.gams.control.Equation.getFirstRecord | ( | varargin | ) |
Get the first record of Symbol.
Retrieve the first record in Symbol 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 SymbolRecord found
- See also
- SymbolRecord
Reimplemented from matlab.gams.control.Symbol.
◆ getLastRecord()
gams.control.EquationRecord matlab.gams.control.Equation.getLastRecord | ( | varargin | ) |
Get the last record of Symbol.
Retrieve the first record in Symbol 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 SymbolRecord found
- See also
- SymbolRecord
Reimplemented from matlab.gams.control.Symbol.
◆ iterator()
Iterator matlab.gams.control.Equation.iterator | ( | ) |
Returns an iterator over a set of SymbolRecord instances.
Return: an iterator over a set of SymbolRecord instances
Reimplemented from matlab.gams.control.Symbol.
◆ mergeRecord()
gams.control.EquationRecord matlab.gams.control.Equation.mergeRecord | ( | varargin | ) |
Find record with specified keys in Symbol.
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.control.Symbol.