Loading...
Searching...
No Matches
com.gams.api.GAMSVariable Class Reference

This is the representation of a variable symbol in GAMS. More...

Inheritance diagram for com.gams.api.GAMSVariable:
com.gams.api.GAMSSymbol< GAMSVariableRecord >

Public Member Functions

GAMSGlobals.VarType getVarType ()
 Retrieve subtype of the GAMSVariable object.
 
- Public Member Functions inherited from com.gams.api.GAMSSymbol< GAMSVariableRecord >
getFirstRecord ()
 Get the first record of GAMSSymbol.
 
getFirstRecord (String ... slice)
 Retrieve the first record in GAMSSymbol that meets the slice criteria.
 
boolean equals (Object obj)
 Indicates whether some other object is "equal to" this one.
 
int hashCode ()
 Returns a hash code value for the object.
 
getLastRecord ()
 Get the last record of GAMSSymbol.
 
getLastRecord (String ... slice)
 Retrieve the last record in GAMSSymbol that meets the slice criteria.
 
findRecord (String ... keys)
 Find record in GAMSSymbol.
 
addRecord (Vector< String > keys)
 Add record T to GAMSSymbol.
 
addRecord (String ... keys)
 Add record T to GAMSSymbol.
 
mergeRecord (String ... keys)
 Find record T with specified keys in GAMSSymbol.
 
boolean deleteRecord (String ... keys)
 Delete record T from GAMSSymbol.
 
boolean clear ()
 Clear symbol by removing all records of this symbol.
 
void copySymbol (GAMSSymbol<?> target)
 Copy all records of this GAMSSymbol to target GAMSSymbol (if target had records, they will be deleted)
 
GAMSDatabase getDatabase ()
 Get GAMSDatabase containing GAMSSymbol.
 
int getDimension ()
 Get GAMSSymbol dimension.
 
String getName ()
 Get GAMSSymbol name.
 
String getText ()
 Get GAMSSymbol explanatory text.
 
int getNumberOfRecords ()
 Get the number of records of the GAMSSymbol.
 
List< Object > getDomains ()
 Retrieve domains of Symbol, each element is either a GAMSSet (real domain) or a String (relaxed domain).
 
List< String > getDomainsAsStrings ()
 Retrieve domains of Symbol, each element is a string.
 
boolean checkDomains ()
 Check all GAMSSymbolRecord instances of the symbol if all their records are within the specified domain of the symbol.
 
List< GAMSSymbolDomainViolationgetSymbolDomainViolations (int maxNoViolation)
 Check all GAMSSymbolRecord instances in the Symbol if they are within the specified domain of the symbol.
 
Iterator< T > iterator ()
 Returns an iterator over a set of elements of type T.
 

Additional Inherited Members

- Protected Member Functions inherited from com.gams.api.GAMSSymbol< GAMSVariableRecord >
 GAMSSymbol (GAMSDatabase database, long sPtr)
 Create a GAMS Symbol instance.
 
 GAMSSymbol (GAMSDatabase database, String identifier, int dimension, String explanatoryText)
 Create a GAMS Symbol instance.
 
abstract T CheckAndReturnRecord (long symIterPtr)
 This method checks if symbol pointer is valid.
 

Detailed Description

This is the representation of a variable symbol in GAMS.

It exists in a GAMSDatabase and contains GAMSVariableRecords which one can iterate through.

See also
GAMSDatabase
GAMSDatabase.addVariable(String, int, GAMSGlobals.VarType)
GAMSDatabase.addVariable(String, int, GAMSGlobals.VarType, String)
GAMSDatabase.addVariable(String, GAMSGlobals.VarType, String, Object...)
GAMSGlobals.VarType

Member Function Documentation

◆ getVarType()

GAMSGlobals.VarType com.gams.api.GAMSVariable.getVarType ( )

Retrieve subtype of the GAMSVariable object.

Returns
the enumerate VarType of the GAMSVariable
See also
GAMSGlobals.VarType