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
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)
Methods
gamsRepr