Matlab.GAMS.GAMSParameter Class Reference

Representation of a parameter symbol in GAMS. More...

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

Public Member Functions

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

Additional Inherited Members

- 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 More...
 
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 More...
 
cell records
 (read only) list of GAMSSymbolRecord instances contained in GAMSSymbol More...
 
string text
 (read only) GAMSSymbol explanatory text
 

Detailed Description

Representation of a parameter symbol in GAMS.

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

See also
GAMSDatabase, GAMSParameterRecord

Member Function Documentation

◆ addRecord()

GAMSParameterRecord Matlab.GAMS.GAMSParameter.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()

GAMSParameterRecord Matlab.GAMS.GAMSParameter.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()

GAMSParameterRecord Matlab.GAMS.GAMSParameter.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()

GAMSParameterRecord Matlab.GAMS.GAMSParameter.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.GAMSParameter.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()

GAMSParameterRecord Matlab.GAMS.GAMSParameter.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.