Representation of a parameter symbol in GAMS. More...
Public Member Functions | |
| gams.control.ParameterRecord | addRecord (varargin) |
| Add record to Symbol. | |
| gams.control.ParameterRecord | findRecord (varargin) |
| Find record in Symbol. | |
| gams.control.ParameterRecord | getFirstRecord (varargin) |
| Get the first record of Symbol. | |
| gams.control.ParameterRecord | getLastRecord (varargin) |
| Get the last record of Symbol. | |
| Iterator | iterator () |
| Returns an iterator over a set of SymbolRecord instances. | |
| gams.control.ParameterRecord | mergeRecord (varargin) |
| Find record with specified keys in Symbol. | |
Public Member Functions inherited from matlab.gams.control.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. | |
| cell | getSymbolDomainViolations (integer maxNoViolation) |
| Check domains of all SymbolRecord instances in the Symbol. | |
| integer | hashCode () |
| Returns a hash code value for the object. | |
Additional Inherited Members | |
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 a parameter symbol in GAMS.
A Symbol exists in a Database and contains ParameterRecord instances which one can iterate through.
- See also
- Database, ParameterRecord
Member Function Documentation
◆ addRecord()
| gams.control.ParameterRecord matlab.gams.control.Parameter.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.ParameterRecord matlab.gams.control.Parameter.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.ParameterRecord matlab.gams.control.Parameter.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.ParameterRecord matlab.gams.control.Parameter.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.Parameter.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.ParameterRecord matlab.gams.control.Parameter.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.
Public Member Functions inherited from