Number#

class gamspy.Number(value)[source]#

Bases: Operable

Needed for conditions on numbers.

Parameters:
valueint | float
Parameters:

value (int | float) –

Examples

>>> import gamspy as gp
>>> m = gp.Container()
>>> k = gp.Set(m, "k", records=["1964-i","1964-ii","1964-iii","1964-iv"])
>>> ki = gp.Set(m, name="ki", domain=[k], description="initial period")
>>> ki[k] = gp.Number(1).where[gp.Ord(k) == 1]

Methods

gamsRepr()

Representation of this Number in GAMS language.

gamsRepr()[source]#

Representation of this Number in GAMS language.

Returns:
str
Return type:

str