Card#
- class gamspy.Card(symbol: Set | Alias | Parameter)[source]#
Bases:
Operable
The operator card may be used with any symbol and returns its number of records.
- Parameters:
- symbolSet | Alias | Parameter | Variable | Equation | Model
Methods
gamsRepr
()Representation of the Card operation in GAMS language.
Representation of Card 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)]) >>> s = gp.Parameter(m, name="s") >>> s[...] = gp.Card(t)