25.10.2013 Views

GAMS Python API documentation version 24.1

GAMS Python API documentation version 24.1

GAMS Python API documentation version 24.1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.3 gams.database.GamsDatabase Class Reference 21<br />

Parameters<br />

identifier Variable name<br />

vartype Variable subtype (VarType.Binary, VarType.Integer, VarType.Positive, VarType.Negative, Var-<br />

Type.Free, VarType.SOS1, VarType.SOS2, VarType.SemiCont, VarType.SemiInt)<br />

domains A list containing GamsSet objects and strings for domain information. The length of the list<br />

specifies the dimension.<br />

explanatory_text Explanatory text to variable<br />

See Also<br />

add_equation_dc(), add_parameter_dc(), add_set_dc()<br />

4.3.2.9 def gams.database.GamsDatabase.check domains ( self )<br />

Check for all symbols if all records are within the specified domain of the symbol.<br />

Returns<br />

True: Everything is correct, False: There is a domain violation<br />

4.3.2.10 def gams.database.GamsDatabase.compact ( self )<br />

This function is obsolete and has no effect anymore.<br />

It will be removed in the future<br />

4.3.2.11 def gams.database.GamsDatabase.export ( self, file path = None )<br />

Write database into a GDX file.<br />

Parameters<br />

file_path The path used to write the GDX file. A relative path is relative to the <strong>GAMS</strong> working directory.<br />

If not present, the file is written to the working directory using the name of the database.<br />

4.3.2.12 def gams.database.GamsDatabase.get database dvs ( self, max viol = 0, max viol per symbol = 0 )<br />

return all GamsDatabaseDomainViolations<br />

Parameters<br />

max_viol The maximum number of domain violations which should be stored (0 for no limit)<br />

max_viol_per_symbol<br />

The maximum number of domain violations which should be stored per Symbol (0 for no limit)<br />

Returns<br />

List containing GamsDatabaseDomainViolation objects<br />

4.3.2.13 def gams.database.GamsDatabase.get equation ( self, equation identifier )<br />

Get GamsEquation by name.<br />

<strong>GAMS</strong><strong>Python</strong><strong>API</strong> <strong>documentation</strong> <strong>version</strong> <strong>24.1</strong> May 2013

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!