Ord#
- class gamspy.Ord(symbol: Set | Alias)[source]#
Bases:
Operable
The operator ord may be used only with one-dimensional sets.
- Parameters:
- setSet | Alias
Methods
gamsRepr
()Representation of the Ord operation in GAMS language.
Representation of Ord function in Latex.
Examples
>>> import gamspy as gp >>> m = gp.Container() >>> t = gp.Set(m, name="t", description="time periods", records=[str(x) for x in range(1985, 1996)]) >>> val = gp.Parameter(m, name="val", domain=[t]) >>> val[t] = gp.Ord(t)