RoutineBase.addVars#
- RoutineBase.addVars(name: str, model: str | None = None, shape: tuple | int | None = None, tex_name: str | None = None, info: str | None = None, src: str | None = None, unit: str | None = None, horizon: RParam | None = None, nonneg: bool | None = False, nonpos: bool | None = False, cplx: bool | None = False, imag: bool | None = False, symmetric: bool | None = False, diag: bool | None = False, psd: bool | None = False, nsd: bool | None = False, hermitian: bool | None = False, boolean: bool | None = False, integer: bool | None = False, pos: bool | None = False, neg: bool | None = False)[source]#
Add a variable to the routine.
- Parameters:
- namestr, optional
Variable name. One should typically assigning the name directly because it will be automatically assigned by the model. The value of
name
will be the symbol name to be used in expressions.- modelstr, optional
Name of the owner model or group.
- shapeint or tuple, optional
Shape of the variable. If is None, the shape of model will be used.
- infostr, optional
Descriptive information
- unitstr, optional
Unit
- tex_namestr
LaTeX-formatted variable symbol. If is None, the value of name will be used.
- srcstr, optional
Source variable name. If is None, the value of name will be used.
- lbstr, optional
Lower bound
- ubstr, optional
Upper bound
- horizonams.routines.RParam, optional
Horizon idx.
- nonnegbool, optional
Non-negative variable
- nonposbool, optional
Non-positive variable
- cplxbool, optional
Complex variable
- imagbool, optional
Imaginary variable
- symmetricbool, optional
Symmetric variable
- diagbool, optional
Diagonal variable
- psdbool, optional
Positive semi-definite variable
- nsdbool, optional
Negative semi-definite variable
- hermitianbool, optional
Hermitian variable
- boolbool, optional
Boolean variable
- integerbool, optional
Integer variable
- posbool, optional
Positive variable
- negbool, optional
Negative variable