Public Member Functions | |
GAMSWorkspace () | |
GAMSWorkspace (GAMSWorkspaceInfo info) | |
GAMSWorkspace (String workingDirectory, String systemDirectory, GAMSGlobals.DebugLevel debugLevel) | |
GAMSJob | addJobFromGamsLib (String modelName) |
Retrieves model from GAMS Model Library. | |
GAMSJob | addJobFromTestLib (String modelName) |
Retrieves model from GAMS Test Library. | |
GAMSJob | addJobFromDataLib (String modelName) |
Retrieves model from GAMS Data Utilities Library. | |
GAMSJob | addJobFromFinLib (String modelName) |
Retrieves model from GAMS Practical Financial Optimization Library. | |
GAMSJob | addJobFromEmpLib (String modelName) |
Retrieves model from Extended Math Programming Library. | |
GAMSJob | addJobFromApiLib (String modelName) |
Retrieves model from GAMS API Library. | |
GAMSJob | addJobFromNoaLib (String modelName) |
Retrieves model from GAMS Non-linear Optimization Applications Library. | |
GAMSJob | addJobFromPsoptLib (String modelName) |
Retrieves model from Power System Optimization Modelling Library. | |
GAMSJob | addJobFromFile (String fileName) |
Create GAMSJob from model file. | |
GAMSJob | addJobFromFile (String fileName, String jobName) |
Create GAMSJob from model file. | |
GAMSJob | addJobFromFile (String fileName, GAMSCheckpoint checkpoint, String jobName) |
Create GAMSJob from model file. | |
GAMSDatabase | addDatabaseFromGDX (String gdxFileName) |
Database creation from an existing GDX file. | |
GAMSDatabase | addDatabaseFromGDX (String gdxFileName, String databaseName) |
Database creation from an existing GDX file. | |
GAMSJob | addJobFromString (String source) |
Create GAMSJob from string model source. | |
GAMSJob | addJobFromString (String source, GAMSCheckpoint checkpoint) |
Create GAMSJob from string model source. | |
GAMSJob | addJobFromString (String source, GAMSCheckpoint checkpoint, String jobName) |
Create GAMSJob from string model source. | |
GAMSDatabase | addDatabase () |
Create an empty GAMSDatabase. | |
GAMSDatabase | addDatabase (String databaseName) |
Create an empty GAMSDatabase. | |
GAMSDatabase | addDatabase (GAMSDatabase sourceDatabase) |
Create Database from existing database. | |
GAMSDatabase | addDatabase (GAMSDatabase sourceDatabase, String databaseName) |
Create Database from existing database. | |
GAMSCheckpoint | addCheckpoint () |
Create a GAMSCheckpoint. | |
GAMSCheckpoint | addCheckpoint (String checkpointName) |
Create GAMSCheckpoint. | |
GAMSOptions | addOptions () |
Create GAMSOptions. | |
GAMSOptions | addOptions (GAMSOptions option) |
Create GAMSOptions from a GAMSOptions object. | |
GAMSOptions | addOptions (String optionFile) |
Create GAMSOptions from an option file. | |
String | workingDirectory () |
Retrieve the working directory. | |
String | systemDirectory () |
Retrieve the system directory. | |
boolean | isUsingTmpWorkingDirectory () |
Retrieve the flag if the user's directory (that is System.getProperty("java.io.tmpdir")) has been used as a working directory. | |
GAMSGlobals.DebugLevel | getDebugLevel () |
Retrieve the debug level. | |
void | setDebugLevel (GAMSGlobals.DebugLevel level) |
Set the debug level. | |
String | getGAMSVersion () |
Get GAMS Version used. | |
int | getMajorReleaseNumber () |
Get GAMS Major Release Number. | |
int | getMinorReleaseNumber () |
Get GAMS Minor Release Number. | |
int | getGoldReleaseNumber () |
get GAMS GOLD Release Number | |
void | setMyEPS (double value) |
Reset the value of GAMSGlobals.SpecialValues.EPS , the value to be stored in and read from GAMSDatabase for Epsilon. | |
Static Public Member Functions | |
static String | getAPIVersion () |
get API Version | |
static int | getAPIMajorReleaseNumber () |
get API Major Release Number | |
static int | getAPIMinorReleaseNumber () |
get API Minor Release Number | |
static int | getAPIGoldReleaseNumber () |
get API GOLD Release Number | |
Protected Member Functions | |
void | finalize () throws Throwable |
Clean up temporary files in working directory in case debug level is not set to GAMSGlobals.DebugLevel.KEEP_FILES or above. | |
Detailed Description
The GAMSWorkspace
is the base class in the com.gams.api package. Most instances of API program under the package (such as GAMSDatabase
, GAMSJob
, and GAMSCheckpoint
) have to be created by an "add" method provided by GAMSWorkspace
.
When creating a GAMSWorkspace
instance, it is possible to use a default configuration or a user-defined configuration to specify workspace attributes (system directory, working directory, and debug level) of the instance.
- The system directory is the directory where GAMS system has been installed. It provides most resources from GAMS required by an API program.
-
The working directory is the anchor directory where all file based operation inside a running GAMS model should be relative to this location (e.g. $GDXIN and $include). Though there are also options to add input search paths (e.g. IDir) and output path (e.g. PutDir) to specify other file system locations provided by
GAMSOptions
. It is recommended to clean up the working directory after running an example, if the output files are no longer needed. - The debug level is the level of debug information that can be set to various value when more or less information is needed during run time.
For a default configuration, a GAMSWorkspace
instance is created by the default constructor without a parameter. In such case, the workspace attributes will be determined using the default setting.
-
The system directory will be determined automatically from the environment (first, from "PATH" environment variable on every platform. If a GAMS system directory is not found from "PATH", the system directory will be determined from the platform specific environment: from windows registry "Software\Classes\gams.location" on Windows-based platform, from "DYLD_LIBRARY_PATH" on Mac OS platform, or from "LD_LIBRARY_PATH" on other Unix-based platforms). If a valid GAMS system directory could not be found from both environment variables,
GAMSException
will be raised during run time. -
The working directory will be determined from
GAMSGlobals.workingDirectory
which by default is the user working directory (the java property "java.io.tmpdir"). -
The debug level is set to
GAMSGlobals.DebugLevel.OFF
by default, that is no debug information available.
To create a GAMSWorkspace
instance with a user-defined configuration, it is possible to specify one of workspace attributes (system directory, working directory, and debug level) by either using GAMSWorkspace(String, String, GAMSGlobals.DebugLevel) constructor or creating first a GAMSWorkspaceInfo
instance that contains attribute values and then passing it as input parameter for one of the GAMSWorkspace
constructors. Either way, both specified system directory and working directory will be verified whether or not they are valid directories. In case of an invalid directory, GAMSException
will be raised during run time. In general, the directory is not a valid directory if it is does not exist. The directory contains either an empty string or only white spaces will be treated as non existent directory whereas the null directory will be treated with the default setting. The system directory is not a valid GAMS directory if it does not contain valid GAMS files and libraries. The valid system directory will be used and not be verified against an environment variable.
- Note
- If you use multiple instances of the
GAMSWorkspace
in parallel, you should avoid using the same working directory. Otherwise you may end up with conflicting file names.
As most API operations, such as database operations, requires API libraries to accomplish the operations, it is important to set java property "java.library.path" to the directory containing valid Java API libraries when running a program. In case the java library path is not set or the directory does not contain a valid Java API libraries, java.lang.UnsatisfiedLinkError will be raised during run time. In case there is a conflict between the system directory and the java library path containing API libraries, API libraries will print a warning message, that API version found from the library path is different than GAMS version found from the system directory.
- See also
- GAMSCheckpoint
- GAMSDatabase
- GAMSGlobals
- GAMSJob
- GAMSOptions
- GAMSWorkspaceInfo
- GAMSGlobals.DebugLevel
Constructor & Destructor Documentation
◆ GAMSWorkspace() [1/3]
com.gams.api.GAMSWorkspace.GAMSWorkspace | ( | ) |
Construct a new GAMSWorkspace
instance using the default configuration. All of the workspace attributes will be determined using the default setting.
For the system directory, the system directory will be determined automatically from the environment (first, from "PATH" environment variable on every platform. If a GAMS system directory is not found from "PATH", the system directory will be determined from the platform specific environment: either from windows registry "Software\Classes\gams.location" on Windows-based platform, or from "DYLD_LIBRARY_PATH" on Mac OS platform, or from "LD_LIBRARY_PATH" on other Unix-based platforms). If a valid GAMS system directory could not be found from both environment variables, GAMSException
will be raised during run time.
When the working directory is not specified, the default working directory with prefix "gams_" (specified by GAMSGlobals.workingDirectoryPrefix
) under the temporary directory (specified by GAMSGlobals.workingDirectory
) will be created and taken as the working directory of the workspace. After the working directory is successfully created, the call of method GAMSWorkspace.workingDirectory()
will return the string describing the working directory and the call of the method GAMSWorkspace.isUsingTmpWorkingDirectory()
will return true. Under situation where the directory could not be created, the directory specified by specified by GAMSGlobals.workingDirectory
will be taken as the working directory of the workspace. Under such situation, the call of method GAMSWorkspace.workingDirectory()
will return the working directory string and the call of the method GAMSWorkspace.isUsingTmpWorkingDirectory()
will return false.
The debug level is, by default, GAMSGlobals.DebugLevel.OFF
. When a GAMSWorkspace
instance is created, it also allows an environment variable "GAMSOOAPIDEBUG" containing a String that represents the desired DebugLevel to override the debug level of the created workspace instance.
- Exceptions
-
GAMSException If the environment variable does not contain a valid GAMS system directory, or the directory specified by the java property "java.library.path" contains Java API libraries which conflict with the platform architecture the program is running on.
- See also
- GAMSGlobals.DebugLevel
- GAMSGlobals.DebugLevel.lookup(int)
- GAMSGlobals.DebugLevel.lookup(String)
- GAMSGlobals.DebugLevel.message()
- GAMSGlobals.DebugLevel.OFF
- GAMSGlobals.workingDirectory
- GAMSWorkspace.isUsingTmpWorkingDirectory()
- GAMSWorkspace.systemDirectory()
- GAMSWorkspace.workingDirectory()
◆ GAMSWorkspace() [2/3]
com.gams.api.GAMSWorkspace.GAMSWorkspace | ( | GAMSWorkspaceInfo | info | ) |
Construct a new GAMSWorkspace
instance from GAMSWorkspaceInfo
instance. All of the workspace attributes will be determined from attributes of GAMSWorkspaceInfo
.
In case the system directory attribute is null or not specified (by default setting), the system directory will be determined automatically from the environment (first, from "PATH" environment variable on every platform. If a GAMS system directory is not found from "PATH", the system directory will be determined from the platform specific environment: either from windows registry "Software\Classes\gams.location" on Windows-based platform, or from "DYLD_LIBRARY_PATH" on Mac OS platform, or from "LD_LIBRARY_PATH" on other Unix-based platforms). If a valid GAMS system directory could not be found from both environment variables, GAMSException
will be raised during run time.
In case the specified system directory is not null, the directory will be verified. In case the specified directory does not exist or it is not a valid GAMS directory, GAMSException
will be raised during run time.
In case the specified working directory is null or not specified (by default setting), the default working directory with prefix "gams_" (specified by GAMSGlobals.workingDirectoryPrefix
) under the temporary directory (specified by GAMSGlobals.workingDirectory
) will be created andtaken as the working directory of the workspace. After the directory is successfully created, the call of method GAMSWorkspace.workingDirectory()
will return the string describing the working directory and the call of the method GAMSWorkspace.isUsingTmpWorkingDirectory()
will return true. Under situation where the directory could not be created, the directory specified by specified by GAMSGlobals.workingDirectory
will be taken as the working directory of the workspace. Under such situation, the call of method GAMSWorkspace.workingDirectory()
will return the working directory string and the call of the method GAMSWorkspace.isUsingTmpWorkingDirectory()
will return false.
In case the specified working directory is not null, the directory will be verified. In case the specified directory does exist but not a directory, GAMSException
will be raised during run time. Otherwise the directory will be created.
The debug level attribute is, by default of creating a GAMSWorkspaceInfo
, GAMSGlobals.DebugLevel.OFF
. The debug level can be specified to other value by an instance of GAMSGlobals.DebugLevel
. Note that When a GAMSWorkspace
instance is created, it also allows an environment variable "GAMSOOAPIDEBUG" containing a String that represents the desired DebugLevel to override the debug level of the created instance.
- Parameters
-
info a GAMSWorkspaceInfo
instance containing information about the user-specified working directory, the user-specified GAMS system directory, and debug level.
- Exceptions
-
GAMSException If either info instance is null, or the specified directory does not exist, or the specified system directory is not a valid GAMS directory, or the directory specified by the java property "java.library.path" contains Java API libraries which conflict with the platform architecture the program is running on.
- See also
- GAMSGlobals.DebugLevel
- GAMSGlobals.DebugLevel.lookup(int)
- GAMSGlobals.DebugLevel.lookup(String)
- GAMSGlobals.DebugLevel.message()
- GAMSGlobals.DebugLevel.OFF
- GAMSGlobals.workingDirectory
- GAMSWorkspaceInfo
- GAMSWorkspace.isUsingTmpWorkingDirectory()
- GAMSWorkspace.systemDirectory()
- GAMSWorkspace.workingDirectory()
◆ GAMSWorkspace() [3/3]
com.gams.api.GAMSWorkspace.GAMSWorkspace | ( | String | workingDirectory, |
String | systemDirectory, | ||
GAMSGlobals.DebugLevel | debugLevel | ||
) |
Construct a new GAMSWorkspace
instance.
In case the system directory attribute is null, the system directory will be determined automatically from the environment (first, from "PATH" environment variable on every platform. If a GAMS system directory is not found from "PATH", the system directory will be determined from the platform specific environment: either from windows registry "Software\Classes\gams.location" on Windows-based platform, or from "DYLD_LIBRARY_PATH" on Mac OS platform, or from "LD_LIBRARY_PATH" on other Unix-based platforms). If a valid GAMS system directory could not be found from both environment variables, GAMSException
will be raised during run time.
In case the specified system directory is not null, the directory will be verified. In case the specified directory does not exist or it is not a valid GAMS directory, GAMSException
will be raised during run time.
In case the specified working directory is null or not specified (by default setting), the default working directory with prefix "gams_" (specified by GAMSGlobals.workingDirectoryPrefix
) under the temporary directory (specified by GAMSGlobals.workingDirectory
) will be created and taken as the working directory of the workspace. After the directory is successfully created, the call of method GAMSWorkspace.workingDirectory()
will return the string describing the working directory and the call of the method GAMSWorkspace.isUsingTmpWorkingDirectory()
will return true. Under situation where the directory could not be created, the directory specified by specified by GAMSGlobals.workingDirectory
will be taken as the working directory of the workspace. Under such situation, the call of method GAMSWorkspace.workingDirectory()
will return the working directory string and the call of the method GAMSWorkspace.isUsingTmpWorkingDirectory()
will return false.
In case the specified working directory is not null, the directory will be verified. In case the specified directory does exist but not a directory, GAMSException
will be raised during run time. Otherwise the directory will be created.
The debug level can be specified by an instance of GAMSGlobals.DebugLevel
. When a GAMSWorkspace
instance is created, it also allows an environment variable "GAMSOOAPIDEBUG" containing a String that represents the desired DebugLevel to override the debug level of the created instance.
- Parameters
-
workingDirectory the user-specified working directory where all GAMS files will be stored systemDirectory the user-specified GAMS system directory debugLevel debug level
- Exceptions
-
GAMSException the specified system directory does not exist, or the specified system directory is not a valid GAMS directory, or the directory specified by the java property "java.library.path" contains Java API libraries which conflict with the platform architecture the program is running on.
- See also
- GAMSGlobals.DebugLevel
- GAMSGlobals.DebugLevel.lookup(int)
- GAMSGlobals.DebugLevel.lookup(String)
- GAMSGlobals.DebugLevel.message()
- GAMSGlobals.DebugLevel.OFF
- GAMSGlobals.workingDirectory
- GAMSWorkspace.isUsingTmpWorkingDirectory()
- GAMSWorkspace.systemDirectory()
- GAMSWorkspace.workingDirectory()
Member Function Documentation
◆ addCheckpoint() [1/2]
GAMSCheckpoint com.gams.api.GAMSWorkspace.addCheckpoint | ( | ) |
Create a GAMSCheckpoint.
The name of a GAMSCheckpoint object is generated automatically.
- Returns
- Reference to GAMSCheckpoint object
- Exceptions
-
GAMSException If GAMSCheckpoint could not be successfully created
◆ addCheckpoint() [2/2]
GAMSCheckpoint com.gams.api.GAMSWorkspace.addCheckpoint | ( | String | checkpointName | ) |
Create GAMSCheckpoint.
- Parameters
-
checkpointName Identifier of GAMSCheckpoint or filename for existing checkpoint
- Returns
- Reference to GAMSCheckpoint object
- Exceptions
-
GAMSException If GAMSCheckpoint could not be successfully created
◆ addDatabase() [1/4]
GAMSDatabase com.gams.api.GAMSWorkspace.addDatabase | ( | ) |
Create an empty GAMSDatabase.
The name of a GAMSDatabase object is generated automatically.
- Returns
- Reference to GAMSDatabase object
- Exceptions
-
java.lang.UnsatisfiedLinkError If java property "java.library.path" is not set or the directory specified by the property does not contain valid Java API libraries. GAMSException If GAMSDatabase could not be successfully created
◆ addDatabase() [2/4]
GAMSDatabase com.gams.api.GAMSWorkspace.addDatabase | ( | GAMSDatabase | sourceDatabase | ) |
Create Database from existing database.
- Parameters
-
sourceDatabase Source GAMSDatabase to initialize Database from
- Returns
- Reference to GAMSDatabase object
- Exceptions
-
java.lang.UnsatisfiedLinkError If java property "java.library.path" is not set or the directory specified by the property does not contain valid Java API libraries. GAMSException If GAMSDatabase could not be successfully created
◆ addDatabase() [3/4]
GAMSDatabase com.gams.api.GAMSWorkspace.addDatabase | ( | GAMSDatabase | sourceDatabase, |
String | databaseName | ||
) |
Create Database from existing database.
- Parameters
-
sourceDatabase Source GAMSDatabase to initialize Database from databaseName Identifier of GAMSDatabase
- Returns
- Reference to GAMSDatabase object
- Exceptions
-
java.lang.UnsatisfiedLinkError If java property "java.library.path" is not set or the directory specified by the property does not contain valid Java API libraries. GAMSException If databaseName already exists in the workspace or GAMSDatabase could not be successfully created
◆ addDatabase() [4/4]
GAMSDatabase com.gams.api.GAMSWorkspace.addDatabase | ( | String | databaseName | ) |
Create an empty GAMSDatabase.
- Parameters
-
databaseName Identifier of GAMSDatabase
- Returns
- Reference to GAMSDatabase object
- Exceptions
-
java.lang.UnsatisfiedLinkError If java property "java.library.path" is not set or the directory specified by the property does not contain valid Java API libraries. GAMSException If databaseName already exists in the workspace or GAMSDatabase could not be successfully created
◆ addDatabaseFromGDX() [1/2]
GAMSDatabase com.gams.api.GAMSWorkspace.addDatabaseFromGDX | ( | String | gdxFileName | ) |
Database creation from an existing GDX file.
- Parameters
-
gdxFileName File to initialize Database from
- Returns
- Reference of GAMSDatabase instance
- Exceptions
-
GAMSException If GAMSDatabase could not be successfully created
◆ addDatabaseFromGDX() [2/2]
GAMSDatabase com.gams.api.GAMSWorkspace.addDatabaseFromGDX | ( | String | gdxFileName, |
String | databaseName | ||
) |
Database creation from an existing GDX file.
- Parameters
-
gdxFileName File to initialize Database from databaseName Identifier of GAMSDatabase (determined automatically if null)
- Returns
- Reference of GAMSDatabase instance
- Exceptions
-
GAMSException If GAMSDatabase could not be successfully created
◆ addJobFromApiLib()
GAMSJob com.gams.api.GAMSWorkspace.addJobFromApiLib | ( | String | modelName | ) |
Retrieves model from GAMS API Library.
- Parameters
-
modelName input model name (without path)
- Returns
- Reference to GAMSJob instance
- Exceptions
-
GAMSException If the model name could not be found in API Library
◆ addJobFromDataLib()
GAMSJob com.gams.api.GAMSWorkspace.addJobFromDataLib | ( | String | modelName | ) |
Retrieves model from GAMS Data Utilities Library.
- Parameters
-
modelName input model name (without path)
- Returns
- Reference to GAMSJob instance
- Exceptions
-
GAMSException If the model name could not be found in GAMS Data Utilities Library
◆ addJobFromEmpLib()
GAMSJob com.gams.api.GAMSWorkspace.addJobFromEmpLib | ( | String | modelName | ) |
Retrieves model from Extended Math Programming Library.
- Parameters
-
modelName input model name (without path)
- Returns
- Reference to GAMSJob instance
- Exceptions
-
GAMSException If the model name could not be found in GAMS Extended Math Programming Library
◆ addJobFromFile() [1/3]
GAMSJob com.gams.api.GAMSWorkspace.addJobFromFile | ( | String | fileName | ) |
Create GAMSJob from model file.
- Parameters
-
fileName Source file name
- Returns
- Reference to GAMSJob instance
- Exceptions
-
GAMSException If GAMSJob could not be successfully created from the source file name
◆ addJobFromFile() [2/3]
GAMSJob com.gams.api.GAMSWorkspace.addJobFromFile | ( | String | fileName, |
GAMSCheckpoint | checkpoint, | ||
String | jobName | ||
) |
Create GAMSJob from model file.
- Parameters
-
fileName Source file name checkpoint GAMSCheckpoint to initialize GAMSJob from jobName Job name (determined automatically if null)
- Returns
- Reference to GAMSJob instance
- Exceptions
-
GAMSException If GAMSJob could not be successfully created
◆ addJobFromFile() [3/3]
GAMSJob com.gams.api.GAMSWorkspace.addJobFromFile | ( | String | fileName, |
String | jobName | ||
) |
Create GAMSJob from model file.
- Parameters
-
fileName Source file name jobName Job name (determined automatically if null)
- Returns
- Reference to GAMSJob instance
- Exceptions
-
GAMSException If GAMSJob could not be successfully created
◆ addJobFromFinLib()
GAMSJob com.gams.api.GAMSWorkspace.addJobFromFinLib | ( | String | modelName | ) |
Retrieves model from GAMS Practical Financial Optimization Library.
- Parameters
-
modelName input model name (without path)
- Returns
- Reference to GAMSJob instance
- Exceptions
-
GAMSException If the model name could not be found in GAMS Financial Optimization Library
◆ addJobFromGamsLib()
GAMSJob com.gams.api.GAMSWorkspace.addJobFromGamsLib | ( | String | modelName | ) |
Retrieves model from GAMS Model Library.
- Parameters
-
modelName input model name (without path)
- Returns
- Reference to GAMSJob instance
- Exceptions
-
GAMSException If the model name could not be found in GAMS Model Library
◆ addJobFromNoaLib()
GAMSJob com.gams.api.GAMSWorkspace.addJobFromNoaLib | ( | String | modelName | ) |
Retrieves model from GAMS Non-linear Optimization Applications Library.
- Parameters
-
modelName input model name (without path)
- Returns
- Reference to GAMSJob instance
- Exceptions
-
GAMSException If the model name could not be found in Non-linear Optimization Applications Library
◆ addJobFromPsoptLib()
GAMSJob com.gams.api.GAMSWorkspace.addJobFromPsoptLib | ( | String | modelName | ) |
Retrieves model from Power System Optimization Modelling Library.
- Parameters
-
modelName input model name (without path)
- Returns
- Reference to GAMSJob instance
- Exceptions
-
GAMSException If the model name could not be found in Power System Optimization Modelling Library
◆ addJobFromString() [1/3]
GAMSJob com.gams.api.GAMSWorkspace.addJobFromString | ( | String | source | ) |
Create GAMSJob from string model source.
- Parameters
-
source GAMS model as string
- Returns
- Reference to GAMSJob object
- Exceptions
-
GAMSException If GAMSJob could not be successfully created
◆ addJobFromString() [2/3]
GAMSJob com.gams.api.GAMSWorkspace.addJobFromString | ( | String | source, |
GAMSCheckpoint | checkpoint | ||
) |
Create GAMSJob from string model source.
The job name is generated automatically.
- Parameters
-
source GAMS model as string checkpoint GAMSCheckpoint to initialize GAMSJob from
- Returns
- Reference to GAMSJob object
- Exceptions
-
GAMSException If GAMSJob could not be successfully created
◆ addJobFromString() [3/3]
GAMSJob com.gams.api.GAMSWorkspace.addJobFromString | ( | String | source, |
GAMSCheckpoint | checkpoint, | ||
String | jobName | ||
) |
Create GAMSJob from string model source.
- Parameters
-
source GAMS model as string checkpoint GAMSCheckpoint to initialize GAMSJob from jobName Job name
- Returns
- Reference to GAMSJob object
- Exceptions
-
GAMSException If GAMSJob could not be successfully created
◆ addJobFromTestLib()
GAMSJob com.gams.api.GAMSWorkspace.addJobFromTestLib | ( | String | modelName | ) |
Retrieves model from GAMS Test Library.
- Parameters
-
modelName input model name (without path)
- Returns
- Reference to GAMSJob instance
- Exceptions
-
GAMSException If the model name could not be found in GAMS Test Library
◆ addOptions() [1/3]
GAMSOptions com.gams.api.GAMSWorkspace.addOptions | ( | ) |
Create GAMSOptions.
- Returns
- Reference to GAMSOptions object
- Exceptions
-
GAMSException If GAMSOptions could not be successfully created
◆ addOptions() [2/3]
GAMSOptions com.gams.api.GAMSWorkspace.addOptions | ( | GAMSOptions | option | ) |
Create GAMSOptions from a GAMSOptions object.
- Parameters
-
option Reference to GAMSObject object
- Returns
- Reference to GAMSOptions object
- Exceptions
-
GAMSException If GAMSOptions could not be successfully created
- Since
- 24.2
◆ addOptions() [3/3]
GAMSOptions com.gams.api.GAMSWorkspace.addOptions | ( | String | optionFile | ) |
Create GAMSOptions from an option file.
- Parameters
-
optionFile Option file name
- Returns
- Reference to GAMSOptions object
- Exceptions
-
GAMSException If GAMSOptions could not be successfully created
- Since
- 24.2
◆ finalize()
|
protected |
Clean up temporary files in working directory in case debug level is not set to GAMSGlobals.DebugLevel.KEEP_FILES
or above.
The accessibility has been set back from pubilc to protected since 25.1.
- Exceptions
-
exception or error raised by calling finalize().
◆ getAPIGoldReleaseNumber()
|
static |
get API GOLD Release Number
- Since
- 24.2
◆ getAPIMajorReleaseNumber()
|
static |
get API Major Release Number
- Since
- 24.2
◆ getAPIMinorReleaseNumber()
|
static |
get API Minor Release Number
- Since
- 24.2
◆ getAPIVersion()
|
static |
get API Version
- Since
- 24.2
◆ getDebugLevel()
GAMSGlobals.DebugLevel com.gams.api.GAMSWorkspace.getDebugLevel | ( | ) |
Retrieve the debug level.
- Returns
- debug level
- See also
- GAMSGlobals.DebugLevel
◆ getGAMSVersion()
String com.gams.api.GAMSWorkspace.getGAMSVersion | ( | ) |
Get GAMS Version used.
- Since
- 24.2
◆ getGoldReleaseNumber()
int com.gams.api.GAMSWorkspace.getGoldReleaseNumber | ( | ) |
get GAMS GOLD Release Number
- Since
- 24.2
◆ getMajorReleaseNumber()
int com.gams.api.GAMSWorkspace.getMajorReleaseNumber | ( | ) |
Get GAMS Major Release Number.
- Since
- 24.2
◆ getMinorReleaseNumber()
int com.gams.api.GAMSWorkspace.getMinorReleaseNumber | ( | ) |
Get GAMS Minor Release Number.
- Since
- 24.2
◆ isUsingTmpWorkingDirectory()
boolean com.gams.api.GAMSWorkspace.isUsingTmpWorkingDirectory | ( | ) |
Retrieve the flag if the user's directory (that is System.getProperty("java.io.tmpdir")) has been used as a working directory.
- Returns
- true if the user's directory has been used as a working directory, false otherwise.
◆ setDebugLevel()
void com.gams.api.GAMSWorkspace.setDebugLevel | ( | GAMSGlobals.DebugLevel | level | ) |
Set the debug level.
- Parameters
-
level debug level
- See also
- GAMSGlobals.DebugLevel
◆ setMyEPS()
void com.gams.api.GAMSWorkspace.setMyEPS | ( | double | value | ) |
Reset the value of GAMSGlobals.SpecialValues.EPS
, the value to be stored in and read from GAMSDatabase for Epsilon.
- Since
- 24.2
- See also
- GAMSGlobals.SpecialValues.EPS
◆ systemDirectory()
String com.gams.api.GAMSWorkspace.systemDirectory | ( | ) |
Retrieve the system directory.
- Returns
- String described the system directory
◆ workingDirectory()
String com.gams.api.GAMSWorkspace.workingDirectory | ( | ) |
Retrieve the working directory.
- Returns
- String described the working directory