gdx2py.gams
¶
Module contains classes for handling GAMS symbols
Module Contents¶
-
class
gdx2py.gams.
GAMSSet
(keys: Sequence[tuple], domain: Sequence[str] = None, expl_text: str = '', assoc_texts: Sequence[str] = None)¶ Bases:
gdx2py.gams._GAMSNDimSymbol
Class for GAMS Sets
-
elements
¶ Set elements
- Type
list
-
expl_text
¶ Set explanatory text
- Type
str
-
assoc_texts
¶ Set element associated texts
- Type
list
Constructor for GAMSSet
- Parameters
keys – Sequence of tuples of strings for the keys
domain (optional) – Sequence of domain set names, use None for the universal set
expl_text (optional) – Explanatory text
assoc_texts (optional) – Set element associated texts
- Raises
ValueError –
-
property
elements
(self)
-
property
assoc_texts
(self)
-
-
class
gdx2py.gams.
GAMSScalar
(value: float, expl_text: str = '')¶ Bases:
gdx2py.gams._GAMSSymbol
Class for GAMS Scalars (0-dimensional Parameters)
-
expl_text
¶ Symbol explanatory text
- Type
str
Class constructor
- Parameters
name – Symbol name
value – Value
- Raises
ValueError –
-
-
class
gdx2py.gams.
GAMSParameter
(data: Mapping[tuple, float], domain: Sequence[str] = None, expl_text: str = '')¶ Bases:
gdx2py.gams._GAMSNDimSymbol
Class for GAMS Parameters
-
domain
¶ List of set names that make the domain of the symbol
- Type
list
-
expl_text
¶ Symbol explanatory text
- Type
str
-
keys
()¶ Return a view to the symbol’s keys
-
values
()¶ Return a view to the symbol’s values
Constructor for GAMSParameter
- Parameters
data – Dictionay of keys and values
domain (optional) – List of domain set names, use None for the universal set
expl_text (optional) – Explanatory text
- Raises
ValueError –
-
keys
(self)
-
values
(self)
-
to_pandas
(self)¶
-